1 From 17cb62255ef8f6b6ac270024204a8fa65537b333 Mon Sep 17 00:00:00 2001
2 From: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
3 Date: Sun, 19 Aug 2018 21:23:14 +0300
4 Subject: [PATCH] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
6 Setting GPIO 21 high seems to be required to enable power to USB ports
7 on the WNDR3400v3. As there is already similar code for WNR3500L,
8 make the existing USB power GPIO code generic and use that.
10 Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
12 arch/mips/bcm47xx/workarounds.c | 8 +++++---
13 1 file changed, 5 insertions(+), 3 deletions(-)
15 --- a/arch/mips/bcm47xx/workarounds.c
16 +++ b/arch/mips/bcm47xx/workarounds.c
18 #include <bcm47xx_board.h>
21 -static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
22 +static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
24 - const int usb_power = 12;
27 err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
28 @@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void)
31 case BCM47XX_BOARD_NETGEAR_WNR3500L:
32 - bcm47xx_workarounds_netgear_wnr3500l();
33 + bcm47xx_workarounds_enable_usb_power(12);
35 + case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
36 + bcm47xx_workarounds_enable_usb_power(21);
39 /* No workaround(s) needed */