From 0a779abe875655625da46b2e45007ebf50d94d52 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 30 Nov 2012 08:41:35 -0800 Subject: [PATCH 1/3] watchdog: OMAP: fixup for ARM multiplatform support Recent changes to the omap_wdt.c removed the dependencies to the core omap code, but forgot to remove mach/hardware.h. We cannot include any plat headers with multiplatform support enabled. cc: Wim Van Sebroeck cc: linux-watchdog@vger.kernel.org Signed-off-by: Tony Lindgren --- drivers/watchdog/omap_wdt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 477a1d47a64c..e5e7069aad93 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -45,8 +45,6 @@ #include #include #include -#include - #include #include "omap_wdt.h" From 6300ebe9fe9a9355060119b83564e81efa5f1fa6 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 30 Nov 2012 08:41:42 -0800 Subject: [PATCH 2/3] ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support We cannot include any plat or mach headers for the multiplatform support. Fix the issue by defining local mcbsp_omap1(). cc: Peter Ujfalusi cc: Liam Girdwood cc: Mark Brown cc: Jaroslav Kysela cc: Takashi Iwai cc: alsa-devel@alsa-project.org Acked-by: Jarkko Nikula Acked-by: Peter Ujfalusi Signed-off-by: Tony Lindgren --- sound/soc/omap/mcbsp.c | 4 +--- sound/soc/omap/mcbsp.h | 6 ++++++ sound/soc/omap/omap-mcbsp.c | 5 ++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index afb8d4f1bedf..a9a243860428 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -28,8 +28,6 @@ #include -#include - #include "mcbsp.h" static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) @@ -612,7 +610,7 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp) * system will refuse to enter idle if the CLKS pin source is not reset * back to internal source. */ - if (!cpu_class_is_omap1()) + if (!mcbsp_omap1()) omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC); spin_lock(&mcbsp->lock); diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h index 49a67259ce5a..a89791c239a5 100644 --- a/sound/soc/omap/mcbsp.h +++ b/sound/soc/omap/mcbsp.h @@ -26,6 +26,12 @@ #include "omap-pcm.h" +#ifdef CONFIG_ARCH_OMAP1 +#define mcbsp_omap1() 1 +#else +#define mcbsp_omap1() 0 +#endif + /* McBSP register numbers. Register address offset = num * reg_step */ enum { /* Common registers */ diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index a6ee15747859..09167609c93e 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -34,7 +34,6 @@ #include #include -#include #include #include "mcbsp.h" #include "omap-mcbsp.h" @@ -512,7 +511,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai, regs->srgr2 |= CLKSM; break; case OMAP_MCBSP_SYSCLK_CLKS_FCLK: - if (cpu_class_is_omap1()) { + if (mcbsp_omap1()) { err = -EINVAL; break; } @@ -520,7 +519,7 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai, MCBSP_CLKS_PRCM_SRC); break; case OMAP_MCBSP_SYSCLK_CLKS_EXT: - if (cpu_class_is_omap1()) { + if (mcbsp_omap1()) { err = 0; break; } From 45c3eb7d3a07eb08d1b5b0f5983a996d41610b84 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 30 Nov 2012 08:41:50 -0800 Subject: [PATCH 3/3] ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on earlier discussions[1] we attempted to find a suitable location for the omap DMA header in commit 2b6c4e73 (ARM: OMAP: DMA: Move plat/dma.h to plat-omap/dma-omap.h) until the conversion to dmaengine is complete. Unfortunately that was before I was able to try to test compile of the ARM multiplatform builds for omap2+, and the end result was not very good. So I'm creating yet another all over the place patch to cut the last dependency for building omap2+ for ARM multiplatform. After this, we have finally removed the driver dependencies to the arch/arm code, except for few drivers that are being worked on. The other option was to make the path to work, but we'd have to add some new header directory to for multiplatform builds. Or we would have to manually include arch/arm/plat-omap/include again from arch/arm/Makefile for omap2+. Neither of these alternatives sound appealing as they will likely lead addition of various other headers exposed to the drivers, which we want to avoid for the multiplatform kernels. Since we already have a minimal include/linux/omap-dma.h, let's just use that instead and add a note to it to not use the custom omap DMA functions any longer where possible. Note that converting omap DMA to dmaengine depends on dmaengine supporting automatically incrementing the FIFO address at the device end, and converting all the remaining legacy drivers. So it's going to be few more merge windows. [1] https://patchwork.kernel.org/patch/1519591/# cc: Russell King cc: Kevin Hilman cc: "Benoît Cousson" cc: Herbert Xu cc: "David S. Miller" cc: Vinod Koul cc: Dan Williams cc: Mauro Carvalho Chehab cc: Laurent Pinchart cc: Guennadi Liakhovetski cc: David Woodhouse cc: Kyungmin Park cc: Greg Kroah-Hartman cc: Tomi Valkeinen cc: Florian Tobias Schandinat cc: Hans Verkuil cc: Vaibhav Hiremath cc: Lokesh Vutla cc: Rusty Russell cc: Artem Bityutskiy cc: Afzal Mohammed cc: linux-crypto@vger.kernel.org cc: linux-media@vger.kernel.org cc: linux-mtd@lists.infradead.org cc: linux-usb@vger.kernel.org cc: linux-fbdev@vger.kernel.org Acked-by: Felipe Balbi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-palmte.c | 2 +- arch/arm/mach-omap1/board-palmtt.c | 2 +- arch/arm/mach-omap1/board-palmz71.c | 2 +- arch/arm/mach-omap1/board-sx1.c | 2 +- arch/arm/mach-omap1/dma.c | 2 +- arch/arm/mach-omap1/io.c | 2 +- arch/arm/mach-omap1/lcd_dma.c | 2 +- arch/arm/mach-omap1/mcbsp.c | 2 +- arch/arm/mach-omap1/pm.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-h4.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/devices.c | 2 +- arch/arm/mach-omap2/dma.c | 2 +- arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/mcbsp.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 2 +- arch/arm/mach-omap2/omap_hwmod_2430_data.c | 2 +- .../omap_hwmod_2xxx_3xxx_ipblock_data.c | 3 +- .../mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 2 +- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 2 +- arch/arm/mach-omap2/pm24xx.c | 2 +- arch/arm/mach-omap2/pm34xx.c | 3 +- arch/arm/mach-omap2/serial.c | 2 +- arch/arm/plat-omap/dma.c | 2 +- .../plat-omap/include/plat-omap/dma-omap.h | 377 ------------------ drivers/crypto/omap-aes.c | 2 +- drivers/crypto/omap-sham.c | 2 +- drivers/dma/omap-dma.c | 2 - drivers/media/platform/omap/omap_vout.c | 2 +- drivers/media/platform/omap/omap_vout_vrfb.c | 2 +- drivers/media/platform/omap3isp/ispstat.h | 2 +- .../media/platform/soc_camera/omap1_camera.c | 2 +- drivers/mtd/nand/omap2.c | 1 - drivers/mtd/onenand/omap2.c | 2 +- drivers/usb/gadget/omap_udc.c | 2 +- drivers/usb/musb/tusb6010_omap.c | 2 +- drivers/video/omap/lcdc.c | 2 +- drivers/video/omap/omapfb_main.c | 2 +- drivers/video/omap/sossi.c | 2 +- include/linux/omap-dma.h | 366 +++++++++++++++++ 45 files changed, 408 insertions(+), 422 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat-omap/dma-omap.h diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 9134b646f01b..dcf364d1a8b1 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index bf213d1d8075..b3fcdedb44ca 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 584b6fab894b..c33dceb46607 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index fbc986bfe69e..2948b0ee4be8 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 60d917a93763..7a05895c0be3 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 1ebc7e08d6e5..20ed52ae1714 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index 978aed85d328..e190611e4b46 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 5a3b80617a11..499b8accb83d 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include "iomap.h" #include "common.h" diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index 7ed8c1857d56..77924be37d41 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index c6d8fdf92e9c..b0d4723c9a90 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include "soc.h" #include diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 66d663a6ef3a..7a7690ab6cb8 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 6601754f9512..7b201546834d 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -31,7 +31,7 @@ #include #include "common.h" -#include +#include #include