Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hauke Mehrtens and committed by
John W. Linville
23a2f39c 367b341e

+7 -6
+5 -4
drivers/bcma/scan.c
··· 276 276 struct bcma_device *core) 277 277 { 278 278 u32 tmp; 279 - u8 i, j; 279 + u8 i, j, k; 280 280 s32 cia, cib; 281 281 u8 ports[2], wrappers[2]; 282 282 ··· 367 367 core->addr = tmp; 368 368 369 369 /* get & parse slave ports */ 370 + k = 0; 370 371 for (i = 0; i < ports[1]; i++) { 371 372 for (j = 0; ; j++) { 372 373 tmp = bcma_erom_get_addr_desc(bus, eromptr, ··· 377 376 /* pr_debug("erom: slave port %d " 378 377 * "has %d descriptors\n", i, j); */ 379 378 break; 380 - } else { 381 - if (i == 0 && j == 0) 382 - core->addr1 = tmp; 379 + } else if (k < ARRAY_SIZE(core->addr_s)) { 380 + core->addr_s[k] = tmp; 381 + k++; 383 382 } 384 383 } 385 384 }
+1 -1
drivers/usb/host/bcma-hcd.c
··· 237 237 bcma_hcd_init_chip(dev); 238 238 239 239 /* In AI chips EHCI is addrspace 0, OHCI is 1 */ 240 - ohci_addr = dev->addr1; 240 + ohci_addr = dev->addr_s[0]; 241 241 if ((chipinfo->id == 0x5357 || chipinfo->id == 0x4749) 242 242 && chipinfo->rev == 0) 243 243 ohci_addr = 0x18009000;
+1 -1
include/linux/bcma/bcma.h
··· 267 267 u8 core_unit; 268 268 269 269 u32 addr; 270 - u32 addr1; 270 + u32 addr_s[8]; 271 271 u32 wrap; 272 272 273 273 void __iomem *io_addr;