diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-05-04 11:20:15 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-07-23 01:10:41 -0400 |
commit | 9be8631b8a7d11fa6d206fcf0a7a2005ed39f41b (patch) | |
tree | 21edc430dd9f98105f6b97adb76fd9332257d72b /arch/blackfin/mach-bf561 | |
parent | c6cb13f9fef2e401d9fbb0709d088e7c50fe7aea (diff) |
Blackfin: net2272: move pin setup to boards files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf561')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/cm_bf561.c | 22 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 24 |
2 files changed, 46 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 87595cd38af..2e481362065 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 5067984a62e..ba814985871 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 | } |