Lines Matching full:core
23 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in manuf_show() local
24 return sprintf(buf, "0x%03X\n", core->id.manuf); in manuf_show()
28 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in id_show() local
29 return sprintf(buf, "0x%03X\n", core->id.id); in id_show()
33 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in rev_show() local
34 return sprintf(buf, "0x%02X\n", core->id.rev); in rev_show()
38 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in class_show() local
39 return sprintf(buf, "0x%X\n", core->id.class); in class_show()
60 struct bcma_device *core; in bcma_find_core() local
62 list_for_each_entry(core, &bus->cores, list) { in bcma_find_core()
63 if (core->id.id == coreid) in bcma_find_core()
64 return core; in bcma_find_core()
71 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in bcma_release_core_dev() local
72 if (core->io_addr) in bcma_release_core_dev()
73 iounmap(core->io_addr); in bcma_release_core_dev()
74 if (core->io_wrap) in bcma_release_core_dev()
75 iounmap(core->io_wrap); in bcma_release_core_dev()
76 kfree(core); in bcma_release_core_dev()
81 struct bcma_device *core; in bcma_register_cores() local
84 list_for_each_entry(core, &bus->cores, list) { in bcma_register_cores()
86 switch (core->id.id) { in bcma_register_cores()
94 core->dev.release = bcma_release_core_dev; in bcma_register_cores()
95 core->dev.bus = &bcma_bus_type; in bcma_register_cores()
96 dev_set_name(&core->dev, "bcma%d:%d", 0/*bus->num*/, dev_id); in bcma_register_cores()
100 core->dev.parent = &bus->host_pci->dev; in bcma_register_cores()
101 core->dma_dev = &bus->host_pci->dev; in bcma_register_cores()
102 core->irq = bus->host_pci->irq; in bcma_register_cores()
105 core->dev.dma_mask = &core->dev.coherent_dma_mask; in bcma_register_cores()
106 core->dma_dev = &core->dev; in bcma_register_cores()
112 err = device_register(&core->dev); in bcma_register_cores()
114 pr_err("Could not register dev for core 0x%03X\n", in bcma_register_cores()
115 core->id.id); in bcma_register_cores()
118 core->dev_registered = true; in bcma_register_cores()
127 struct bcma_device *core; in bcma_unregister_cores() local
129 list_for_each_entry(core, &bus->cores, list) { in bcma_unregister_cores()
130 if (core->dev_registered) in bcma_unregister_cores()
131 device_unregister(&core->dev); in bcma_unregister_cores()
138 struct bcma_device *core; in bcma_bus_register() local
147 /* Init CC core */ in bcma_bus_register()
148 core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON); in bcma_bus_register()
149 if (core) { in bcma_bus_register()
150 bus->drv_cc.core = core; in bcma_bus_register()
154 /* Init MIPS core */ in bcma_bus_register()
155 core = bcma_find_core(bus, BCMA_CORE_MIPS_74K); in bcma_bus_register()
156 if (core) { in bcma_bus_register()
157 bus->drv_mips.core = core; in bcma_bus_register()
161 /* Init PCIE core */ in bcma_bus_register()
162 core = bcma_find_core(bus, BCMA_CORE_PCIE); in bcma_bus_register()
163 if (core) { in bcma_bus_register()
164 bus->drv_pci.core = core; in bcma_bus_register()
193 struct bcma_device *core; in bcma_bus_early_register() local
203 /* Scan for chip common core */ in bcma_bus_early_register()
206 pr_err("Failed to scan for common core: %d\n", err); in bcma_bus_early_register()
215 /* Scan for mips core */ in bcma_bus_early_register()
218 pr_err("Failed to scan for mips core: %d\n", err); in bcma_bus_early_register()
222 /* Init CC core */ in bcma_bus_early_register()
223 core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON); in bcma_bus_early_register()
224 if (core) { in bcma_bus_early_register()
225 bus->drv_cc.core = core; in bcma_bus_early_register()
229 /* Init MIPS core */ in bcma_bus_early_register()
230 core = bcma_find_core(bus, BCMA_CORE_MIPS_74K); in bcma_bus_early_register()
231 if (core) { in bcma_bus_early_register()
232 bus->drv_mips.core = core; in bcma_bus_early_register()
244 struct bcma_device *core; in bcma_bus_suspend() local
246 list_for_each_entry(core, &bus->cores, list) { in bcma_bus_suspend()
247 struct device_driver *drv = core->dev.driver; in bcma_bus_suspend()
251 adrv->suspend(core); in bcma_bus_suspend()
259 struct bcma_device *core; in bcma_bus_resume() local
261 /* Init CC core */ in bcma_bus_resume()
262 core = bcma_find_core(bus, BCMA_CORE_CHIPCOMMON); in bcma_bus_resume()
263 if (core) { in bcma_bus_resume()
268 list_for_each_entry(core, &bus->cores, list) { in bcma_bus_resume()
269 struct device_driver *drv = core->dev.driver; in bcma_bus_resume()
273 adrv->resume(core); in bcma_bus_resume()
299 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in bcma_bus_match() local
301 const struct bcma_device_id *cid = &core->id; in bcma_bus_match()
316 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in bcma_device_probe() local
322 err = adrv->probe(core); in bcma_device_probe()
329 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in bcma_device_remove() local
334 adrv->remove(core); in bcma_device_remove()
341 struct bcma_device *core = container_of(dev, struct bcma_device, dev); in bcma_device_uevent() local
345 core->id.manuf, core->id.id, in bcma_device_uevent()
346 core->id.rev, core->id.class); in bcma_device_uevent()