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/mach-armadillo5x0.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/mach-armadillo5x0.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-armadillo5x0.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index ace0c4c3b662..8e614b10dd5c 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -48,12 +48,9 @@ | |||
48 | 48 | ||
49 | #include <mach/common.h> | 49 | #include <mach/common.h> |
50 | #include <mach/iomux-mx3.h> | 50 | #include <mach/iomux-mx3.h> |
51 | #include <mach/ipu.h> | ||
52 | #include <mach/mx3fb.h> | ||
53 | #include <mach/ulpi.h> | 51 | #include <mach/ulpi.h> |
54 | 52 | ||
55 | #include "devices-imx31.h" | 53 | #include "devices-imx31.h" |
56 | #include "devices.h" | ||
57 | #include "crm_regs.h" | 54 | #include "crm_regs.h" |
58 | 55 | ||
59 | static int armadillo5x0_pins[] = { | 56 | static int armadillo5x0_pins[] = { |
@@ -374,12 +371,11 @@ static const struct fb_videomode fb_modedb[] = { | |||
374 | }, | 371 | }, |
375 | }; | 372 | }; |
376 | 373 | ||
377 | static struct ipu_platform_data mx3_ipu_data = { | 374 | static const struct ipu_platform_data mx3_ipu_data __initconst = { |
378 | .irq_base = MXC_IPU_IRQ_START, | 375 | .irq_base = MXC_IPU_IRQ_START, |
379 | }; | 376 | }; |
380 | 377 | ||
381 | static struct mx3fb_platform_data mx3fb_pdata = { | 378 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
382 | .dma_dev = &mx3_ipu.dev, | ||
383 | .name = "CRT-VGA", | 379 | .name = "CRT-VGA", |
384 | .mode = fb_modedb, | 380 | .mode = fb_modedb, |
385 | .num_modes = ARRAY_SIZE(fb_modedb), | 381 | .num_modes = ARRAY_SIZE(fb_modedb), |
@@ -512,8 +508,8 @@ static void __init armadillo5x0_init(void) | |||
512 | imx31_add_mxc_mmc(0, &sdhc_pdata); | 508 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
513 | 509 | ||
514 | /* Register FB */ | 510 | /* Register FB */ |
515 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 511 | imx31_add_ipu_core(&mx3_ipu_data); |
516 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 512 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
517 | 513 | ||
518 | /* Register NOR Flash */ | 514 | /* Register NOR Flash */ |
519 | mxc_register_device(&armadillo5x0_nor_flash, | 515 | mxc_register_device(&armadillo5x0_nor_flash, |