Lines Matching refs:eromptr
156 static u32 bcma_erom_get_ent(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_ent() argument
158 u32 ent = readl(*eromptr); in bcma_erom_get_ent()
159 (*eromptr)++; in bcma_erom_get_ent()
163 static void bcma_erom_push_ent(u32 __iomem **eromptr) in bcma_erom_push_ent() argument
165 (*eromptr)--; in bcma_erom_push_ent()
168 static s32 bcma_erom_get_ci(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_ci() argument
170 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_ci()
178 static bool bcma_erom_is_end(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_is_end() argument
180 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_is_end()
181 bcma_erom_push_ent(eromptr); in bcma_erom_is_end()
185 static bool bcma_erom_is_bridge(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_is_bridge() argument
187 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_is_bridge()
188 bcma_erom_push_ent(eromptr); in bcma_erom_is_bridge()
194 static void bcma_erom_skip_component(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_skip_component() argument
198 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_skip_component()
205 bcma_erom_push_ent(eromptr); in bcma_erom_skip_component()
208 static s32 bcma_erom_get_mst_port(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_mst_port() argument
210 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_mst_port()
218 static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr, in bcma_erom_get_addr_desc() argument
224 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
229 bcma_erom_push_ent(eromptr); in bcma_erom_get_addr_desc()
235 bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
238 size = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
240 bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
271 static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr, in bcma_get_next_core() argument
281 cia = bcma_erom_get_ci(bus, eromptr); in bcma_get_next_core()
283 bcma_erom_push_ent(eromptr); in bcma_get_next_core()
284 if (bcma_erom_is_end(bus, eromptr)) in bcma_get_next_core()
288 cib = bcma_erom_get_ci(bus, eromptr); in bcma_get_next_core()
305 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
320 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
325 if (bcma_erom_is_bridge(bus, eromptr)) { in bcma_get_next_core()
326 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
331 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
341 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
347 s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr); in bcma_get_next_core()
355 tmp = bcma_erom_get_addr_desc(bus, eromptr, SCAN_ADDR_TYPE_SLAVE, 0); in bcma_get_next_core()
358 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
373 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
390 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
408 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
459 u32 __iomem *eromptr, *eromend; in bcma_bus_scan() local
469 eromptr = ioremap(erombase, BCMA_CORE_SIZE); in bcma_bus_scan()
470 if (!eromptr) in bcma_bus_scan()
473 eromptr = bus->mmio; in bcma_bus_scan()
476 eromend = eromptr + BCMA_CORE_SIZE / sizeof(u32); in bcma_bus_scan()
480 while (eromptr < eromend) { in bcma_bus_scan()
490 err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core); in bcma_bus_scan()
521 iounmap(eromptr); in bcma_bus_scan()