diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx27_3ds.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx27_3ds.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index eb663102376f..b31d4129e10e 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) | 47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) | 48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) |
49 | #define PMIC_INT IMX_GPIO_NR(3, 14) | 49 | #define PMIC_INT IMX_GPIO_NR(3, 14) |
50 | #define SD1_CD IMX_GPIO_NR(2, 26) | ||
50 | 51 | ||
51 | static const int mx27pdk_pins[] __initconst = { | 52 | static const int mx27pdk_pins[] __initconst = { |
52 | /* UART1 */ | 53 | /* UART1 */ |
@@ -135,13 +136,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = { | |||
135 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 136 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
136 | void *data) | 137 | void *data) |
137 | { | 138 | { |
138 | return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING | | 139 | return request_irq(gpio_to_irq(SD1_CD), detect_irq, |
139 | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); | 140 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); |
140 | } | 141 | } |
141 | 142 | ||
142 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) | 143 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) |
143 | { | 144 | { |
144 | free_irq(IRQ_GPIOB(26), data); | 145 | free_irq(gpio_to_irq(SD1_CD), data); |
145 | } | 146 | } |
146 | 147 | ||
147 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 148 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
@@ -261,11 +262,11 @@ static struct mc13xxx_platform_data mc13783_pdata = { | |||
261 | }; | 262 | }; |
262 | 263 | ||
263 | /* SPI */ | 264 | /* SPI */ |
264 | static int spi2_internal_chipselect[] = {SPI2_SS0}; | 265 | static int spi2_chipselect[] = {SPI2_SS0}; |
265 | 266 | ||
266 | static const struct spi_imx_master spi2_pdata __initconst = { | 267 | static const struct spi_imx_master spi2_pdata __initconst = { |
267 | .chipselect = spi2_internal_chipselect, | 268 | .chipselect = spi2_chipselect, |
268 | .num_chipselect = ARRAY_SIZE(spi2_internal_chipselect), | 269 | .num_chipselect = ARRAY_SIZE(spi2_chipselect), |
269 | }; | 270 | }; |
270 | 271 | ||
271 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | 272 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { |
@@ -275,7 +276,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
275 | .bus_num = 1, | 276 | .bus_num = 1, |
276 | .chip_select = 0, /* SS0 */ | 277 | .chip_select = 0, /* SS0 */ |
277 | .platform_data = &mc13783_pdata, | 278 | .platform_data = &mc13783_pdata, |
278 | .irq = IRQ_GPIOC(14), | 279 | .irq = gpio_to_irq(PMIC_INT), |
279 | .mode = SPI_CS_HIGH, | 280 | .mode = SPI_CS_HIGH, |
280 | }, | 281 | }, |
281 | }; | 282 | }; |