diff options
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 3 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 41 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537e.c | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537u.c | 34 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 24 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/tcm_bf537.c | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/cm_bf561.c | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 24 |
8 files changed, 192 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index e67ac7720668..3f967b1c5792 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -409,6 +409,9 @@ static struct resource net2272_bfin_resources[] = { | |||
409 | .end = 0x20300000 + 0x100, | 409 | .end = 0x20300000 + 0x100, |
410 | .flags = IORESOURCE_MEM, | 410 | .flags = IORESOURCE_MEM, |
411 | }, { | 411 | }, { |
412 | .start = 1, | ||
413 | .flags = IORESOURCE_BUS, | ||
414 | }, { | ||
412 | .start = IRQ_PF7, | 415 | .start = IRQ_PF7, |
413 | .end = IRQ_PF7, | 416 | .end = IRQ_PF7, |
414 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 417 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 43224ef00b8c..eccb82036c0c 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -80,6 +80,9 @@ static struct resource net2272_bfin_resources[] = { | |||
80 | .end = 0x20300000 + 0x100, | 80 | .end = 0x20300000 + 0x100, |
81 | .flags = IORESOURCE_MEM, | 81 | .flags = IORESOURCE_MEM, |
82 | }, { | 82 | }, { |
83 | .start = 1, | ||
84 | .flags = IORESOURCE_BUS, | ||
85 | }, { | ||
83 | .start = IRQ_PF10, | 86 | .start = IRQ_PF10, |
84 | .end = IRQ_PF10, | 87 | .end = IRQ_PF10, |
85 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 88 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
@@ -659,6 +662,41 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
659 | #endif | 662 | #endif |
660 | }; | 663 | }; |
661 | 664 | ||
665 | static int __init net2272_init(void) | ||
666 | { | ||
667 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
668 | int ret; | ||
669 | |||
670 | /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ | ||
671 | ret = gpio_request(GPIO_PF0, "net2272"); | ||
672 | if (ret) | ||
673 | return ret; | ||
674 | |||
675 | ret = gpio_request(GPIO_PF1, "net2272"); | ||
676 | if (ret) { | ||
677 | gpio_free(GPIO_PF0); | ||
678 | return ret; | ||
679 | } | ||
680 | |||
681 | ret = gpio_request(GPIO_PF11, "net2272"); | ||
682 | if (ret) { | ||
683 | gpio_free(GPIO_PF0); | ||
684 | gpio_free(GPIO_PF1); | ||
685 | return ret; | ||
686 | } | ||
687 | |||
688 | gpio_direction_output(GPIO_PF0, 0); | ||
689 | gpio_direction_output(GPIO_PF1, 1); | ||
690 | |||
691 | /* Reset the USB chip */ | ||
692 | gpio_direction_output(GPIO_PF11, 0); | ||
693 | mdelay(2); | ||
694 | gpio_set_value(GPIO_PF11, 1); | ||
695 | #endif | ||
696 | |||
697 | return 0; | ||
698 | } | ||
699 | |||
662 | static int __init stamp_init(void) | 700 | static int __init stamp_init(void) |
663 | { | 701 | { |
664 | int ret; | 702 | int ret; |
@@ -685,6 +723,9 @@ static int __init stamp_init(void) | |||
685 | } | 723 | } |
686 | #endif | 724 | #endif |
687 | 725 | ||
726 | if (net2272_init()) | ||
727 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
728 | |||
688 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 729 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
689 | return 0; | 730 | return 0; |
690 | } | 731 | } |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c index d582b810e7a7..f3ff4207b429 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c | |||
@@ -766,6 +766,24 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { | |||
766 | #endif | 766 | #endif |
767 | }; | 767 | }; |
768 | 768 | ||
769 | static int __init net2272_init(void) | ||
770 | { | ||
771 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
772 | int ret; | ||
773 | |||
774 | ret = gpio_request(GPIO_PG14, "net2272"); | ||
775 | if (ret) | ||
776 | return ret; | ||
777 | |||
778 | /* Reset USB Chip, PG14 */ | ||
779 | gpio_direction_output(GPIO_PG14, 0); | ||
780 | mdelay(2); | ||
781 | gpio_set_value(GPIO_PG14, 1); | ||
782 | #endif | ||
783 | |||
784 | return 0; | ||
785 | } | ||
786 | |||
769 | static int __init cm_bf537e_init(void) | 787 | static int __init cm_bf537e_init(void) |
770 | { | 788 | { |
771 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 789 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -777,6 +795,10 @@ static int __init cm_bf537e_init(void) | |||
777 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 795 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
778 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 796 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
779 | #endif | 797 | #endif |
798 | |||
799 | if (net2272_init()) | ||
800 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
801 | |||
780 | return 0; | 802 | return 0; |
781 | } | 803 | } |
782 | 804 | ||
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c index cbb8098604c5..e1b7287084f8 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c | |||
@@ -731,6 +731,36 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { | |||
731 | #endif | 731 | #endif |
732 | }; | 732 | }; |
733 | 733 | ||
734 | static int __init net2272_init(void) | ||
735 | { | ||
736 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
737 | int ret; | ||
738 | |||
739 | ret = gpio_request(GPIO_PH15, driver_name); | ||
740 | if (ret) | ||
741 | return ret; | ||
742 | |||
743 | ret = gpio_request(GPIO_PH13, "net2272"); | ||
744 | if (ret) { | ||
745 | gpio_free(GPIO_PH15); | ||
746 | return ret; | ||
747 | } | ||
748 | |||
749 | /* Set PH15 Low make /AMS2 work properly */ | ||
750 | gpio_direction_output(GPIO_PH15, 0); | ||
751 | |||
752 | /* enable CLKBUF output */ | ||
753 | bfin_write_VR_CTL(bfin_read_VR_CTL() | CLKBUFOE); | ||
754 | |||
755 | /* Reset the USB chip */ | ||
756 | gpio_direction_output(GPIO_PH13, 0); | ||
757 | mdelay(2); | ||
758 | gpio_set_value(GPIO_PH13, 1); | ||
759 | #endif | ||
760 | |||
761 | return 0; | ||
762 | } | ||
763 | |||
734 | static int __init cm_bf537u_init(void) | 764 | static int __init cm_bf537u_init(void) |
735 | { | 765 | { |
736 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 766 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -742,6 +772,10 @@ static int __init cm_bf537u_init(void) | |||
742 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 772 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
743 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 773 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
744 | #endif | 774 | #endif |
775 | |||
776 | if (net2272_init()) | ||
777 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
778 | |||
745 | return 0; | 779 | return 0; |
746 | } | 780 | } |
747 | 781 | ||
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 76db1d483173..3d166e362135 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -367,6 +367,9 @@ static struct resource net2272_bfin_resources[] = { | |||
367 | .end = 0x20300000 + 0x100, | 367 | .end = 0x20300000 + 0x100, |
368 | .flags = IORESOURCE_MEM, | 368 | .flags = IORESOURCE_MEM, |
369 | }, { | 369 | }, { |
370 | .start = 1, | ||
371 | .flags = IORESOURCE_BUS, | ||
372 | }, { | ||
370 | .start = IRQ_PF7, | 373 | .start = IRQ_PF7, |
371 | .end = IRQ_PF7, | 374 | .end = IRQ_PF7, |
372 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 375 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
@@ -2916,6 +2919,24 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
2916 | #endif | 2919 | #endif |
2917 | }; | 2920 | }; |
2918 | 2921 | ||
2922 | static int __init net2272_init(void) | ||
2923 | { | ||
2924 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
2925 | int ret; | ||
2926 | |||
2927 | ret = gpio_request(GPIO_PF6, "net2272"); | ||
2928 | if (ret) | ||
2929 | return ret; | ||
2930 | |||
2931 | /* Reset the USB chip */ | ||
2932 | gpio_direction_output(GPIO_PF6, 0); | ||
2933 | mdelay(2); | ||
2934 | gpio_set_value(GPIO_PF6, 1); | ||
2935 | #endif | ||
2936 | |||
2937 | return 0; | ||
2938 | } | ||
2939 | |||
2919 | static int __init stamp_init(void) | 2940 | static int __init stamp_init(void) |
2920 | { | 2941 | { |
2921 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 2942 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -2926,6 +2947,9 @@ static int __init stamp_init(void) | |||
2926 | ARRAY_SIZE(bfin_i2c_board_info)); | 2947 | ARRAY_SIZE(bfin_i2c_board_info)); |
2927 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 2948 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
2928 | 2949 | ||
2950 | if (net2272_init()) | ||
2951 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
2952 | |||
2929 | return 0; | 2953 | return 0; |
2930 | } | 2954 | } |
2931 | 2955 | ||
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 164a7e02c022..6d4c1caaa945 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -733,6 +733,24 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
733 | #endif | 733 | #endif |
734 | }; | 734 | }; |
735 | 735 | ||
736 | static int __init net2272_init(void) | ||
737 | { | ||
738 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
739 | int ret; | ||
740 | |||
741 | ret = gpio_request(GPIO_PG14, "net2272"); | ||
742 | if (ret) | ||
743 | return ret; | ||
744 | |||
745 | /* Reset USB Chip, PG14 */ | ||
746 | gpio_direction_output(GPIO_PG14, 0); | ||
747 | mdelay(2); | ||
748 | gpio_set_value(GPIO_PG14, 1); | ||
749 | #endif | ||
750 | |||
751 | return 0; | ||
752 | } | ||
753 | |||
736 | static int __init tcm_bf537_init(void) | 754 | static int __init tcm_bf537_init(void) |
737 | { | 755 | { |
738 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 756 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -744,6 +762,10 @@ static int __init tcm_bf537_init(void) | |||
744 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 762 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
745 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 763 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
746 | #endif | 764 | #endif |
765 | |||
766 | if (net2272_init()) | ||
767 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
768 | |||
747 | return 0; | 769 | return 0; |
748 | } | 770 | } |
749 | 771 | ||
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 87595cd38afe..2e481362065b 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -532,6 +532,24 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
532 | #endif | 532 | #endif |
533 | }; | 533 | }; |
534 | 534 | ||
535 | static int __init net2272_init(void) | ||
536 | { | ||
537 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
538 | int ret; | ||
539 | |||
540 | ret = gpio_request(GPIO_PF46, "net2272"); | ||
541 | if (ret) | ||
542 | return ret; | ||
543 | |||
544 | /* Reset USB Chip, PF46 */ | ||
545 | gpio_direction_output(GPIO_PF46, 0); | ||
546 | mdelay(2); | ||
547 | gpio_set_value(GPIO_PF46, 1); | ||
548 | #endif | ||
549 | |||
550 | return 0; | ||
551 | } | ||
552 | |||
535 | static int __init cm_bf561_init(void) | 553 | static int __init cm_bf561_init(void) |
536 | { | 554 | { |
537 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 555 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -543,6 +561,10 @@ static int __init cm_bf561_init(void) | |||
543 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 561 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
544 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 562 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
545 | #endif | 563 | #endif |
564 | |||
565 | if (net2272_init()) | ||
566 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
567 | |||
546 | return 0; | 568 | return 0; |
547 | } | 569 | } |
548 | 570 | ||
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 5067984a62e7..ba8149858714 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -108,6 +108,9 @@ static struct resource net2272_bfin_resources[] = { | |||
108 | .end = 0x2C000000 + 0x7F, | 108 | .end = 0x2C000000 + 0x7F, |
109 | .flags = IORESOURCE_MEM, | 109 | .flags = IORESOURCE_MEM, |
110 | }, { | 110 | }, { |
111 | .start = 1, | ||
112 | .flags = IORESOURCE_BUS, | ||
113 | }, { | ||
111 | .start = IRQ_PF10, | 114 | .start = IRQ_PF10, |
112 | .end = IRQ_PF10, | 115 | .end = IRQ_PF10, |
113 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 116 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
@@ -516,6 +519,24 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
516 | #endif | 519 | #endif |
517 | }; | 520 | }; |
518 | 521 | ||
522 | static int __init net2272_init(void) | ||
523 | { | ||
524 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
525 | int ret; | ||
526 | |||
527 | ret = gpio_request(GPIO_PF11, "net2272"); | ||
528 | if (ret) | ||
529 | return ret; | ||
530 | |||
531 | /* Reset the USB chip */ | ||
532 | gpio_direction_output(GPIO_PF11, 0); | ||
533 | mdelay(2); | ||
534 | gpio_set_value(GPIO_PF11, 1); | ||
535 | #endif | ||
536 | |||
537 | return 0; | ||
538 | } | ||
539 | |||
519 | static int __init ezkit_init(void) | 540 | static int __init ezkit_init(void) |
520 | { | 541 | { |
521 | int ret; | 542 | int ret; |
@@ -542,6 +563,9 @@ static int __init ezkit_init(void) | |||
542 | udelay(400); | 563 | udelay(400); |
543 | #endif | 564 | #endif |
544 | 565 | ||
566 | if (net2272_init()) | ||
567 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
568 | |||
545 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 569 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
546 | return 0; | 570 | return 0; |
547 | } | 571 | } |