diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx21ads.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx21ads.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 3e7401fca76c..ed22e3fe6ec8 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -38,7 +38,7 @@ | |||
38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | 38 | (MX21ADS_MMIO_BASE_ADDR + (offset)) |
39 | 39 | ||
40 | #define MX21ADS_CS8900A_MMIO_SIZE 0x200000 | 40 | #define MX21ADS_CS8900A_MMIO_SIZE 0x200000 |
41 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) | 41 | #define MX21ADS_CS8900A_IRQ_GPIO IMX_GPIO_NR(5, 11) |
42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | 42 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) |
43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | 43 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) |
44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | 44 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) |
@@ -159,9 +159,10 @@ static struct platform_device mx21ads_nor_mtd_device = { | |||
159 | .resource = &mx21ads_flash_resource, | 159 | .resource = &mx21ads_flash_resource, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static const struct resource mx21ads_cs8900_resources[] __initconst = { | 162 | static struct resource mx21ads_cs8900_resources[] __initdata = { |
163 | DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), | 163 | DEFINE_RES_MEM(MX21_CS1_BASE_ADDR, MX21ADS_CS8900A_MMIO_SIZE), |
164 | DEFINE_RES_IRQ(MX21ADS_CS8900A_IRQ), | 164 | /* irq number is run-time assigned */ |
165 | DEFINE_RES_IRQ(-1), | ||
165 | }; | 166 | }; |
166 | 167 | ||
167 | static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { | 168 | static const struct platform_device_info mx21ads_cs8900_devinfo __initconst = { |
@@ -241,13 +242,13 @@ static int mx21ads_sdhc_get_ro(struct device *dev) | |||
241 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, | 242 | static int mx21ads_sdhc_init(struct device *dev, irq_handler_t detect_irq, |
242 | void *data) | 243 | void *data) |
243 | { | 244 | { |
244 | return request_irq(IRQ_GPIOD(25), detect_irq, | 245 | return request_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), detect_irq, |
245 | IRQF_TRIGGER_FALLING, "mmc-detect", data); | 246 | IRQF_TRIGGER_FALLING, "mmc-detect", data); |
246 | } | 247 | } |
247 | 248 | ||
248 | static void mx21ads_sdhc_exit(struct device *dev, void *data) | 249 | static void mx21ads_sdhc_exit(struct device *dev, void *data) |
249 | { | 250 | { |
250 | free_irq(IRQ_GPIOD(25), data); | 251 | free_irq(gpio_to_irq(IMX_GPIO_NR(4, 25)), data); |
251 | } | 252 | } |
252 | 253 | ||
253 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { | 254 | static const struct imxmmc_platform_data mx21ads_sdhc_pdata __initconst = { |
@@ -304,6 +305,11 @@ static void __init mx21ads_board_init(void) | |||
304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 305 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
305 | 306 | ||
306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 307 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
308 | |||
309 | mx21ads_cs8900_resources[1].start = | ||
310 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | ||
311 | mx21ads_cs8900_resources[1].end = | ||
312 | gpio_to_irq(MX21ADS_CS8900A_IRQ_GPIO); | ||
307 | platform_device_register_full(&mx21ads_cs8900_devinfo); | 313 | platform_device_register_full(&mx21ads_cs8900_devinfo); |
308 | } | 314 | } |
309 | 315 | ||