Lines Matching +full:scan +full:- +full:count
9 #include "scan.h"
18 return readb(core->io_addr + offset); in bcma_host_soc_read8()
23 return readw(core->io_addr + offset); in bcma_host_soc_read16()
28 return readl(core->io_addr + offset); in bcma_host_soc_read32()
34 writeb(value, core->io_addr + offset); in bcma_host_soc_write8()
40 writew(value, core->io_addr + offset); in bcma_host_soc_write16()
46 writel(value, core->io_addr + offset); in bcma_host_soc_write32()
51 size_t count, u16 offset, u8 reg_width) in bcma_host_soc_block_read() argument
53 void __iomem *addr = core->io_addr + offset; in bcma_host_soc_block_read()
59 while (count) { in bcma_host_soc_block_read()
62 count--; in bcma_host_soc_block_read()
69 WARN_ON(count & 1); in bcma_host_soc_block_read()
70 while (count) { in bcma_host_soc_block_read()
73 count -= 2; in bcma_host_soc_block_read()
80 WARN_ON(count & 3); in bcma_host_soc_block_read()
81 while (count) { in bcma_host_soc_block_read()
84 count -= 4; in bcma_host_soc_block_read()
95 size_t count, u16 offset, u8 reg_width) in bcma_host_soc_block_write() argument
97 void __iomem *addr = core->io_addr + offset; in bcma_host_soc_block_write()
103 while (count) { in bcma_host_soc_block_write()
106 count--; in bcma_host_soc_block_write()
113 WARN_ON(count & 1); in bcma_host_soc_block_write()
114 while (count) { in bcma_host_soc_block_write()
117 count -= 2; in bcma_host_soc_block_write()
124 WARN_ON(count & 3); in bcma_host_soc_block_write()
125 while (count) { in bcma_host_soc_block_write()
128 count -= 4; in bcma_host_soc_block_write()
140 if (WARN_ONCE(!core->io_wrap, "Accessed core has no wrapper/agent\n")) in bcma_host_soc_aread32()
142 return readl(core->io_wrap + offset); in bcma_host_soc_aread32()
148 if (WARN_ONCE(!core->io_wrap, "Accessed core has no wrapper/agent\n")) in bcma_host_soc_awrite32()
150 writel(value, core->io_wrap + offset); in bcma_host_soc_awrite32()
170 struct bcma_bus *bus = &soc->bus; in bcma_host_soc_register()
173 * to scan the bus. in bcma_host_soc_register()
175 bus->mmio = ioremap(BCMA_ADDR_BASE, BCMA_CORE_SIZE * 1); in bcma_host_soc_register()
176 if (!bus->mmio) in bcma_host_soc_register()
177 return -ENOMEM; in bcma_host_soc_register()
180 bus->hosttype = BCMA_HOSTTYPE_SOC; in bcma_host_soc_register()
181 bus->ops = &bcma_host_soc_ops; in bcma_host_soc_register()
191 struct bcma_bus *bus = &soc->bus; in bcma_host_soc_init()
194 /* Scan bus and initialize it */ in bcma_host_soc_init()
197 iounmap(bus->mmio); in bcma_host_soc_init()
205 struct device *dev = &pdev->dev; in bcma_host_soc_probe()
206 struct device_node *np = dev->of_node; in bcma_host_soc_probe()
213 return -ENOMEM; in bcma_host_soc_probe()
215 bus->dev = dev; in bcma_host_soc_probe()
218 bus->mmio = of_iomap(np, 0); in bcma_host_soc_probe()
219 if (!bus->mmio) in bcma_host_soc_probe()
220 return -ENOMEM; in bcma_host_soc_probe()
223 bus->hosttype = BCMA_HOSTTYPE_SOC; in bcma_host_soc_probe()
224 bus->ops = &bcma_host_soc_ops; in bcma_host_soc_probe()
239 iounmap(bus->mmio); in bcma_host_soc_probe()
248 iounmap(bus->mmio); in bcma_host_soc_remove()
253 { .compatible = "brcm,bus-axi", },
260 .name = "bcma-host-soc",