Re: [PATCH 7/7] mailbox/omap: move the OMAP mailbox framework to drivers

2013-06-08 Thread Greg Kroah-Hartman
On Fri, Jun 07, 2013 at 08:58:12PM -0500, Suman Anna wrote:
> The mailbox hardware (in OMAP) uses a queued mailbox interrupt
> mechanism that provides a communication channel between processors
> through a set of registers and their associated interrupt signals
> by sending and receiving messages.
> 
> The OMAP mailbox framework/driver code is moved to be under
> drivers/mailbox, in preparation for adapting to a common mailbox
> driver framework. This allows the build for OMAP mailbox to be
> enabled (it was disabled during the multi-platform support).
> 
> As part of the migration from plat and mach code:
> - Kconfig symbols have been renamed to build OMAP1 or OMAP2+ drivers.
> - mailbox.h under plat-omap/plat/include has been split into a public
>   and private header files. The public header has only the API related
>   functions and types.
> - The module name mailbox.ko from plat-omap is changed to
>   omap-mailbox.ko
> - The module name mailbox_mach.ko from mach-omapX is changed as
> mailbox_omap1.ko for OMAP1
> mailbox_omap2.ko for OMAP2+
> 
> Cc: Tony Lindgren 
> Signed-off-by: Omar Ramirez Luna 
> Signed-off-by: Suman Anna 

Staging part:
Acked-by: Greg Kroah-Hartman 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/7] mailbox/omap: move the OMAP mailbox framework to drivers

2013-06-07 Thread Suman Anna
The mailbox hardware (in OMAP) uses a queued mailbox interrupt
mechanism that provides a communication channel between processors
through a set of registers and their associated interrupt signals
by sending and receiving messages.

The OMAP mailbox framework/driver code is moved to be under
drivers/mailbox, in preparation for adapting to a common mailbox
driver framework. This allows the build for OMAP mailbox to be
enabled (it was disabled during the multi-platform support).

As part of the migration from plat and mach code:
- Kconfig symbols have been renamed to build OMAP1 or OMAP2+ drivers.
- mailbox.h under plat-omap/plat/include has been split into a public
  and private header files. The public header has only the API related
  functions and types.
- The module name mailbox.ko from plat-omap is changed to
  omap-mailbox.ko
- The module name mailbox_mach.ko from mach-omapX is changed as
mailbox_omap1.ko for OMAP1
mailbox_omap2.ko for OMAP2+

Cc: Tony Lindgren 
Signed-off-by: Omar Ramirez Luna 
Signed-off-by: Suman Anna 


This is similar to Omar's earlier patches for moving the code, but is
revised to prepare for adapting to a mailbox framework different from
the OMAP-derived mailbox framework.
---
 arch/arm/configs/omap1_defconfig   |  3 +-
 arch/arm/mach-omap1/Makefile   |  4 --
 arch/arm/mach-omap2/Makefile   |  3 -
 arch/arm/mach-omap2/devices.c  |  4 +-
 arch/arm/plat-omap/Kconfig | 16 -
 arch/arm/plat-omap/Makefile|  3 -
 drivers/mailbox/Kconfig| 34 +++
 drivers/mailbox/Makefile   |  6 ++
 .../mailbox.c => drivers/mailbox/mailbox-omap1.c   |  3 +-
 .../mailbox.c => drivers/mailbox/mailbox-omap2.c   |  8 +--
 .../mailbox.c => drivers/mailbox/omap-mailbox.c| 36 +++-
 .../plat/mailbox.h => drivers/mailbox/omap-mbox.h  | 68 +-
 drivers/remoteproc/Kconfig |  3 +-
 drivers/remoteproc/omap_remoteproc.c   |  2 +-
 drivers/staging/tidspbridge/Kconfig|  3 +-
 .../tidspbridge/include/dspbridge/host_os.h|  2 +-
 include/linux/omap-mailbox.h   | 29 +
 17 files changed, 135 insertions(+), 92 deletions(-)
 rename arch/arm/mach-omap1/mailbox.c => drivers/mailbox/mailbox-omap1.c (99%)
 rename arch/arm/mach-omap2/mailbox.c => drivers/mailbox/mailbox-omap2.c (98%)
 rename arch/arm/plat-omap/mailbox.c => drivers/mailbox/omap-mailbox.c (92%)
 rename arch/arm/plat-omap/include/plat/mailbox.h => 
drivers/mailbox/omap-mbox.h (55%)
 create mode 100644 include/linux/omap-mailbox.h

diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
index 9940f7b..d74edba 100644
--- a/arch/arm/configs/omap1_defconfig
+++ b/arch/arm/configs/omap1_defconfig
@@ -26,7 +26,8 @@ CONFIG_ARCH_OMAP=y
 CONFIG_ARCH_OMAP1=y
 CONFIG_OMAP_RESET_CLOCKS=y
 # CONFIG_OMAP_MUX is not set
-CONFIG_OMAP_MBOX_FWK=y
+CONFIG_MAILBOX=y
+CONFIG_OMAP1_MBOX=y
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_DM_TIMER=y
 CONFIG_ARCH_OMAP730=y
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 222d58c..3889b6c 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -19,10 +19,6 @@ obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
 # Power Management
 obj-$(CONFIG_PM) += pm.o sleep.o
 
-# DSP
-obj-$(CONFIG_OMAP_MBOX_FWK)+= mailbox_mach.o
-mailbox_mach-objs  := mailbox.o
-
 i2c-omap-$(CONFIG_I2C_OMAP):= i2c.o
 obj-y  += $(i2c-omap-m) $(i2c-omap-y)
 
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55a9d67..f2d19af 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -203,9 +203,6 @@ obj-$(CONFIG_ARCH_OMAP4)+= 
omap_hwmod_44xx_data.o
 obj-$(CONFIG_OMAP3_EMU)+= emu.o
 obj-$(CONFIG_HW_PERF_EVENTS)   += pmu.o
 
-obj-$(CONFIG_OMAP_MBOX_FWK)+= mailbox_mach.o
-mailbox_mach-objs  := mailbox.o
-
 iommu-$(CONFIG_OMAP_IOMMU) := omap-iommu.o
 obj-y  += $(iommu-m) $(iommu-y)
 
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 4c97a86..73762ac 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -328,7 +328,7 @@ int __init omap4_keyboard_init(struct 
omap4_keypad_platform_data
return 0;
 }
 
-#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
+#if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
 static inline void __init omap_init_mbox(void)
 {
struct omap_hwmod *oh;
@@ -352,7 +352,7 @@ static inline void __init omap_init_mbox(void)
 }
 #else
 static inline void omap_init_mbox(void) { }
-#endif /* CONFIG_OMAP_MBOX_FWK */
+#endif /* CONFIG_OMAP2PLUS_MBOX */