diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-mx31_3ds.c')
-rw-r--r-- | arch/arm/mach-imx/mach-mx31_3ds.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 4eafdf275ea2..8915f937b7d5 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c | |||
@@ -44,9 +44,6 @@ | |||
44 | 44 | ||
45 | #include "devices-imx31.h" | 45 | #include "devices-imx31.h" |
46 | 46 | ||
47 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
48 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
49 | |||
50 | static int mx31_3ds_pins[] = { | 47 | static int mx31_3ds_pins[] = { |
51 | /* UART1 */ | 48 | /* UART1 */ |
52 | MX31_PIN_CTS1__CTS1, | 49 | MX31_PIN_CTS1__CTS1, |
@@ -277,10 +274,6 @@ static const struct fb_videomode fb_modedb[] = { | |||
277 | }, | 274 | }, |
278 | }; | 275 | }; |
279 | 276 | ||
280 | static struct ipu_platform_data mx3_ipu_data = { | ||
281 | .irq_base = MXC_IPU_IRQ_START, | ||
282 | }; | ||
283 | |||
284 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { | 277 | static struct mx3fb_platform_data mx3fb_pdata __initdata = { |
285 | .name = "Epson-VGA", | 278 | .name = "Epson-VGA", |
286 | .mode = fb_modedb, | 279 | .mode = fb_modedb, |
@@ -317,7 +310,7 @@ static int mx31_3ds_sdhc1_init(struct device *dev, | |||
317 | return ret; | 310 | return ret; |
318 | } | 311 | } |
319 | 312 | ||
320 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 313 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), |
321 | detect_irq, IRQF_DISABLED | | 314 | detect_irq, IRQF_DISABLED | |
322 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | 315 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, |
323 | "sdhc1-detect", data); | 316 | "sdhc1-detect", data); |
@@ -336,7 +329,7 @@ gpio_free: | |||
336 | 329 | ||
337 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) | 330 | static void mx31_3ds_sdhc1_exit(struct device *dev, void *data) |
338 | { | 331 | { |
339 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), data); | 332 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)), data); |
340 | gpio_free_array(mx31_3ds_sdhc1_gpios, | 333 | gpio_free_array(mx31_3ds_sdhc1_gpios, |
341 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); | 334 | ARRAY_SIZE(mx31_3ds_sdhc1_gpios)); |
342 | } | 335 | } |
@@ -539,7 +532,7 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
539 | .bus_num = 1, | 532 | .bus_num = 1, |
540 | .chip_select = 1, /* SS2 */ | 533 | .chip_select = 1, /* SS2 */ |
541 | .platform_data = &mc13783_pdata, | 534 | .platform_data = &mc13783_pdata, |
542 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | 535 | /* irq number is run-time assigned */ |
543 | .mode = SPI_CS_HIGH, | 536 | .mode = SPI_CS_HIGH, |
544 | }, { | 537 | }, { |
545 | .modalias = "l4f00242t03", | 538 | .modalias = "l4f00242t03", |
@@ -671,18 +664,18 @@ static const struct fsl_usb2_platform_data usbotg_pdata __initconst = { | |||
671 | .phy_mode = FSL_USB2_PHY_ULPI, | 664 | .phy_mode = FSL_USB2_PHY_ULPI, |
672 | }; | 665 | }; |
673 | 666 | ||
674 | static int otg_mode_host; | 667 | static bool otg_mode_host __initdata; |
675 | 668 | ||
676 | static int __init mx31_3ds_otg_mode(char *options) | 669 | static int __init mx31_3ds_otg_mode(char *options) |
677 | { | 670 | { |
678 | if (!strcmp(options, "host")) | 671 | if (!strcmp(options, "host")) |
679 | otg_mode_host = 1; | 672 | otg_mode_host = true; |
680 | else if (!strcmp(options, "device")) | 673 | else if (!strcmp(options, "device")) |
681 | otg_mode_host = 0; | 674 | otg_mode_host = false; |
682 | else | 675 | else |
683 | pr_info("otg_mode neither \"host\" nor \"device\". " | 676 | pr_info("otg_mode neither \"host\" nor \"device\". " |
684 | "Defaulting to device\n"); | 677 | "Defaulting to device\n"); |
685 | return 0; | 678 | return 1; |
686 | } | 679 | } |
687 | __setup("otg_mode=", mx31_3ds_otg_mode); | 680 | __setup("otg_mode=", mx31_3ds_otg_mode); |
688 | 681 | ||
@@ -714,6 +707,7 @@ static void __init mx31_3ds_init(void) | |||
714 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); | 707 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
715 | 708 | ||
716 | imx31_add_spi_imx1(&spi1_pdata); | 709 | imx31_add_spi_imx1(&spi1_pdata); |
710 | mx31_3ds_spi_devs[0].irq = gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | ||
717 | spi_register_board_info(mx31_3ds_spi_devs, | 711 | spi_register_board_info(mx31_3ds_spi_devs, |
718 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 712 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
719 | 713 | ||
@@ -736,15 +730,15 @@ static void __init mx31_3ds_init(void) | |||
736 | if (!otg_mode_host) | 730 | if (!otg_mode_host) |
737 | imx31_add_fsl_usb2_udc(&usbotg_pdata); | 731 | imx31_add_fsl_usb2_udc(&usbotg_pdata); |
738 | 732 | ||
739 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 733 | if (mxc_expio_init(MX31_CS5_BASE_ADDR, IOMUX_TO_GPIO(MX31_PIN_GPIO1_1))) |
740 | printk(KERN_WARNING "Init of the debug board failed, all " | 734 | printk(KERN_WARNING "Init of the debug board failed, all " |
741 | "devices on the debug board are unusable.\n"); | 735 | "devices on the debug board are unusable.\n"); |
742 | imx31_add_imx2_wdt(NULL); | 736 | imx31_add_imx2_wdt(); |
743 | imx31_add_imx_i2c0(&mx31_3ds_i2c0_data); | 737 | imx31_add_imx_i2c0(&mx31_3ds_i2c0_data); |
744 | imx31_add_mxc_mmc(0, &sdhc1_pdata); | 738 | imx31_add_mxc_mmc(0, &sdhc1_pdata); |
745 | 739 | ||
746 | imx31_add_spi_imx0(&spi0_pdata); | 740 | imx31_add_spi_imx0(&spi0_pdata); |
747 | imx31_add_ipu_core(&mx3_ipu_data); | 741 | imx31_add_ipu_core(); |
748 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 742 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
749 | 743 | ||
750 | /* CSI */ | 744 | /* CSI */ |