Lines Matching +full:mini +full:- +full:cards
5 * Copyright (C) 2005-2007 Michael Buesch <m@bues.ch>
6 * Copyright (C) 2005 Martin Langer <martin-langer@gmx.de>
78 return "SATA XOR-DMA"; in ssb_core_name()
82 return "PCI-E"; in ssb_core_name()
88 return "Mini MACPHY"; in ssb_core_name()
103 switch (pci_dev->device) { in pcidev_to_chipid()
128 dev_err(&pci_dev->dev, "PCI-ID not in fallback list\n"); in pcidev_to_chipid()
165 switch (bus->bustype) { in scan_read32()
174 offset -= 0x800; in scan_read32()
177 lo = readw(bus->mmio + offset); in scan_read32()
178 hi = readw(bus->mmio + offset + 2); in scan_read32()
184 return readl(bus->mmio + offset); in scan_read32()
189 switch (bus->bustype) { in scan_switchcore()
204 switch (bus->bustype) { in ssb_iounmap()
207 iounmap(bus->mmio); in ssb_iounmap()
211 pci_iounmap(bus->host_pci, bus->mmio); in ssb_iounmap()
219 bus->mmio = NULL; in ssb_iounmap()
220 bus->mapped_device = NULL; in ssb_iounmap()
228 switch (bus->bustype) { in ssb_ioremap()
237 mmio = pci_iomap(bus->host_pci, 0, ~0UL); in ssb_ioremap()
259 if (bus->bustype == SSB_BUSTYPE_PCI) { in we_support_multiple_80211_cores()
260 if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM && in we_support_multiple_80211_cores()
261 ((bus->host_pci->device == 0x4313) || in we_support_multiple_80211_cores()
262 (bus->host_pci->device == 0x431A) || in we_support_multiple_80211_cores()
263 (bus->host_pci->device == 0x4321) || in we_support_multiple_80211_cores()
264 (bus->host_pci->device == 0x4324))) in we_support_multiple_80211_cores()
274 int err = -ENOMEM; in ssb_bus_scan()
284 bus->mmio = mmio; in ssb_bus_scan()
295 bus->nr_devices = 0; in ssb_bus_scan()
299 bus->chip_id = (tmp & SSB_CHIPCO_IDMASK); in ssb_bus_scan()
300 bus->chip_rev = (tmp & SSB_CHIPCO_REVMASK) >> in ssb_bus_scan()
302 bus->chip_package = (tmp & SSB_CHIPCO_PACKMASK) >> in ssb_bus_scan()
305 bus->nr_devices = (tmp & SSB_CHIPCO_NRCORESMASK) >> in ssb_bus_scan()
309 bus->chipco.capabilities = tmp; in ssb_bus_scan()
311 if (bus->bustype == SSB_BUSTYPE_PCI) { in ssb_bus_scan()
312 bus->chip_id = pcidev_to_chipid(bus->host_pci); in ssb_bus_scan()
313 bus->chip_rev = bus->host_pci->revision; in ssb_bus_scan()
314 bus->chip_package = 0; in ssb_bus_scan()
316 bus->chip_id = 0x4710; in ssb_bus_scan()
317 bus->chip_rev = 0; in ssb_bus_scan()
318 bus->chip_package = 0; in ssb_bus_scan()
322 bus->chip_id, bus->chip_rev, bus->chip_package); in ssb_bus_scan()
323 if (!bus->nr_devices) in ssb_bus_scan()
324 bus->nr_devices = chipid_to_nrcores(bus->chip_id); in ssb_bus_scan()
325 if (bus->nr_devices > ARRAY_SIZE(bus->devices)) { in ssb_bus_scan()
327 SSB_MAX_NR_CORES, bus->nr_devices); in ssb_bus_scan()
328 err = -EINVAL; in ssb_bus_scan()
331 if (bus->bustype == SSB_BUSTYPE_SSB) { in ssb_bus_scan()
335 err = -ENOMEM; in ssb_bus_scan()
337 mmio = ioremap(baseaddr, SSB_CORE_SIZE * bus->nr_devices); in ssb_bus_scan()
340 bus->mmio = mmio; in ssb_bus_scan()
344 for (i = 0, dev_i = 0; i < bus->nr_devices; i++) { in ssb_bus_scan()
348 dev = &(bus->devices[dev_i]); in ssb_bus_scan()
351 dev->id.coreid = (idhi & SSB_IDHIGH_CC) >> SSB_IDHIGH_CC_SHIFT; in ssb_bus_scan()
352 dev->id.revision = (idhi & SSB_IDHIGH_RCLO); in ssb_bus_scan()
353 dev->id.revision |= (idhi & SSB_IDHIGH_RCHI) >> SSB_IDHIGH_RCHI_SHIFT; in ssb_bus_scan()
354 dev->id.vendor = (idhi & SSB_IDHIGH_VC) >> SSB_IDHIGH_VC_SHIFT; in ssb_bus_scan()
355 dev->core_index = i; in ssb_bus_scan()
356 dev->bus = bus; in ssb_bus_scan()
357 dev->ops = bus->ops; in ssb_bus_scan()
360 i, ssb_core_name(dev->id.coreid), in ssb_bus_scan()
361 dev->id.coreid, dev->id.revision, dev->id.vendor); in ssb_bus_scan()
363 switch (dev->id.coreid) { in ssb_bus_scan()
375 if (bus->extif.dev) { in ssb_bus_scan()
379 bus->extif.dev = dev; in ssb_bus_scan()
383 if (bus->chipco.dev) { in ssb_bus_scan()
387 bus->chipco.dev = dev; in ssb_bus_scan()
392 if (bus->mipscore.dev) { in ssb_bus_scan()
396 bus->mipscore.dev = dev; in ssb_bus_scan()
402 if (bus->bustype == SSB_BUSTYPE_PCI) { in ssb_bus_scan()
403 /* Ignore PCI cores on PCI-E cards. in ssb_bus_scan()
404 * Ignore PCI-E cores on PCI cards. in ssb_bus_scan()
406 if (dev->id.coreid == SSB_DEV_PCI) { in ssb_bus_scan()
407 if (pci_is_pcie(bus->host_pci)) in ssb_bus_scan()
410 if (!pci_is_pcie(bus->host_pci)) in ssb_bus_scan()
414 if (bus->pcicore.dev) { in ssb_bus_scan()
418 bus->pcicore.dev = dev; in ssb_bus_scan()
422 if (bus->bustype == SSB_BUSTYPE_PCI) { in ssb_bus_scan()
423 if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM && in ssb_bus_scan()
424 (bus->host_pci->device & 0xFF00) == 0x4300) { in ssb_bus_scan()
438 bus->nr_devices = dev_i; in ssb_bus_scan()