diff options
author | Florian Fainelli <florian@openwrt.org> | 2013-06-18 12:55:43 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-07-01 09:10:54 -0400 |
commit | 0b35f0c59a601a88ec8c08ebab0b5a733c8de79f (patch) | |
tree | 328c5f235c6baa351b19550b5ef136c69333218f | |
parent | 0680dc866d10806c85c40b54bbf8cf5be61206d1 (diff) |
MIPS: BCM63XX: let board specify an external GPIO to reset PHY
Some boards may need to reset their external PHY or switch they are
attached to, add a hook for doing this along with providing custom
linux/gpio.h flags for doing this.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: jogo@openwrt.org
Cc: Florian Fainelli <florian@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/5501/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c index 46eabb9aff51..611a420dbfdd 100644 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c | |||
@@ -883,5 +883,9 @@ int __init board_register_devices(void) | |||
883 | 883 | ||
884 | platform_device_register(&bcm63xx_gpio_leds); | 884 | platform_device_register(&bcm63xx_gpio_leds); |
885 | 885 | ||
886 | if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) | ||
887 | gpio_request_one(board.ephy_reset_gpio, | ||
888 | board.ephy_reset_gpio_flags, "ephy-reset"); | ||
889 | |||
886 | return 0; | 890 | return 0; |
887 | } | 891 | } |
diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h index 682bcf3b492a..5981fe0c3dfb 100644 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | |||
@@ -45,6 +45,12 @@ struct board_info { | |||
45 | 45 | ||
46 | /* GPIO LEDs */ | 46 | /* GPIO LEDs */ |
47 | struct gpio_led leds[5]; | 47 | struct gpio_led leds[5]; |
48 | |||
49 | /* External PHY reset GPIO */ | ||
50 | unsigned int ephy_reset_gpio; | ||
51 | |||
52 | /* External PHY reset GPIO flags from gpio.h */ | ||
53 | unsigned long ephy_reset_gpio_flags; | ||
48 | }; | 54 | }; |
49 | 55 | ||
50 | #endif /* ! BOARD_BCM963XX_H_ */ | 56 | #endif /* ! BOARD_BCM963XX_H_ */ |