Lines Matching +full:mini +full:- +full:core

15 #include <linux/dma-mapping.h>
55 { BCMA_CORE_SATA_XORDMA, "SATA XOR-DMA" },
60 { BCMA_CORE_MINI_MACPHY, "Mini MACPHY" },
86 if (id->manuf == BCMA_MANUF_BCM) { in bcma_device_name()
88 if (bcma_device_names[i].id == id->id) in bcma_device_name()
98 return readl(bus->mmio + offset); in bcma_scan_read32()
103 if (bus->hosttype == BCMA_HOSTTYPE_PCI) in bcma_scan_switch_core()
104 pci_write_config_dword(bus->host_pci, BCMA_PCI_BAR0_WIN, in bcma_scan_switch_core()
117 (*eromptr)--; in bcma_erom_push_ent()
124 return -ENOENT; in bcma_erom_get_ci()
126 return -ENOENT; in bcma_erom_get_ci()
164 return -ENOENT; in bcma_erom_get_mst_port()
166 return -ENOENT; in bcma_erom_get_mst_port()
182 return -EINVAL; in bcma_erom_get_addr_desc()
206 struct bcma_device *core; in bcma_find_core_by_index() local
208 list_for_each_entry(core, &bus->cores, list) { in bcma_find_core_by_index()
209 if (core->core_index == index) in bcma_find_core_by_index()
210 return core; in bcma_find_core_by_index()
217 struct bcma_device *core) in bcma_get_next_core() argument
229 return -ESPIPE; in bcma_get_next_core()
230 return -EILSEQ; in bcma_get_next_core()
234 return -EILSEQ; in bcma_get_next_core()
237 core->id.class = (cia & SCAN_CIA_CLASS) >> SCAN_CIA_CLASS_SHIFT; in bcma_get_next_core()
238 core->id.id = (cia & SCAN_CIA_ID) >> SCAN_CIA_ID_SHIFT; in bcma_get_next_core()
239 core->id.manuf = (cia & SCAN_CIA_MANUF) >> SCAN_CIA_MANUF_SHIFT; in bcma_get_next_core()
244 core->id.rev = (cib & SCAN_CIB_REV) >> SCAN_CIB_REV_SHIFT; in bcma_get_next_core()
246 if (((core->id.manuf == BCMA_MANUF_ARM) && in bcma_get_next_core()
247 (core->id.id == 0xFFF)) || in bcma_get_next_core()
250 return -ENXIO; in bcma_get_next_core()
253 /* check if component is a core at all */ in bcma_get_next_core()
259 return -ENXIO; in bcma_get_next_core()
264 return -ENXIO; in bcma_get_next_core()
269 return -ENODEV; in bcma_get_next_core()
272 if (match && ((match->manuf != BCMA_ANY_MANUF && in bcma_get_next_core()
273 match->manuf != core->id.manuf) || in bcma_get_next_core()
274 (match->id != BCMA_ANY_ID && match->id != core->id.id) || in bcma_get_next_core()
275 (match->rev != BCMA_ANY_REV && match->rev != core->id.rev) || in bcma_get_next_core()
276 (match->class != BCMA_ANY_CLASS && match->class != core->id.class) in bcma_get_next_core()
279 return -ENODEV; in bcma_get_next_core()
286 return -EILSEQ; in bcma_get_next_core()
301 core->addr = tmp; in bcma_get_next_core()
318 core->wrap = tmp; in bcma_get_next_core()
336 core->wrap = tmp; in bcma_get_next_core()
340 if (bus->hosttype == BCMA_HOSTTYPE_SOC) { in bcma_get_next_core()
341 core->io_addr = ioremap_nocache(core->addr, BCMA_CORE_SIZE); in bcma_get_next_core()
342 if (!core->io_addr) in bcma_get_next_core()
343 return -ENOMEM; in bcma_get_next_core()
344 core->io_wrap = ioremap_nocache(core->wrap, BCMA_CORE_SIZE); in bcma_get_next_core()
345 if (!core->io_wrap) { in bcma_get_next_core()
346 iounmap(core->io_addr); in bcma_get_next_core()
347 return -ENOMEM; in bcma_get_next_core()
357 if (bus->init_done) in bcma_init_bus()
360 INIT_LIST_HEAD(&bus->cores); in bcma_init_bus()
361 bus->nr_cores = 0; in bcma_init_bus()
366 bus->chipinfo.id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT; in bcma_init_bus()
367 bus->chipinfo.rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT; in bcma_init_bus()
368 bus->chipinfo.pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT; in bcma_init_bus()
369 bus->init_done = true; in bcma_init_bus()
382 if (bus->hosttype == BCMA_HOSTTYPE_SOC) { in bcma_bus_scan()
385 return -ENOMEM; in bcma_bus_scan()
387 eromptr = bus->mmio; in bcma_bus_scan()
395 struct bcma_device *core = kzalloc(sizeof(*core), GFP_KERNEL); in bcma_bus_scan() local
396 if (!core) in bcma_bus_scan()
397 return -ENOMEM; in bcma_bus_scan()
398 INIT_LIST_HEAD(&core->list); in bcma_bus_scan()
399 core->bus = bus; in bcma_bus_scan()
401 err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core); in bcma_bus_scan()
403 kfree(core); in bcma_bus_scan()
404 if (err == -ENODEV) { in bcma_bus_scan()
407 } else if (err == -ENXIO) { in bcma_bus_scan()
409 } else if (err == -ESPIPE) { in bcma_bus_scan()
415 core->core_index = core_num++; in bcma_bus_scan()
416 bus->nr_cores++; in bcma_bus_scan()
418 pr_info("Core %d found: %s " in bcma_bus_scan()
420 core->core_index, bcma_device_name(&core->id), in bcma_bus_scan()
421 core->id.manuf, core->id.id, core->id.rev, in bcma_bus_scan()
422 core->id.class); in bcma_bus_scan()
424 list_add(&core->list, &bus->cores); in bcma_bus_scan()
427 if (bus->hosttype == BCMA_HOSTTYPE_SOC) in bcma_bus_scan()
435 struct bcma_device *core) in bcma_bus_scan_early() argument
440 int err = -ENODEV; in bcma_bus_scan_early()
444 if (bus->hosttype == BCMA_HOSTTYPE_SOC) { in bcma_bus_scan_early()
447 return -ENOMEM; in bcma_bus_scan_early()
449 eromptr = bus->mmio; in bcma_bus_scan_early()
457 memset(core, 0, sizeof(*core)); in bcma_bus_scan_early()
458 INIT_LIST_HEAD(&core->list); in bcma_bus_scan_early()
459 core->bus = bus; in bcma_bus_scan_early()
461 err = bcma_get_next_core(bus, &eromptr, match, core_num, core); in bcma_bus_scan_early()
462 if (err == -ENODEV) { in bcma_bus_scan_early()
465 } else if (err == -ENXIO) in bcma_bus_scan_early()
467 else if (err == -ESPIPE) in bcma_bus_scan_early()
472 core->core_index = core_num++; in bcma_bus_scan_early()
473 bus->nr_cores++; in bcma_bus_scan_early()
474 pr_info("Core %d found: %s " in bcma_bus_scan_early()
476 core->core_index, bcma_device_name(&core->id), in bcma_bus_scan_early()
477 core->id.manuf, core->id.id, core->id.rev, in bcma_bus_scan_early()
478 core->id.class); in bcma_bus_scan_early()
480 list_add(&core->list, &bus->cores); in bcma_bus_scan_early()
485 if (bus->hosttype == BCMA_HOSTTYPE_SOC) in bcma_bus_scan_early()