unsigned int *rp;
int rpsize = (naddrc + nsizec) * sizeof(unsigned int);
- rp = (unsigned int *) get_property(np, "reg", &l);
+ rp = (unsigned int *) get_property(np, "linux,usable-memory", &l);
+ if (rp == NULL)
+ rp = (unsigned int *) get_property(np, "reg", &l);
+
if (rp != 0 && l >= rpsize) {
i = 0;
adr = (struct address_range *) (*mem_start);
} else if (strcmp(type, "memory") != 0)
return 0;
- reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l);
+ reg = (cell_t *)of_get_flat_dt_prop(node, "linux,usable-memory", &l);
+ if (reg == NULL)
+ reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l);
if (reg == NULL)
return 0;
unsigned int *memcell_buf;
unsigned int len;
- memcell_buf = (unsigned int *)get_property(memory, "reg", &len);
+ memcell_buf = (unsigned int *)get_property(memory,
+ "linux,usable-memory", &len);
+ if (!memcell_buf || len <= 0)
+ memcell_buf =
+ (unsigned int *)get_property(memory, "reg",
+ &len);
if (!memcell_buf || len <= 0)
continue;