17 #include <linux/pci.h>
40 return "Fast Ethernet";
44 return "USB 1.1 Hostdev";
54 return "Internal Memory";
64 return "USB 1.1 Host";
66 return "USB 1.1 Device";
68 return "USB 2.0 Host";
70 return "USB 2.0 Device";
78 return "SATA XOR-DMA";
80 return "GBit Ethernet";
86 return "SRAM Controller";
94 return "ARM Cortex M3";
101 u16 chipid_fallback = 0;
103 switch (pci_dev->
device) {
105 chipid_fallback = 0x4301;
107 case 0x4305 ... 0x4307:
108 chipid_fallback = 0x4307;
111 chipid_fallback = 0x4402;
113 case 0x4610 ... 0x4615:
114 chipid_fallback = 0x4610;
116 case 0x4710 ... 0x4715:
117 chipid_fallback = 0x4710;
119 case 0x4320 ... 0x4325:
120 chipid_fallback = 0x4309;
125 chipid_fallback = 0x4401;
129 "PCI-ID not in fallback list\n");
132 return chipid_fallback;
156 "CHIPID not in nrcores fallback list\n");
174 if (offset >= 0x800) {
181 return lo | (hi << 16);
189 static int scan_switchcore(
struct ssb_bus *bus,
u8 coreidx)
212 #ifdef CONFIG_SSB_PCIHOST
226 unsigned long baseaddr)
238 #ifdef CONFIG_SSB_PCIHOST
246 mmio = (
void __iomem *)baseaddr;
253 static int we_support_multiple_80211_cores(
struct ssb_bus *bus)
260 #ifdef CONFIG_SSB_PCIHOST
263 ((bus->
host_pci->device == 0x4313) ||
264 (bus->
host_pci->device == 0x431A) ||
265 (bus->
host_pci->device == 0x4321) ||
274 unsigned long baseaddr)
281 int nr_80211_cores = 0;
283 mmio = ssb_ioremap(bus, baseaddr);
288 err = scan_switchcore(bus, 0);
330 "More than %d ssb cores found (%d)\n",
347 for (i = 0, dev_i = 0; i < bus->
nr_devices; i++) {
348 err = scan_switchcore(bus, i);
364 "(cc 0x%03X, rev 0x%02X, vendor 0x%04X)\n",
366 dev->
id.coreid, dev->
id.revision, dev->
id.vendor);
368 switch (dev->
id.coreid) {
371 if (nr_80211_cores > 1) {
372 if (!we_support_multiple_80211_cores(bus)) {
380 #ifdef CONFIG_SSB_DRIVER_EXTIF
381 if (bus->
extif.dev) {
383 "WARNING: Multiple EXTIFs found\n");
392 "WARNING: Multiple ChipCommon found\n");
399 #ifdef CONFIG_SSB_DRIVER_MIPS
402 "WARNING: Multiple MIPS cores found\n");
410 #ifdef CONFIG_SSB_DRIVER_PCICORE
424 "WARNING: Multiple PCI(E) cores found\n");
433 (bus->
host_pci->device & 0xFF00) == 0x4300) {