Lines Matching refs:core

252 	struct bcma_device *core;  in bcma_find_core_by_index()  local
254 list_for_each_entry(core, &bus->cores, list) { in bcma_find_core_by_index()
255 if (core->core_index == index) in bcma_find_core_by_index()
256 return core; in bcma_find_core_by_index()
263 struct bcma_device *core; in bcma_find_core_reverse() local
265 list_for_each_entry_reverse(core, &bus->cores, list) { in bcma_find_core_reverse()
266 if (core->id.id == coreid) in bcma_find_core_reverse()
267 return core; in bcma_find_core_reverse()
276 struct bcma_device *core) in bcma_get_next_core() argument
296 core->id.class = (cia & SCAN_CIA_CLASS) >> SCAN_CIA_CLASS_SHIFT; in bcma_get_next_core()
297 core->id.id = (cia & SCAN_CIA_ID) >> SCAN_CIA_ID_SHIFT; in bcma_get_next_core()
298 core->id.manuf = (cia & SCAN_CIA_MANUF) >> SCAN_CIA_MANUF_SHIFT; in bcma_get_next_core()
303 core->id.rev = (cib & SCAN_CIB_REV) >> SCAN_CIB_REV_SHIFT; in bcma_get_next_core()
305 if (((core->id.manuf == BCMA_MANUF_ARM) && in bcma_get_next_core()
306 (core->id.id == 0xFFF)) || in bcma_get_next_core()
315 switch (core->id.id) { in bcma_get_next_core()
337 match->manuf != core->id.manuf) || in bcma_get_next_core()
338 (match->id != BCMA_ANY_ID && match->id != core->id.id) || in bcma_get_next_core()
339 (match->rev != BCMA_ANY_REV && match->rev != core->id.rev) || in bcma_get_next_core()
340 (match->class != BCMA_ANY_CLASS && match->class != core->id.class) in bcma_get_next_core()
368 core->addr = tmp; in bcma_get_next_core()
381 } else if (k < ARRAY_SIZE(core->addr_s)) { in bcma_get_next_core()
382 core->addr_s[k] = tmp; in bcma_get_next_core()
400 core->wrap = tmp; in bcma_get_next_core()
418 core->wrap = tmp; in bcma_get_next_core()
423 core->io_addr = ioremap_nocache(core->addr, BCMA_CORE_SIZE); in bcma_get_next_core()
424 if (!core->io_addr) in bcma_get_next_core()
426 if (core->wrap) { in bcma_get_next_core()
427 core->io_wrap = ioremap_nocache(core->wrap, in bcma_get_next_core()
429 if (!core->io_wrap) { in bcma_get_next_core()
430 iounmap(core->io_addr); in bcma_get_next_core()
483 struct bcma_device *core = kzalloc(sizeof(*core), GFP_KERNEL); in bcma_bus_scan() local
484 if (!core) { in bcma_bus_scan()
488 INIT_LIST_HEAD(&core->list); in bcma_bus_scan()
489 core->bus = bus; in bcma_bus_scan()
491 err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core); in bcma_bus_scan()
493 kfree(core); in bcma_bus_scan()
505 core->core_index = core_num++; in bcma_bus_scan()
507 other_core = bcma_find_core_reverse(bus, core->id.id); in bcma_bus_scan()
508 core->core_unit = (other_core == NULL) ? 0 : other_core->core_unit + 1; in bcma_bus_scan()
509 bcma_prepare_core(bus, core); in bcma_bus_scan()
512 core->core_index, bcma_device_name(&core->id), in bcma_bus_scan()
513 core->id.manuf, core->id.id, core->id.rev, in bcma_bus_scan()
514 core->id.class); in bcma_bus_scan()
516 list_add_tail(&core->list, &bus->cores); in bcma_bus_scan()