aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-mx27_3ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-mx27_3ds.c')
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c15
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
51static const int mx27pdk_pins[] __initconst = { 52static const int mx27pdk_pins[] __initconst = {
52 /* UART1 */ 53 /* UART1 */
@@ -135,13 +136,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = {
135static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, 136static 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
142static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) 143static 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
147static const struct imxmmc_platform_data sdhc1_pdata __initconst = { 148static 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 */
264static int spi2_internal_chipselect[] = {SPI2_SS0}; 265static int spi2_chipselect[] = {SPI2_SS0};
265 266
266static const struct spi_imx_master spi2_pdata __initconst = { 267static 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
271static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { 272static 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};