From c348b3317ae8e59c706cd72fa86a54cdcd3150c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sun, 1 Nov 2015 22:21:49 +0000 Subject: bcm53xx: replace USB patch fixing power control with the most recent version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki SVN-Revision: 47336 --- ...e-separated-function-for-USB-2.0-initiali.patch | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'target/linux/bcm53xx/patches-4.3/196-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch') diff --git a/target/linux/bcm53xx/patches-4.3/196-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch b/target/linux/bcm53xx/patches-4.3/196-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch index d636e86046..262192b7bf 100644 --- a/target/linux/bcm53xx/patches-4.3/196-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch +++ b/target/linux/bcm53xx/patches-4.3/196-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch @@ -17,15 +17,15 @@ Signed-off-by: Hauke Mehrtens --- a/drivers/usb/host/bcma-hcd.c +++ b/drivers/usb/host/bcma-hcd.c -@@ -34,6 +34,7 @@ MODULE_DESCRIPTION("Common USB driver fo +@@ -35,6 +35,7 @@ MODULE_DESCRIPTION("Common USB driver fo MODULE_LICENSE("GPL"); struct bcma_hcd_device { + struct bcma_device *core; struct platform_device *ehci_dev; struct platform_device *ohci_dev; - }; -@@ -293,27 +294,16 @@ err_alloc: + struct gpio_desc *gpio_desc; +@@ -288,31 +289,16 @@ err_alloc: return ERR_PTR(ret); } @@ -52,12 +52,16 @@ Signed-off-by: Hauke Mehrtens - if (!usb_dev) - return -ENOMEM; - -- bcma_hci_platform_power_gpio(dev, true); +- if (dev->dev.of_node) +- usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc", +- &dev->dev.of_node->fwnode); +- if (!IS_ERR_OR_NULL(usb_dev->gpio_desc)) +- gpiod_direction_output(usb_dev->gpio_desc, 1); - switch (dev->id.id) { case BCMA_CORE_NS_USB20: bcma_hcd_init_chip_arm(dev); -@@ -346,7 +336,6 @@ static int bcma_hcd_probe(struct bcma_de +@@ -345,7 +331,6 @@ static int bcma_hcd_probe(struct bcma_de goto err_unregister_ohci_dev; } @@ -65,7 +69,7 @@ Signed-off-by: Hauke Mehrtens return 0; err_unregister_ohci_dev: -@@ -354,6 +343,36 @@ err_unregister_ohci_dev: +@@ -353,6 +338,40 @@ err_unregister_ohci_dev: return err; } @@ -82,7 +86,11 @@ Signed-off-by: Hauke Mehrtens + return -ENOMEM; + usb_dev->core = dev; + -+ bcma_hci_platform_power_gpio(dev, true); ++ if (dev->dev.of_node) ++ usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc", ++ &dev->dev.of_node->fwnode); ++ if (!IS_ERR_OR_NULL(usb_dev->gpio_desc)) ++ gpiod_direction_output(usb_dev->gpio_desc, 1); + + switch (dev->id.id) { + case BCMA_CORE_USB20_HOST: -- cgit v1.2.3