summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-09-08 22:53:35 +0200
committerJohn W. Linville <linville@tuxdriver.com>2014-09-09 15:33:05 -0400
commit23a2f39c8f4035eade7f226eb7ada30c78d9eee3 (patch)
tree596091221f4e5ceb4b493b340d0b30bc997474ae /drivers
parent367b341edbebc405d80fecd28ff973dfb7390d65 (diff)
downloadlinux-23a2f39c8f4035eade7f226eb7ada30c78d9eee3.tar.gz
linux-23a2f39c8f4035eade7f226eb7ada30c78d9eee3.tar.bz2
linux-23a2f39c8f4035eade7f226eb7ada30c78d9eee3.zip
bcma: store more alternative addresses
Each core could have more than one alternative address. There are cores with 8 alternative addresses for different functions. The PHY control in the Chip common B core is done through the 2. alternative address and not the first one. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> CC: linux-usb@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bcma/scan.c9
-rw-r--r--drivers/usb/host/bcma-hcd.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index e2b990303042..06be7282cbc4 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -276,7 +276,7 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
struct bcma_device *core)
{
u32 tmp;
- u8 i, j;
+ u8 i, j, k;
s32 cia, cib;
u8 ports[2], wrappers[2];
@@ -367,6 +367,7 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
core->addr = tmp;
/* get & parse slave ports */
+ k = 0;
for (i = 0; i < ports[1]; i++) {
for (j = 0; ; j++) {
tmp = bcma_erom_get_addr_desc(bus, eromptr,
@@ -376,9 +377,9 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
/* pr_debug("erom: slave port %d "
* "has %d descriptors\n", i, j); */
break;
- } else {
- if (i == 0 && j == 0)
- core->addr1 = tmp;
+ } else if (k < ARRAY_SIZE(core->addr_s)) {
+ core->addr_s[k] = tmp;
+ k++;
}
}
}
diff --git a/drivers/usb/host/bcma-hcd.c b/drivers/usb/host/bcma-hcd.c
index 205f4a336583..cd6d0afb6b8f 100644
--- a/drivers/usb/host/bcma-hcd.c
+++ b/drivers/usb/host/bcma-hcd.c
@@ -237,7 +237,7 @@ static int bcma_hcd_probe(struct bcma_device *dev)
bcma_hcd_init_chip(dev);
/* In AI chips EHCI is addrspace 0, OHCI is 1 */
- ohci_addr = dev->addr1;
+ ohci_addr = dev->addr_s[0];
if ((chipinfo->id == 0x5357 || chipinfo->id == 0x4749)
&& chipinfo->rev == 0)
ohci_addr = 0x18009000;