Lines Matching refs:naddr

21 	int naddr, nsize, i;  in dt_fixup_memory()  local
25 if (getprop(root, "#address-cells", &naddr, sizeof(naddr)) < 0) in dt_fixup_memory()
26 naddr = 2; in dt_fixup_memory()
28 naddr = be32_to_cpu(naddr); in dt_fixup_memory()
29 if (naddr < 1 || naddr > 2) in dt_fixup_memory()
30 fatal("Can't cope with #address-cells == %d in /\n\r", naddr); in dt_fixup_memory()
40 if (naddr == 2) in dt_fixup_memory()
54 for (i = 1; i < (naddr + nsize); i++) in dt_fixup_memory()
58 setprop(memory, "reg", memreg, (naddr + nsize)*sizeof(u32)); in dt_fixup_memory()
137 void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize) in dt_get_reg_format() argument
139 if (getprop(node, "#address-cells", naddr, 4) != 4) in dt_get_reg_format()
140 *naddr = 2; in dt_get_reg_format()
142 *naddr = be32_to_cpu(*naddr); in dt_get_reg_format()
149 static void copy_val(u32 *dest, u32 *src, int naddr) in copy_val() argument
151 int pad = MAX_ADDR_CELLS - naddr; in copy_val()
154 memcpy(dest + pad, src, naddr * 4); in copy_val()
170 static int add_reg(u32 *reg, u32 *add, int naddr) in add_reg() argument
174 for (i = MAX_ADDR_CELLS - 1; i >= MAX_ADDR_CELLS - naddr; i--) { in add_reg()
212 int naddr, int nsize, int buflen) in find_range() argument
214 int nrange = nregaddr + naddr + nsize; in find_range()
222 copy_val(range_size, ranges + i + nregaddr + naddr, nsize); in find_range()
244 u32 naddr, nsize, prev_naddr, prev_nsize; in dt_xlate() local
251 dt_get_reg_format(parent, &naddr, &nsize); in dt_xlate()
255 offset = (naddr + nsize) * res; in dt_xlate()
257 if (reglen < offset + naddr + nsize || in dt_xlate()
258 MAX_PROP_LEN < (offset + naddr + nsize) * 4) in dt_xlate()
261 copy_val(last_addr, prop_buf + offset, naddr); in dt_xlate()
263 ret_size = be32_to_cpu(prop_buf[offset + naddr]); in dt_xlate()
266 ret_size |= be32_to_cpu(prop_buf[offset + naddr + 1]); in dt_xlate()
270 prev_naddr = naddr; in dt_xlate()
278 dt_get_reg_format(parent, &naddr, &nsize); in dt_xlate()
288 naddr, prev_nsize, buflen / 4); in dt_xlate()
297 copy_val(this_addr, prop_buf + offset + prev_naddr, naddr); in dt_xlate()
299 if (!add_reg(last_addr, this_addr, naddr)) in dt_xlate()
303 if (naddr > 2) in dt_xlate()