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 /drivers/bcma | |
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>
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/scan.c | 9 |
1 files changed, 5 insertions, 4 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 | } |