diff options
Diffstat (limited to 'arch/arm/mach-imx/mach-pcm037.c')
-rw-r--r-- | arch/arm/mach-imx/mach-pcm037.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 0a40004154f2..e3c45130fb3c 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -225,8 +225,7 @@ static struct resource smsc911x_resources[] = { | |||
225 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | 225 | .end = MX31_CS1_BASE_ADDR + 0x300 + SZ_64K - 1, |
226 | .flags = IORESOURCE_MEM, | 226 | .flags = IORESOURCE_MEM, |
227 | }, { | 227 | }, { |
228 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | 228 | /* irq number is run-time assigned */ |
229 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
230 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 229 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
231 | }, | 230 | }, |
232 | }; | 231 | }; |
@@ -371,7 +370,7 @@ static int pcm970_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | |||
371 | gpio_direction_input(SDHC1_GPIO_WP); | 370 | gpio_direction_input(SDHC1_GPIO_WP); |
372 | #endif | 371 | #endif |
373 | 372 | ||
374 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), detect_irq, | 373 | ret = request_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SCK6)), detect_irq, |
375 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | 374 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, |
376 | "sdhc-detect", data); | 375 | "sdhc-detect", data); |
377 | if (ret) | 376 | if (ret) |
@@ -391,7 +390,7 @@ err_gpio_free: | |||
391 | 390 | ||
392 | static void pcm970_sdhc1_exit(struct device *dev, void *data) | 391 | static void pcm970_sdhc1_exit(struct device *dev, void *data) |
393 | { | 392 | { |
394 | free_irq(IOMUX_TO_IRQ(MX31_PIN_SCK6), data); | 393 | free_irq(gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_SCK6)), data); |
395 | gpio_free(SDHC1_GPIO_DET); | 394 | gpio_free(SDHC1_GPIO_DET); |
396 | gpio_free(SDHC1_GPIO_WP); | 395 | gpio_free(SDHC1_GPIO_WP); |
397 | } | 396 | } |
@@ -442,10 +441,6 @@ static struct platform_device *devices[] __initdata = { | |||
442 | &pcm037_mt9v022, | 441 | &pcm037_mt9v022, |
443 | }; | 442 | }; |
444 | 443 | ||
445 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | ||
446 | .irq_base = MXC_IPU_IRQ_START, | ||
447 | }; | ||
448 | |||
449 | static const struct fb_videomode fb_modedb[] = { | 444 | static const struct fb_videomode fb_modedb[] = { |
450 | { | 445 | { |
451 | /* 240x320 @ 60 Hz Sharp */ | 446 | /* 240x320 @ 60 Hz Sharp */ |
@@ -511,8 +506,7 @@ static struct resource pcm970_sja1000_resources[] = { | |||
511 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, | 506 | .end = MX31_CS5_BASE_ADDR + 0x100 - 1, |
512 | .flags = IORESOURCE_MEM, | 507 | .flags = IORESOURCE_MEM, |
513 | }, { | 508 | }, { |
514 | .start = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | 509 | /* irq number is run-time assigned */ |
515 | .end = IOMUX_TO_IRQ(IOMUX_PIN(48, 105)), | ||
516 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, | 510 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
517 | }, | 511 | }, |
518 | }; | 512 | }; |
@@ -557,18 +551,18 @@ static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | |||
557 | .phy_mode = FSL_USB2_PHY_ULPI, | 551 | .phy_mode = FSL_USB2_PHY_ULPI, |
558 | }; | 552 | }; |
559 | 553 | ||
560 | static int otg_mode_host; | 554 | static bool otg_mode_host __initdata; |
561 | 555 | ||
562 | static int __init pcm037_otg_mode(char *options) | 556 | static int __init pcm037_otg_mode(char *options) |
563 | { | 557 | { |
564 | if (!strcmp(options, "host")) | 558 | if (!strcmp(options, "host")) |
565 | otg_mode_host = 1; | 559 | otg_mode_host = true; |
566 | else if (!strcmp(options, "device")) | 560 | else if (!strcmp(options, "device")) |
567 | otg_mode_host = 0; | 561 | otg_mode_host = false; |
568 | else | 562 | else |
569 | pr_info("otg_mode neither \"host\" nor \"device\". " | 563 | pr_info("otg_mode neither \"host\" nor \"device\". " |
570 | "Defaulting to device\n"); | 564 | "Defaulting to device\n"); |
571 | return 0; | 565 | return 1; |
572 | } | 566 | } |
573 | __setup("otg_mode=", pcm037_otg_mode); | 567 | __setup("otg_mode=", pcm037_otg_mode); |
574 | 568 | ||
@@ -619,13 +613,13 @@ static void __init pcm037_init(void) | |||
619 | 613 | ||
620 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 614 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
621 | 615 | ||
622 | imx31_add_imx2_wdt(NULL); | 616 | imx31_add_imx2_wdt(); |
623 | imx31_add_imx_uart0(&uart_pdata); | 617 | imx31_add_imx_uart0(&uart_pdata); |
624 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ | 618 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ |
625 | imx31_add_imx_uart1(&uart_pdata); | 619 | imx31_add_imx_uart1(&uart_pdata); |
626 | imx31_add_imx_uart2(&uart_pdata); | 620 | imx31_add_imx_uart2(&uart_pdata); |
627 | 621 | ||
628 | imx31_add_mxc_w1(NULL); | 622 | imx31_add_mxc_w1(); |
629 | 623 | ||
630 | /* LAN9217 IRQ pin */ | 624 | /* LAN9217 IRQ pin */ |
631 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); | 625 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); |
@@ -633,6 +627,10 @@ static void __init pcm037_init(void) | |||
633 | pr_warning("could not get LAN irq gpio\n"); | 627 | pr_warning("could not get LAN irq gpio\n"); |
634 | else { | 628 | else { |
635 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | 629 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); |
630 | smsc911x_resources[1].start = | ||
631 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
632 | smsc911x_resources[1].end = | ||
633 | gpio_to_irq(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1)); | ||
636 | platform_device_register(&pcm037_eth); | 634 | platform_device_register(&pcm037_eth); |
637 | } | 635 | } |
638 | 636 | ||
@@ -646,7 +644,7 @@ static void __init pcm037_init(void) | |||
646 | 644 | ||
647 | imx31_add_mxc_nand(&pcm037_nand_board_info); | 645 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
648 | imx31_add_mxc_mmc(0, &sdhc_pdata); | 646 | imx31_add_mxc_mmc(0, &sdhc_pdata); |
649 | imx31_add_ipu_core(&mx3_ipu_data); | 647 | imx31_add_ipu_core(); |
650 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); | 648 | imx31_add_mx3_sdc_fb(&mx3fb_pdata); |
651 | 649 | ||
652 | /* CSI */ | 650 | /* CSI */ |
@@ -659,6 +657,10 @@ static void __init pcm037_init(void) | |||
659 | 657 | ||
660 | pcm037_init_camera(); | 658 | pcm037_init_camera(); |
661 | 659 | ||
660 | pcm970_sja1000_resources[1].start = | ||
661 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
662 | pcm970_sja1000_resources[1].end = | ||
663 | gpio_to_irq(IOMUX_TO_GPIO(IOMUX_PIN(48, 105))); | ||
662 | platform_device_register(&pcm970_sja1000); | 664 | platform_device_register(&pcm970_sja1000); |
663 | 665 | ||
664 | if (otg_mode_host) { | 666 | if (otg_mode_host) { |