aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-07-20 11:30:26 +0000
committerJonas Gorski <jogo@openwrt.org>2013-07-20 11:30:26 +0000
commit2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c (patch)
tree97aa81a655299693d0ea0196efb50a79a13d7566 /target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch
parentc38dd0ac480380e45436ff89a8b5a0ba4d7a981b (diff)
downloadmaster-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.tar.gz
master-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.tar.bz2
master-187ad058-2f038ae881a80ac4edf5a5e5f16e6c6cf4faaa9c.zip
brcm63xx: add linux 3.10 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37481 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch')
-rw-r--r--target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch b/target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch
new file mode 100644
index 0000000000..122d915943
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.10/039-MIPS-BCM63XX-let-board-specify-an-external-GPIO-to-r.patch
@@ -0,0 +1,49 @@
+From 0a97aafe7fe50ed183e7fa0121fa7838e2e20306 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <florian@openwrt.org>
+Date: Tue, 18 Jun 2013 16:55:43 +0000
+Subject: [PATCH 5/6] 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>
+---
+ arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++
+ arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 6 ++++++
+ 2 files changed, 10 insertions(+)
+
+--- 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)
+
+ platform_device_register(&bcm63xx_gpio_leds);
+
++ if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
++ gpio_request_one(board.ephy_reset_gpio,
++ board.ephy_reset_gpio_flags, "ephy-reset");
++
+ return 0;
+ }
+--- 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 {
+
+ /* GPIO LEDs */
+ struct gpio_led leds[5];
++
++ /* External PHY reset GPIO */
++ unsigned int ephy_reset_gpio;
++
++ /* External PHY reset GPIO flags from gpio.h */
++ unsigned long ephy_reset_gpio_flags;
+ };
+
+ #endif /* ! BOARD_BCM963XX_H_ */