Lines Matching full:na
22 #define OF_CHECK_ADDR_COUNT(na) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS) argument
23 #define OF_CHECK_COUNTS(na, ns) (OF_CHECK_ADDR_COUNT(na) && (ns) > 0) argument
32 static void of_dump_addr(const char *s, const __be32 *addr, int na) in of_dump_addr() argument
35 while (na--) in of_dump_addr()
40 static void of_dump_addr(const char *s, const __be32 *addr, int na) { } in of_dump_addr() argument
51 int na, int ns, int pna);
52 int (*translate)(__be32 *addr, u64 offset, int na);
71 int na, int ns, int pna) in of_bus_default_map() argument
75 cp = of_read_number(range, na); in of_bus_default_map()
76 s = of_read_number(range + na + pna, ns); in of_bus_default_map()
77 da = of_read_number(addr, na); in of_bus_default_map()
86 static int of_bus_default_translate(__be32 *addr, u64 offset, int na) in of_bus_default_translate() argument
88 u64 a = of_read_number(addr, na); in of_bus_default_translate()
89 memset(addr, 0, na * 4); in of_bus_default_translate()
91 if (na > 1) in of_bus_default_translate()
92 addr[na - 2] = cpu_to_be32(a >> 32); in of_bus_default_translate()
93 addr[na - 1] = cpu_to_be32(a & 0xffffffffu); in of_bus_default_translate()
167 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument
181 cp = of_read_number(range + 1, na - 1); in of_bus_pci_map()
182 s = of_read_number(range + na + pna, ns); in of_bus_pci_map()
183 da = of_read_number(addr + 1, na - 1); in of_bus_pci_map()
192 static int of_bus_pci_translate(__be32 *addr, u64 offset, int na) in of_bus_pci_translate() argument
194 return of_bus_default_translate(addr + 1, offset, na - 1); in of_bus_pci_translate()
284 static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_isa_map() argument
294 cp = of_read_number(range + 1, na - 1); in of_bus_isa_map()
295 s = of_read_number(range + na + pna, ns); in of_bus_isa_map()
296 da = of_read_number(addr + 1, na - 1); in of_bus_isa_map()
305 static int of_bus_isa_translate(__be32 *addr, u64 offset, int na) in of_bus_isa_translate() argument
307 return of_bus_default_translate(addr + 1, offset, na - 1); in of_bus_isa_translate()
396 int na, int ns, int pna, const char *rprop) in of_translate_one() argument
429 offset = of_read_number(addr, na); in of_translate_one()
439 rone = na + pna + ns; in of_translate_one()
441 offset = bus->map(addr, ranges, na, ns, pna); in of_translate_one()
449 memcpy(addr, ranges + na, 4 * pna); in of_translate_one()
481 int na, ns, pna, pns; in __of_translate_address() local
497 bus->count_cells(dev, &na, &ns); in __of_translate_address()
498 if (!OF_CHECK_COUNTS(na, ns)) { in __of_translate_address()
502 memcpy(addr, in_addr, na * 4); in __of_translate_address()
504 pr_debug("bus is %s (na=%d, ns=%d) on %pOF\n", in __of_translate_address()
505 bus->name, na, ns, parent); in __of_translate_address()
506 of_dump_addr("translating address:", addr, na); in __of_translate_address()
520 result = of_read_number(addr, na); in __of_translate_address()
530 result = of_read_number(addr + 1, na - 1); in __of_translate_address()
545 pr_debug("parent bus is %s (na=%d, ns=%d) on %pOF\n", in __of_translate_address()
549 if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop)) in __of_translate_address()
553 na = pna; in __of_translate_address()
557 of_dump_addr("one level translation:", addr, na); in __of_translate_address()
636 int onesize, i, na, ns; in __of_get_address() local
647 bus->count_cells(dev, &na, &ns); in __of_get_address()
649 if (!OF_CHECK_ADDR_COUNT(na)) in __of_get_address()
658 onesize = na + ns; in __of_get_address()
665 *size = of_read_number(prop + na, ns); in __of_get_address()
682 parser->na = of_bus_n_addr_cells(node); in parser_init()
714 int na = parser->na; in of_pci_range_parser_one() local
716 int np = parser->pna + na + ns; in of_pci_range_parser_one()
731 range->bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na); in of_pci_range_parser_one()
735 parser->range + na); in of_pci_range_parser_one()
738 parser->range + na); in of_pci_range_parser_one()
739 range->size = of_read_number(parser->range + parser->pna + na, ns); in of_pci_range_parser_one()
749 bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na); in of_pci_range_parser_one()
752 parser->range + na); in of_pci_range_parser_one()
755 parser->range + na); in of_pci_range_parser_one()
756 size = of_read_number(parser->range + parser->pna + na, ns); in of_pci_range_parser_one()