Skip to content
Snippets Groups Projects
Commit ab3ff8c1 authored by hauke's avatar hauke
Browse files

brcm47xx: update workarounds patch to V3


Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40344 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent f7ac9509
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
}
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -0,0 +1,25 @@
@@ -0,0 +1,31 @@
+#include "bcm47xx_private.h"
+
+#include <linux/gpio.h>
......@@ -53,8 +53,14 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
+
+static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+{
+ /* Set GPIO 12 to 1 to pass power to the USB port */
+ gpio_set_value(12, 1);
+ const int usb_power = 12;
+ int err;
+
+ err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
+ if (err)
+ pr_err("Failed to request USB power gpio: %d\n", err);
+ else
+ gpio_free(usb_power);
+}
+
+void __init bcm47xx_workarounds(void)
......
......@@ -44,7 +44,7 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
return 0;
--- /dev/null
+++ b/arch/mips/bcm47xx/workarounds.c
@@ -0,0 +1,25 @@
@@ -0,0 +1,31 @@
+#include "bcm47xx_private.h"
+
+#include <linux/gpio.h>
......@@ -53,8 +53,14 @@ V2: Drop pr_debug for devices we don't need workarounds for. It was too
+
+static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
+{
+ /* Set GPIO 12 to 1 to pass power to the USB port */
+ gpio_set_value(12, 1);
+ const int usb_power = 12;
+ int err;
+
+ err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
+ if (err)
+ pr_err("Failed to request USB power gpio: %d\n", err);
+ else
+ gpio_free(usb_power);
+}
+
+void __init bcm47xx_workarounds(void)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment