Lines Matching refs:eromptr
157 static u32 bcma_erom_get_ent(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_ent() argument
159 u32 ent = readl(*eromptr); in bcma_erom_get_ent()
160 (*eromptr)++; in bcma_erom_get_ent()
164 static void bcma_erom_push_ent(u32 __iomem **eromptr) in bcma_erom_push_ent() argument
166 (*eromptr)--; in bcma_erom_push_ent()
169 static s32 bcma_erom_get_ci(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_ci() argument
171 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_ci()
179 static bool bcma_erom_is_end(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_is_end() argument
181 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_is_end()
182 bcma_erom_push_ent(eromptr); in bcma_erom_is_end()
186 static bool bcma_erom_is_bridge(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_is_bridge() argument
188 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_is_bridge()
189 bcma_erom_push_ent(eromptr); in bcma_erom_is_bridge()
195 static void bcma_erom_skip_component(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_skip_component() argument
199 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_skip_component()
206 bcma_erom_push_ent(eromptr); in bcma_erom_skip_component()
209 static s32 bcma_erom_get_mst_port(struct bcma_bus *bus, u32 __iomem **eromptr) in bcma_erom_get_mst_port() argument
211 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_mst_port()
219 static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr, in bcma_erom_get_addr_desc() argument
225 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
230 bcma_erom_push_ent(eromptr); in bcma_erom_get_addr_desc()
236 bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
239 size = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
241 bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_addr_desc()
272 static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr, in bcma_get_next_core() argument
282 cia = bcma_erom_get_ci(bus, eromptr); in bcma_get_next_core()
284 bcma_erom_push_ent(eromptr); in bcma_get_next_core()
285 if (bcma_erom_is_end(bus, eromptr)) in bcma_get_next_core()
289 cib = bcma_erom_get_ci(bus, eromptr); in bcma_get_next_core()
306 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
321 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
326 if (bcma_erom_is_bridge(bus, eromptr)) { in bcma_get_next_core()
327 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
332 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
342 bcma_erom_skip_component(bus, eromptr); in bcma_get_next_core()
348 s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr); in bcma_get_next_core()
356 tmp = bcma_erom_get_addr_desc(bus, eromptr, SCAN_ADDR_TYPE_SLAVE, 0); in bcma_get_next_core()
359 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
374 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
391 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
409 tmp = bcma_erom_get_addr_desc(bus, eromptr, in bcma_get_next_core()
460 u32 __iomem *eromptr, *eromend; in bcma_bus_scan() local
470 eromptr = ioremap(erombase, BCMA_CORE_SIZE); in bcma_bus_scan()
471 if (!eromptr) in bcma_bus_scan()
474 eromptr = bus->mmio; in bcma_bus_scan()
477 eromend = eromptr + BCMA_CORE_SIZE / sizeof(u32); in bcma_bus_scan()
481 while (eromptr < eromend) { in bcma_bus_scan()
491 err = bcma_get_next_core(bus, &eromptr, NULL, core_num, core); in bcma_bus_scan()
522 iounmap(eromptr); in bcma_bus_scan()