aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm47xx/workarounds.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/bcm47xx/workarounds.c')
-rw-r--r--arch/mips/bcm47xx/workarounds.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/workarounds.c b/arch/mips/bcm47xx/workarounds.c
new file mode 100644
index 000000000000..e81ce4623070
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -0,0 +1,31 @@
1#include "bcm47xx_private.h"
2
3#include <linux/gpio.h>
4#include <bcm47xx_board.h>
5#include <bcm47xx.h>
6
7static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
8{
9 const int usb_power = 12;
10 int err;
11
12 err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
13 if (err)
14 pr_err("Failed to request USB power gpio: %d\n", err);
15 else
16 gpio_free(usb_power);
17}
18
19void __init bcm47xx_workarounds(void)
20{
21 enum bcm47xx_board board = bcm47xx_board_get();
22
23 switch (board) {
24 case BCM47XX_BOARD_NETGEAR_WNR3500L:
25 bcm47xx_workarounds_netgear_wnr3500l();
26 break;
27 default:
28 /* No workaround(s) needed */
29 break;
30 }
31}