diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-09-08 16:53:35 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-09-09 15:33:05 -0400 |
commit | 23a2f39c8f4035eade7f226eb7ada30c78d9eee3 (patch) | |
tree | 596091221f4e5ceb4b493b340d0b30bc997474ae | |
parent | 367b341edbebc405d80fecd28ff973dfb7390d65 (diff) |
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>
-rw-r--r-- | drivers/bcma/scan.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/bcma-hcd.c | 2 | ||||
-rw-r--r-- | include/linux/bcma/bcma.h | 2 |
3 files changed, 7 insertions, 6 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, | |||
276 | struct bcma_device *core) | 276 | struct bcma_device *core) |
277 | { | 277 | { |
278 | u32 tmp; | 278 | u32 tmp; |
279 | u8 i, j; | 279 | u8 i, j, k; |
280 | s32 cia, cib; | 280 | s32 cia, cib; |
281 | u8 ports[2], wrappers[2]; | 281 | u8 ports[2], wrappers[2]; |
282 | 282 | ||
@@ -367,6 +367,7 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr, | |||
367 | core->addr = tmp; | 367 | core->addr = tmp; |
368 | 368 | ||
369 | /* get & parse slave ports */ | 369 | /* get & parse slave ports */ |
370 | k = 0; | ||
370 | for (i = 0; i < ports[1]; i++) { | 371 | for (i = 0; i < ports[1]; i++) { |
371 | for (j = 0; ; j++) { | 372 | for (j = 0; ; j++) { |
372 | tmp = bcma_erom_get_addr_desc(bus, eromptr, | 373 | 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, | |||
376 | /* pr_debug("erom: slave port %d " | 377 | /* pr_debug("erom: slave port %d " |
377 | * "has %d descriptors\n", i, j); */ | 378 | * "has %d descriptors\n", i, j); */ |
378 | break; | 379 | break; |
379 | } else { | 380 | } else if (k < ARRAY_SIZE(core->addr_s)) { |
380 | if (i == 0 && j == 0) | 381 | core->addr_s[k] = tmp; |
381 | core->addr1 = tmp; | 382 | k++; |
382 | } | 383 | } |
383 | } | 384 | } |
384 | } | 385 | } |
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) | |||
237 | bcma_hcd_init_chip(dev); | 237 | bcma_hcd_init_chip(dev); |
238 | 238 | ||
239 | /* In AI chips EHCI is addrspace 0, OHCI is 1 */ | 239 | /* In AI chips EHCI is addrspace 0, OHCI is 1 */ |
240 | ohci_addr = dev->addr1; | 240 | ohci_addr = dev->addr_s[0]; |
241 | if ((chipinfo->id == 0x5357 || chipinfo->id == 0x4749) | 241 | if ((chipinfo->id == 0x5357 || chipinfo->id == 0x4749) |
242 | && chipinfo->rev == 0) | 242 | && chipinfo->rev == 0) |
243 | ohci_addr = 0x18009000; | 243 | ohci_addr = 0x18009000; |
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index c1ba87d1548e..7fc16c991291 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
@@ -267,7 +267,7 @@ struct bcma_device { | |||
267 | u8 core_unit; | 267 | u8 core_unit; |
268 | 268 | ||
269 | u32 addr; | 269 | u32 addr; |
270 | u32 addr1; | 270 | u32 addr_s[8]; |
271 | u32 wrap; | 271 | u32 wrap; |
272 | 272 | ||
273 | void __iomem *io_addr; | 273 | void __iomem *io_addr; |