Lines Matching full:na

23 #define OF_CHECK_ADDR_COUNT(na)	((na) > 0 && (na) <= OF_MAX_ADDR_CELLS)  argument
24 #define OF_CHECK_COUNTS(na, ns) (OF_CHECK_ADDR_COUNT(na) && (ns) > 0) argument
28 static void of_dump_addr(const char *s, const __be32 *addr, int na) in of_dump_addr() argument
31 while (na--) in of_dump_addr()
36 static void of_dump_addr(const char *s, const __be32 *addr, int na) { } in of_dump_addr() argument
47 int na, int ns, int pna, int fna);
48 int (*translate)(__be32 *addr, u64 offset, int na);
67 int na, int ns, int pna, int fna) in of_bus_default_map() argument
71 cp = of_read_number(range + fna, na - fna); in of_bus_default_map()
72 s = of_read_number(range + na + pna, ns); in of_bus_default_map()
73 da = of_read_number(addr + fna, na - fna); in of_bus_default_map()
82 static int of_bus_default_translate(__be32 *addr, u64 offset, int na) in of_bus_default_translate() argument
84 u64 a = of_read_number(addr, na); in of_bus_default_translate()
85 memset(addr, 0, na * 4); in of_bus_default_translate()
87 if (na > 1) in of_bus_default_translate()
88 addr[na - 2] = cpu_to_be32(a >> 32); in of_bus_default_translate()
89 addr[na - 1] = cpu_to_be32(a & 0xffffffffu); in of_bus_default_translate()
104 static u64 of_bus_default_flags_map(__be32 *addr, const __be32 *range, int na, in of_bus_default_flags_map() argument
111 return of_bus_default_map(addr, range, na, ns, pna, fna); in of_bus_default_flags_map()
114 static int of_bus_default_flags_translate(__be32 *addr, u64 offset, int na) in of_bus_default_flags_translate() argument
117 return of_bus_default_translate(addr + 1, offset, na - 1); in of_bus_default_flags_translate()
184 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument
196 return of_bus_default_map(addr, range, na, ns, pna, fna); in of_bus_pci_map()
312 static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_isa_map() argument
319 return of_bus_default_map(addr, range, na, ns, pna, fna); in of_bus_isa_map()
424 int na, int ns, int pna, const char *rprop) in of_translate_one() argument
457 offset = of_read_number(addr, na); in of_translate_one()
467 rone = na + pna + ns; in of_translate_one()
469 offset = bus->map(addr, ranges, na, ns, pna, bus->flag_cells); in of_translate_one()
477 memcpy(addr, ranges + na, 4 * pna); in of_translate_one()
510 int na, ns, pna, pns; in __of_translate_address() local
521 bus->count_cells(dev, &na, &ns); in __of_translate_address()
522 if (!OF_CHECK_COUNTS(na, ns)) { in __of_translate_address()
526 memcpy(addr, in_addr, na * 4); in __of_translate_address()
528 pr_debug("bus is %s (na=%d, ns=%d) on %pOF\n", in __of_translate_address()
529 bus->name, na, ns, parent); in __of_translate_address()
530 of_dump_addr("translating address:", addr, na); in __of_translate_address()
544 return of_read_number(addr, na); in __of_translate_address()
553 u64 result = of_read_number(addr + 1, na - 1); in __of_translate_address()
568 pr_debug("parent bus is %s (na=%d, ns=%d) on %pOF\n", in __of_translate_address()
572 if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop)) in __of_translate_address()
576 na = pna; in __of_translate_address()
580 of_dump_addr("one level translation:", addr, na); in __of_translate_address()
663 int na, ns; in of_translate_dma_region() local
668 na = of_bus_n_addr_cells(parent); in of_translate_dma_region()
675 size = of_read_number(prop + na, ns); in of_translate_dma_region()
683 return prop + na + ns; in of_translate_dma_region()
694 int onesize, i, na, ns; in __of_get_address() local
704 bus->count_cells(dev, &na, &ns); in __of_get_address()
705 if (!OF_CHECK_ADDR_COUNT(na)) in __of_get_address()
714 onesize = na + ns; in __of_get_address()
721 *size = of_read_number(prop + na, ns); in __of_get_address()
761 parser->na = of_bus_n_addr_cells(node); in parser_init()
793 int na = parser->na; in of_pci_range_parser_one() local
795 int np = parser->pna + na + ns; in of_pci_range_parser_one()
806 range->bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na); in of_pci_range_parser_one()
810 parser->range + na); in of_pci_range_parser_one()
813 parser->range + na); in of_pci_range_parser_one()
814 range->size = of_read_number(parser->range + parser->pna + na, ns); in of_pci_range_parser_one()
824 bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na); in of_pci_range_parser_one()
827 parser->range + na); in of_pci_range_parser_one()
830 parser->range + na); in of_pci_range_parser_one()
831 size = of_read_number(parser->range + parser->pna + na, ns); in of_pci_range_parser_one()