diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-03-03 15:32:02 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-05-19 07:11:20 -0400 |
commit | afa77ef30ead4865ce2c0c1c55054d45521ce1c7 (patch) | |
tree | 87a455605b7d0ae9685e71ae7fd48a1a0d87d379 /arch/arm/mach-mx3/mx31lilly-db.c | |
parent | 031e912741746e4350204bb0436590ca0e993a7d (diff) |
ARM: mx3: dynamically allocate "ipu-core" devices
... 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 <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mx31lilly-db.c')
-rw-r--r-- | arch/arm/mach-mx3/mx31lilly-db.c | 10 |
1 files changed, 3 insertions, 7 deletions
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 @@ | |||
34 | #include <mach/common.h> | 34 | #include <mach/common.h> |
35 | #include <mach/iomux-mx3.h> | 35 | #include <mach/iomux-mx3.h> |
36 | #include <mach/board-mx31lilly.h> | 36 | #include <mach/board-mx31lilly.h> |
37 | #include <mach/mx3fb.h> | ||
38 | #include <mach/ipu.h> | ||
39 | 37 | ||
40 | #include "devices-imx31.h" | 38 | #include "devices-imx31.h" |
41 | #include "devices.h" | ||
42 | 39 | ||
43 | /* | 40 | /* |
44 | * This file contains board-specific initialization routines for the | 41 | * This file contains board-specific initialization routines for the |
@@ -164,7 +161,7 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = { | |||
164 | }; | 161 | }; |
165 | 162 | ||
166 | /* Framebuffer support */ | 163 | /* Framebuffer support */ |
167 | static struct ipu_platform_data ipu_data __initdata = { | 164 | static const struct ipu_platform_data ipu_data __initconst = { |
168 | .irq_base = MXC_IPU_IRQ_START, | 165 | .irq_base = MXC_IPU_IRQ_START, |
169 | }; | 166 | }; |
170 | 167 | ||
@@ -187,7 +184,6 @@ static const struct fb_videomode fb_modedb = { | |||
187 | }; | 184 | }; |
188 | 185 | ||
189 | static struct mx3fb_platform_data fb_pdata __initdata = { | 186 | static struct mx3fb_platform_data fb_pdata __initdata = { |
190 | .dma_dev = &mx3_ipu.dev, | ||
191 | .name = "CRT-VGA", | 187 | .name = "CRT-VGA", |
192 | .mode = &fb_modedb, | 188 | .mode = &fb_modedb, |
193 | .num_modes = 1, | 189 | .num_modes = 1, |
@@ -202,8 +198,8 @@ static void __init mx31lilly_init_fb(void) | |||
202 | return; | 198 | return; |
203 | } | 199 | } |
204 | 200 | ||
205 | mxc_register_device(&mx3_ipu, &ipu_data); | 201 | imx31_add_ipu_core(&ipu_data); |
206 | mxc_register_device(&mx3_fb, &fb_pdata); | 202 | imx31_add_mx3_sdc_fb(&fb_pdata); |
207 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); | 203 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); |
208 | } | 204 | } |
209 | 205 | ||