bcm53xx: use backported versions of bcma USB patches
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@49297 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
8a170b96ac
commit
fb582172ad
|
@ -1,4 +1,4 @@
|
|||
From baf3d128e5bdf9d322539609133a15b493b0c2ef Mon Sep 17 00:00:00 2001
|
||||
From 7e4a4da67255d92620ba59b461b5bc295db28dae Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 11 Jun 2015 22:57:35 +0200
|
||||
Subject: [PATCH] USB: bcma: remove chip id check
|
||||
|
@ -9,6 +9,7 @@ Some SoC have IDs with 47XX and 53XX in decimal form which would be
|
|||
rejected by this check. Instead of fixing this check just remove it.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
|
@ -1,4 +1,4 @@
|
|||
From f5bc834917a8b1b9487749bdfe8eda52a01967b4 Mon Sep 17 00:00:00 2001
|
||||
From 98e13e05a1bab82c3bec1d867159bc8384acbe5b Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 11 Jun 2015 22:57:36 +0200
|
||||
Subject: [PATCH] USB: bcma: replace numbers with constants
|
||||
|
@ -6,6 +6,7 @@ Subject: [PATCH] USB: bcma: replace numbers with constants
|
|||
The constants for these numbers were added long time ago, use them.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
@ -1,4 +1,4 @@
|
|||
From 93724affb195149df6f7630901d878f6e273fa02 Mon Sep 17 00:00:00 2001
|
||||
From c27da2b22b558390acc515e71e47b1b307f85d5a Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 11 Jun 2015 22:57:37 +0200
|
||||
Subject: [PATCH] USB: bcma: use devm_kzalloc
|
||||
|
@ -7,6 +7,7 @@ Instead of manually handling the frees use devm. There was also a free
|
|||
missing in the unregister call which is not needed with devm.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
|
@ -1,4 +1,4 @@
|
|||
From 232996d1ba3002e7e80b18075e2838fc86f21412 Mon Sep 17 00:00:00 2001
|
||||
From ab2de5793080dfb9f191ca71068b9f476a55a0f4 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 11 Jun 2015 22:57:38 +0200
|
||||
Subject: [PATCH] USB: bcma: fix error handling in bcma_hcd_create_pdev()
|
||||
|
@ -7,6 +7,7 @@ This patch makes bcma_hcd_create_pdev() not return NULL, but a prober
|
|||
error code in case of an error.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
@ -1,4 +1,4 @@
|
|||
From b65851f41c22b8c69b8fe9ca7782d19ed2155efc Mon Sep 17 00:00:00 2001
|
||||
From 10bc04b744c69f253dfe47bc143325349ce8becc Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 11 Jun 2015 22:57:39 +0200
|
||||
Subject: [PATCH] USB: bcma: add bcm53xx support
|
||||
|
@ -9,6 +9,7 @@ support for these USB 2.0 core.
|
|||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 81 +++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 78 insertions(+), 3 deletions(-)
|
|
@ -1,4 +1,4 @@
|
|||
From f3cf44a313b3687efd55ba091558e20a4d218c31 Mon Sep 17 00:00:00 2001
|
||||
From eb4861c3cef7f745df0d2a26b0f4287da0190424 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 11 Jun 2015 22:57:40 +0200
|
||||
Subject: [PATCH] USB: bcma: add support for controlling bus power through GPIO
|
||||
|
@ -8,6 +8,7 @@ possible to specify such a GPIO in device tree.
|
|||
|
||||
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
|
@ -1,7 +1,7 @@
|
|||
From 0cb136f9882e4649ad6160bb7b48955ff728888c Mon Sep 17 00:00:00 2001
|
||||
From 9faae5a37b266afca6914163316856c5ed4ec366 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Sun, 1 Nov 2015 08:17:21 +0100
|
||||
Subject: [PATCH V2] USB: bcma: switch to GPIO descriptor for power control
|
||||
Date: Sun, 1 Nov 2015 10:04:41 +0100
|
||||
Subject: [PATCH] USB: bcma: switch to GPIO descriptor for power control
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
@ -13,6 +13,8 @@ assuming gpio_request success all the time.
|
|||
Fix it by switching to gpiod functions and adding appropriate checks.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 21 ++++++++++-----------
|
||||
1 file changed, 10 insertions(+), 11 deletions(-)
|
|
@ -1,15 +1,19 @@
|
|||
From 5b4fed9fc917cc2bfc5297eeab03aeba5d340618 Mon Sep 17 00:00:00 2001
|
||||
From 352d9e2ee85b43170388599a17cd7b219f270163 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Tue, 16 Jun 2015 12:33:46 +0200
|
||||
Date: Sat, 5 Dec 2015 13:15:06 +0100
|
||||
Subject: [PATCH] USB: bcma: make helper creating platform dev more generic
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Having "bool ohci" argument bounded us to two cases only and didn't
|
||||
allow re-using this code for XHCI.
|
||||
Having "bool ohci" argument in bcma_hcd_create_pdev function limited it
|
||||
to support two cases only (OHCI and EHCI) and put too much logic in it.
|
||||
Lets make caller pass all required data. This adds few extra arguments
|
||||
to the function call but will allow us to reuse this code and handle
|
||||
more cases in the future (e.g. add XHCI support).
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 24 +++++++++++++-----------
|
||||
1 file changed, 13 insertions(+), 11 deletions(-)
|
|
@ -1,17 +1,23 @@
|
|||
From 4aed231f49954114d5ae23e97789e9aa540a0b70 Mon Sep 17 00:00:00 2001
|
||||
From adbff3a4f93d8501e8ae11906268e21b086d57ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Tue, 16 Jun 2015 12:52:07 +0200
|
||||
Subject: [PATCH] USB: bcma: use separated function for USB 2.0 initialization
|
||||
Date: Sat, 5 Dec 2015 13:15:07 +0100
|
||||
Subject: [PATCH] USB: bcma: separate code initializing USB 2.0 core
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This will allow adding USB 3.0 (XHCI) support cleanly.
|
||||
This splits one big probing function into two smaller ones. The main one
|
||||
is now responsible for the generic stuff: allocating memory & enabling
|
||||
power using GPIO. The new one contains code that is specific to the USB
|
||||
2.0 bcma core.
|
||||
This will allow adding support for the USB 3.0 bcma core (handling XHCI)
|
||||
in the future.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 51 +++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 35 insertions(+), 16 deletions(-)
|
||||
drivers/usb/host/bcma-hcd.c | 59 ++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 39 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/bcma-hcd.c
|
||||
+++ b/drivers/usb/host/bcma-hcd.c
|
||||
|
@ -71,26 +77,26 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||
return err;
|
||||
}
|
||||
|
||||
+static int bcma_hcd_probe(struct bcma_device *dev)
|
||||
+static int bcma_hcd_probe(struct bcma_device *core)
|
||||
+{
|
||||
+ int err;
|
||||
+ struct bcma_hcd_device *usb_dev;
|
||||
+
|
||||
+ /* TODO: Probably need checks here; is the core connected? */
|
||||
+
|
||||
+ usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
|
||||
+ usb_dev = devm_kzalloc(&core->dev, sizeof(struct bcma_hcd_device),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!usb_dev)
|
||||
+ return -ENOMEM;
|
||||
+ usb_dev->core = dev;
|
||||
+ usb_dev->core = core;
|
||||
+
|
||||
+ if (dev->dev.of_node)
|
||||
+ usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
|
||||
+ &dev->dev.of_node->fwnode);
|
||||
+ if (core->dev.of_node)
|
||||
+ usb_dev->gpio_desc = devm_get_gpiod_from_child(&core->dev, "vcc",
|
||||
+ &core->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) {
|
||||
+ switch (core->id.id) {
|
||||
+ case BCMA_CORE_USB20_HOST:
|
||||
+ case BCMA_CORE_NS_USB20:
|
||||
+ err = bcma_hcd_usb20_init(usb_dev);
|
||||
|
@ -101,7 +107,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ bcma_set_drvdata(dev, usb_dev);
|
||||
+ bcma_set_drvdata(core, usb_dev);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
|
@ -0,0 +1,34 @@
|
|||
From 1507372b97a098fd51b92c4dbdbbcd65cba26939 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Wed, 23 Mar 2016 12:37:11 +0100
|
||||
Subject: [PATCH] USB: bcma: use simpler devm helper for getting vcc GPIO
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Thanks to switching to devm_gpiod_get:
|
||||
1) We don't have to pass fwnode pointer
|
||||
2) We can request initial GPIO value at getting call
|
||||
This was successfully tested on Netgear R6250 (BCM4708).
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/bcma-hcd.c
|
||||
+++ b/drivers/usb/host/bcma-hcd.c
|
||||
@@ -352,10 +352,8 @@ static int bcma_hcd_probe(struct bcma_de
|
||||
usb_dev->core = core;
|
||||
|
||||
if (core->dev.of_node)
|
||||
- usb_dev->gpio_desc = devm_get_gpiod_from_child(&core->dev, "vcc",
|
||||
- &core->dev.of_node->fwnode);
|
||||
- if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
|
||||
- gpiod_direction_output(usb_dev->gpio_desc, 1);
|
||||
+ usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
|
||||
+ GPIOD_OUT_HIGH);
|
||||
|
||||
switch (core->id.id) {
|
||||
case BCMA_CORE_USB20_HOST:
|
|
@ -185,10 +185,10 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int bcma_hcd_probe(struct bcma_device *dev)
|
||||
static int bcma_hcd_probe(struct bcma_device *core)
|
||||
{
|
||||
int err;
|
||||
@@ -364,6 +525,11 @@ static int bcma_hcd_probe(struct bcma_de
|
||||
@@ -362,6 +523,11 @@ static int bcma_hcd_probe(struct bcma_de
|
||||
if (err)
|
||||
return err;
|
||||
break;
|
||||
|
@ -200,7 +200,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||
default:
|
||||
return -ENODEV;
|
||||
}
|
||||
@@ -377,11 +543,14 @@ static void bcma_hcd_remove(struct bcma_
|
||||
@@ -375,11 +541,14 @@ static void bcma_hcd_remove(struct bcma_
|
||||
struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
|
||||
struct platform_device *ohci_dev = usb_dev->ohci_dev;
|
||||
struct platform_device *ehci_dev = usb_dev->ehci_dev;
|
||||
|
@ -215,7 +215,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|||
|
||||
bcma_core_disable(dev, 0);
|
||||
}
|
||||
@@ -418,6 +587,7 @@ static int bcma_hcd_resume(struct bcma_d
|
||||
@@ -416,6 +585,7 @@ static int bcma_hcd_resume(struct bcma_d
|
||||
static const struct bcma_device_id bcma_hcd_table[] = {
|
||||
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_USB20_HOST, BCMA_ANY_REV, BCMA_ANY_CLASS),
|
||||
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_USB20, BCMA_ANY_REV, BCMA_ANY_CLASS),
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Sat, 2 Jan 2016 11:26:28 +0100
|
||||
Subject: [PATCH] USB: bcma: use simpler devm_gpiod_get
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/usb/host/bcma-hcd.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/bcma-hcd.c
|
||||
+++ b/drivers/usb/host/bcma-hcd.c
|
||||
@@ -513,8 +513,7 @@ static int bcma_hcd_probe(struct bcma_de
|
||||
usb_dev->core = dev;
|
||||
|
||||
if (dev->dev.of_node)
|
||||
- usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
|
||||
- &dev->dev.of_node->fwnode);
|
||||
+ usb_dev->gpio_desc = devm_gpiod_get(&dev->dev, "vcc");
|
||||
if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
|
||||
gpiod_direction_output(usb_dev->gpio_desc, 1);
|
||||
|
Loading…
Reference in New Issue