diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-03-30 19:06:24 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2014-03-30 19:06:24 +0000 |
commit | a1f4a43cef866718a31ec3c7b75fce9cc8a4843c (patch) | |
tree | 43772277cfaf5c708c59d8ae6431761f8f79293e /target/linux/brcm47xx | |
parent | c78af071deaf1cd32bda53a781bf01bb580fa397 (diff) | |
download | mtk-20170518-a1f4a43cef866718a31ec3c7b75fce9cc8a4843c.zip mtk-20170518-a1f4a43cef866718a31ec3c7b75fce9cc8a4843c.tar.gz mtk-20170518-a1f4a43cef866718a31ec3c7b75fce9cc8a4843c.tar.bz2 |
brcm47xx: update workarounds patch to V3
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 40344
Diffstat (limited to 'target/linux/brcm47xx')
2 files changed, 18 insertions, 6 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch b/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch index 0e291f8..5603a53 100644 --- a/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch +++ b/target/linux/brcm47xx/patches-3.10/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch @@ -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) diff --git a/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch b/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch index a1ebd20..e5bdb97 100644 --- a/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch +++ b/target/linux/brcm47xx/patches-3.14/128-MIPS-BCM47XX-Add-new-file-for-device-specific-workar.patch @@ -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) |