diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx21ads.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx21ads.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index e1282e9f50ff..0a372577c2ac 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -24,13 +24,10 @@ | |||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <mach/imxfb.h> | ||
28 | #include <mach/iomux-mx21.h> | 27 | #include <mach/iomux-mx21.h> |
29 | #include <mach/mxc_nand.h> | 28 | #include <mach/mxc_nand.h> |
30 | #include <mach/mmc.h> | ||
31 | 29 | ||
32 | #include "devices-imx21.h" | 30 | #include "devices-imx21.h" |
33 | #include "devices.h" | ||
34 | 31 | ||
35 | /* | 32 | /* |
36 | * Memory-mapped I/O on MX21ADS base board | 33 | * Memory-mapped I/O on MX21ADS base board |
@@ -213,7 +210,7 @@ static struct imx_fb_videomode mx21ads_modes[] = { | |||
213 | }, | 210 | }, |
214 | }; | 211 | }; |
215 | 212 | ||
216 | static struct imx_fb_platform_data mx21ads_fb_data = { | 213 | static const struct imx_fb_platform_data mx21ads_fb_data __initconst = { |
217 | .mode = mx21ads_modes, | 214 | .mode = mx21ads_modes, |
218 | .num_modes = ARRAY_SIZE(mx21ads_modes), | 215 | .num_modes = ARRAY_SIZE(mx21ads_modes), |
219 | 216 | ||
@@ -233,15 +230,8 @@ static int mx21ads_sdhc_get_ro(struct device *dev) | |||
233 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, | 230 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, |
234 | void *data) | 231 | void *data) |
235 | { | 232 | { |
236 | int ret; | 233 | return request_irq(IRQ_GPIOD(25), detect_irq, |
237 | |||
238 | ret = request_irq(IRQ_GPIOD(25), detect_irq, | ||
239 | IRQF_TRIGGER_FALLING, "mmc-detect", data); | 234 | IRQF_TRIGGER_FALLING, "mmc-detect", data); |
240 | if (ret) | ||
241 | goto out; | ||
242 | return 0; | ||
243 | out: | ||
244 | return ret; | ||
245 | } | 235 | } |
246 | 236 | ||
247 | static void mx21ads_sdhc_exit(struct device *dev, void *data) | 237 | static void mx21ads_sdhc_exit(struct device *dev, void *data) |
@@ -249,7 +239,7 @@ static void mx21ads_sdhc_exit(struct device *dev, void *data) | |||
249 | free_irq(IRQ_GPIOD(25), data); | 239 | free_irq(IRQ_GPIOD(25), data); |
250 | } | 240 | } |
251 | 241 | ||
252 | static struct imxmmc_platform_data mx21ads_sdhc_pdata = { | 242 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { |
253 | .ocr_avail = MMC_VDD_29_30 | MMC_VDD_30_31, /* 3.0V */ | 243 | .ocr_avail = MMC_VDD_29_30 | MMC_VDD_30_31, /* 3.0V */ |
254 | .get_ro = mx21ads_sdhc_get_ro, | 244 | .get_ro = mx21ads_sdhc_get_ro, |
255 | .init = mx21ads_sdhc_init, | 245 | .init = mx21ads_sdhc_init, |
@@ -296,8 +286,8 @@ static void __init mx21ads_board_init(void) | |||
296 | imx21_add_imx_uart0(&uart_pdata_rts); | 286 | imx21_add_imx_uart0(&uart_pdata_rts); |
297 | imx21_add_imx_uart2(&uart_pdata_norts); | 287 | imx21_add_imx_uart2(&uart_pdata_norts); |
298 | imx21_add_imx_uart3(&uart_pdata_rts); | 288 | imx21_add_imx_uart3(&uart_pdata_rts); |
299 | mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); | 289 | imx21_add_imx_fb(&mx21ads_fb_data); |
300 | mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); | 290 | imx21_add_mxc_mmc(0, &mx21ads_sdhc_pdata); |
301 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 291 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
302 | 292 | ||
303 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 293 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |