From a6cf912c6047077a6eb860ed8dbfa342376ee395 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Jan 2013 11:24:19 -0800 Subject: ARM: OMAP: Fix i2c cmdline initcall for multiplatform We only want this initcall to run when the kernel is booted on omap SoCs. Fix the issue by initializing the the initcall from separately for omap1 and omap2+. This fixes the issue for omap2+ multiplatform configs as we are using omap_subsys_initcall there. Tested-by: Ezequiel Garcia Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/i2c.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-omap1') diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index faca808cb3d9..7f5761cffd2e 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c @@ -91,3 +91,9 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata, return platform_device_register(pdev); } + +static int __init omap_i2c_cmdline(void) +{ + return omap_register_i2c_bus_cmdline(); +} +subsys_initcall(omap_i2c_cmdline); -- 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-omap1/dma.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-omap1') diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index e190611e4b46..1a4e887f028d 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c @@ -24,7 +24,7 @@ #include #include #include - +#include #include #include @@ -270,11 +270,17 @@ static u32 configure_dma_errata(void) return errata; } +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 omap1_system_dma_init(void) { struct omap_system_dma_plat_info *p; struct omap_dma_dev_attr *d; - struct platform_device *pdev; + struct platform_device *pdev, *dma_pdev; int ret; pdev = platform_device_alloc("omap_dma_system", 0); @@ -380,8 +386,16 @@ static int __init omap1_system_dma_init(void) dma_common_ch_start = CPC; dma_common_ch_end = COLOR; + dma_pdev = platform_device_register_full(&omap_dma_dev_info); + if (IS_ERR(dma_pdev)) { + ret = PTR_ERR(dma_pdev); + goto exit_release_pdev; + } + return ret; +exit_release_pdev: + platform_device_del(pdev); exit_release_chan: kfree(d->chan); exit_release_d: -- cgit v1.2.1