From afa77ef30ead4865ce2c0c1c55054d45521ce1c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 3 Mar 2011 21:32:02 +0100 Subject: ARM: mx3: dynamically allocate "ipu-core" devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... together with the related devices "mx3_camera" and "mx3_sdc_fb". "mx3_camera" doesn't fit the scheme of the other devices that just are allocated and registered in a single function because it needs additional care to get some dmaable memory. So currently imx31_alloc_mx3_camera duplicates most of imx_add_platform_device_dmamask, but I'm not sure it's worth to split the latter to be able to reuse more code. This gets rid of mach-mx3/devices.[ch] and so several files need to be adapted not to #include devices.h anymore. LAKML-Reference: 1299271882-2130-5-git-send-email-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/mach-mx3/mx31lilly-db.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-mx3/mx31lilly-db.c') diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c index 8f1a38ebf5c8..e70f4527c918 100644 --- a/arch/arm/mach-mx3/mx31lilly-db.c +++ b/arch/arm/mach-mx3/mx31lilly-db.c @@ -34,11 +34,8 @@ #include #include #include -#include -#include #include "devices-imx31.h" -#include "devices.h" /* * This file contains board-specific initialization routines for the @@ -164,7 +161,7 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = { }; /* Framebuffer support */ -static struct ipu_platform_data ipu_data __initdata = { +static const struct ipu_platform_data ipu_data __initconst = { .irq_base = MXC_IPU_IRQ_START, }; @@ -187,7 +184,6 @@ static const struct fb_videomode fb_modedb = { }; static struct mx3fb_platform_data fb_pdata __initdata = { - .dma_dev = &mx3_ipu.dev, .name = "CRT-VGA", .mode = &fb_modedb, .num_modes = 1, @@ -202,8 +198,8 @@ static void __init mx31lilly_init_fb(void) return; } - mxc_register_device(&mx3_ipu, &ipu_data); - mxc_register_device(&mx3_fb, &fb_pdata); + imx31_add_ipu_core(&ipu_data); + imx31_add_mx3_sdc_fb(&fb_pdata); gpio_direction_output(LCD_VCC_EN_GPIO, 1); } -- cgit v1.2.3