From b76c8b19b082c3fc84725de0d3ba5ee1f571c0ae Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Jan 2013 11:24:18 -0800 Subject: ARM: OMAP2+: Use omap initcalls This way the initcalls don't run on other SoCs on multiplatform kernels. Otherwise we'll get something like this when booting on vexpress: omap_hwmod: _ensure_mpu_hwmod_is_setup: MPU initiator hwmod mpu not yet registered ... WARNING: at arch/arm/mach-omap2/pm.c:82 _init_omap_device+0x74/0x94() _init_omap_device: could not find omap_hwmod for mpu ... omap-dma-engine omap-dma-engine: OMAP DMA engine driver ... Tested-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/dma.c') diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index 612b98249873..e034ab69a046 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -293,4 +293,4 @@ static int __init omap2_system_dma_init(void) return omap_hwmod_for_each_by_class("dma", omap2_system_dma_init_dev, NULL); } -arch_initcall(omap2_system_dma_init); +omap_arch_initcall(omap2_system_dma_init); -- cgit v1.2.1 From be1f94812c2cc0aaf696d39fe23104763ea52b5b Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Jan 2013 11:24:19 -0800 Subject: ARM: OMAP: Fix dmaengine init for multiplatform Otherwise omap dmaengine will initialized when booted on other SoCs. Fix this by initializing the platform device in arch/arm/*omap*/dma.c instead. Cc: Russell King Cc: Dan Williams Cc: Vinod Koul Tested-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/dma.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-omap2/dma.c') diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index e034ab69a046..5cd8d7668bec 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -27,7 +27,7 @@ #include #include #include - +#include #include #include "soc.h" @@ -288,9 +288,26 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) return 0; } +static const struct platform_device_info omap_dma_dev_info = { + .name = "omap-dma-engine", + .id = -1, + .dma_mask = DMA_BIT_MASK(32), +}; + static int __init omap2_system_dma_init(void) { - return omap_hwmod_for_each_by_class("dma", + struct platform_device *pdev; + int res; + + res = omap_hwmod_for_each_by_class("dma", omap2_system_dma_init_dev, NULL); + if (res) + return res; + + pdev = platform_device_register_full(&omap_dma_dev_info); + if (IS_ERR(pdev)) + return PTR_ERR(pdev); + + return res; } omap_arch_initcall(omap2_system_dma_init); -- cgit v1.2.1