Lines Matching defs:ranges
218 const u_int *ranges;
246 ranges = sc->sc_pci_ranges;
250 ranges = fdtbus_get_prop(sc->sc_phandle, "ranges", &len);
251 if (ranges == NULL) {
252 aprint_error_dev(sc->sc_dev, "missing 'ranges' property\n");
260 * Each entry in the ranges table contains:
269 const uint32_t phys_hi = DECODE32(ranges, 0);
270 uint64_t bus_phys = DECODE64(ranges, 1);
271 const uint64_t cpu_phys = DECODE64(ranges, 3);
272 uint64_t size = DECODE64(ranges, 5);
277 ranges += 7;
283 if (pibs->nranges + 1 >= __arraycount(pibs->ranges)) {
284 aprint_error_dev(sc->sc_dev, "too many IO ranges\n");
287 pibs->ranges[pibs->nranges].bpci = bus_phys;
288 pibs->ranges[pibs->nranges].bbus = cpu_phys;
289 pibs->ranges[pibs->nranges].size = size;
310 if (pmbs->nranges + 1 >= __arraycount(pmbs->ranges)) {
311 aprint_error_dev(sc->sc_dev, "too many mem ranges\n");
315 pmbs->ranges[pmbs->nranges].bpci = bus_phys;
316 pmbs->ranges[pmbs->nranges].bbus = cpu_phys;
317 pmbs->ranges[pmbs->nranges].size = size;
625 const bus_addr_t rmin = pbs->ranges[i].bpci;
626 const bus_addr_t rmax = pbs->ranges[i].bpci - 1 + pbs->ranges[i].size;
628 return pbs->map(t, bpa - pbs->ranges[i].bpci + pbs->ranges[i].bbus, size, flag, bshp);