diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-06-16 08:28:46 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-06-16 08:28:46 +0000 |
commit | 4ce5d87de4a67fe0d2361f3c84afa46ce8838757 (patch) | |
tree | 8cc3fb5b4c781e1ffcd8dfb7e64c13b0dbd28bab /target/linux/bcm53xx/patches-3.18/191-bcma_hcd_add_gpio_power_control.patch | |
parent | 6c5fac761a23f2f6d9e4ca1591896efeaad4fb9f (diff) | |
download | master-187ad058-4ce5d87de4a67fe0d2361f3c84afa46ce8838757.tar.gz master-187ad058-4ce5d87de4a67fe0d2361f3c84afa46ce8838757.tar.bz2 master-187ad058-4ce5d87de4a67fe0d2361f3c84afa46ce8838757.zip |
bcm53xx: use USB patches sent upstream by Hauke
This stabilizes USB support. The old patch was handling initialization
in a different order that was causing some problems with few USB 3.0
devices. Some weren't detected, some were working unstable, sometimes
USB 3.0 could hang the whole controller.
A still known issue (but not a regression) is controller hang triggered
by connecting USB 1.1 device when not having OHCI controller enabled
(kmod-usb-ohci).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45997 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/bcm53xx/patches-3.18/191-bcma_hcd_add_gpio_power_control.patch')
-rw-r--r-- | target/linux/bcm53xx/patches-3.18/191-bcma_hcd_add_gpio_power_control.patch | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/target/linux/bcm53xx/patches-3.18/191-bcma_hcd_add_gpio_power_control.patch b/target/linux/bcm53xx/patches-3.18/191-bcma_hcd_add_gpio_power_control.patch deleted file mode 100644 index 9c45556ec9..0000000000 --- a/target/linux/bcm53xx/patches-3.18/191-bcma_hcd_add_gpio_power_control.patch +++ /dev/null @@ -1,62 +0,0 @@ -Subject: [PATCH] bcma-hcd: add support for controlling bus power through GPIO - -Signed-off-by: Felix Fietkau <nbd@openwrt.org> ---- ---- a/drivers/usb/host/bcma-hcd.c -+++ b/drivers/usb/host/bcma-hcd.c -@@ -23,6 +23,8 @@ - #include <linux/platform_device.h> - #include <linux/module.h> - #include <linux/slab.h> -+#include <linux/of.h> -+#include <linux/of_gpio.h> - #include <linux/usb/ehci_pdriver.h> - #include <linux/usb/ohci_pdriver.h> - -@@ -205,7 +207,38 @@ static void bcma_hcd_init_chip_arm(struc - iounmap(dmu); - } - -+static void bcma_hci_platform_power_gpio(struct platform_device *dev, bool val) -+{ -+ int gpio; -+ -+ gpio = of_get_named_gpio(dev->dev.of_node, "vcc-gpio", 0); -+ if (!gpio_is_valid(gpio)) -+ return; -+ -+ if (val) { -+ gpio_request(gpio, "bcma-hcd-gpio"); -+ gpio_set_value(gpio, 1); -+ } else { -+ gpio_set_value(gpio, 0); -+ gpio_free(gpio); -+ } -+} -+ -+static int bcma_hci_platform_power_on(struct platform_device *dev) -+{ -+ bcma_hci_platform_power_gpio(dev, true); -+ return 0; -+} -+ -+static void bcma_hci_platform_power_off(struct platform_device *dev) -+{ -+ bcma_hci_platform_power_gpio(dev, false); -+} -+ - static const struct usb_ehci_pdata ehci_pdata = { -+ .power_on = bcma_hci_platform_power_on, -+ .power_suspend = bcma_hci_platform_power_off, -+ .power_off = bcma_hci_platform_power_off, - }; - - static const struct usb_ohci_pdata ohci_pdata = { -@@ -233,6 +266,7 @@ static struct platform_device *bcma_hcd_ - - hci_dev->dev.parent = &dev->dev; - hci_dev->dev.dma_mask = &hci_dev->dev.coherent_dma_mask; -+ hci_dev->dev.of_node = dev->dev.of_node; - - ret = platform_device_add_resources(hci_dev, hci_res, - ARRAY_SIZE(hci_res)); |