Lines Matching refs:prop

40 static struct property *clone_property(struct property *prop, u32 prop_sz)  in clone_property()  argument
48 new_prop->name = kstrdup(prop->name, GFP_KERNEL); in clone_property()
65 struct property *prop) in drmem_update_dt_v1() argument
72 new_prop = clone_property(prop, prop->length); in drmem_update_dt_v1()
104 struct property *prop) in drmem_update_dt_v2() argument
130 new_prop = clone_property(prop, prop_sz); in drmem_update_dt_v2()
175 struct property *prop; in drmem_update_dt() local
187 prop = of_find_property(memory, "ibm,dynamic-memory", NULL); in drmem_update_dt()
188 if (prop) { in drmem_update_dt()
189 rc = drmem_update_dt_v1(memory, prop); in drmem_update_dt()
191 prop = of_find_property(memory, "ibm,dynamic-memory-v2", NULL); in drmem_update_dt()
192 if (prop) in drmem_update_dt()
193 rc = drmem_update_dt_v2(memory, prop); in drmem_update_dt()
202 const __be32 **prop) in read_drconf_v1_cell() argument
204 const __be32 *p = *prop; in read_drconf_v1_cell()
215 *prop = p; in read_drconf_v1_cell()
219 __walk_drmem_v1_lmbs(const __be32 *prop, const __be32 *usm, void *data, in __walk_drmem_v1_lmbs() argument
226 n_lmbs = of_read_number(prop++, 1); in __walk_drmem_v1_lmbs()
228 read_drconf_v1_cell(&lmb, &prop); in __walk_drmem_v1_lmbs()
238 const __be32 **prop) in read_drconf_v2_cell() argument
240 const __be32 *p = *prop; in read_drconf_v2_cell()
249 *prop = p; in read_drconf_v2_cell()
253 __walk_drmem_v2_lmbs(const __be32 *prop, const __be32 *usm, void *data, in __walk_drmem_v2_lmbs() argument
261 lmb_sets = of_read_number(prop++, 1); in __walk_drmem_v2_lmbs()
263 read_drconf_v2_cell(&dr_cell, &prop); in __walk_drmem_v2_lmbs()
288 const __be32 *prop, *usm; in walk_drmem_lmbs_early() local
291 prop = of_get_flat_dt_prop(node, "ibm,lmb-size", &len); in walk_drmem_lmbs_early()
292 if (!prop || len < dt_root_size_cells * sizeof(__be32)) in walk_drmem_lmbs_early()
299 drmem_info->lmb_size = dt_mem_next_cell(dt_root_size_cells, &prop); in walk_drmem_lmbs_early()
303 prop = of_get_flat_dt_prop(node, "ibm,dynamic-memory", &len); in walk_drmem_lmbs_early()
304 if (prop) { in walk_drmem_lmbs_early()
305 ret = __walk_drmem_v1_lmbs(prop, usm, data, func); in walk_drmem_lmbs_early()
307 prop = of_get_flat_dt_prop(node, "ibm,dynamic-memory-v2", in walk_drmem_lmbs_early()
309 if (prop) in walk_drmem_lmbs_early()
310 ret = __walk_drmem_v2_lmbs(prop, usm, data, func); in walk_drmem_lmbs_early()
342 void drmem_update_lmbs(struct property *prop) in drmem_update_lmbs() argument
351 if (!strcmp(prop->name, "ibm,dynamic-memory")) in drmem_update_lmbs()
352 __walk_drmem_v1_lmbs(prop->value, NULL, NULL, update_lmb); in drmem_update_lmbs()
353 else if (!strcmp(prop->name, "ibm,dynamic-memory-v2")) in drmem_update_lmbs()
354 __walk_drmem_v2_lmbs(prop->value, NULL, NULL, update_lmb); in drmem_update_lmbs()
360 const __be32 *prop; in init_drmem_lmb_size() local
366 prop = of_get_property(dn, "ibm,lmb-size", &len); in init_drmem_lmb_size()
367 if (!prop || len < n_root_size_cells * sizeof(__be32)) { in init_drmem_lmb_size()
372 drmem_info->lmb_size = of_read_number(prop, n_root_size_cells); in init_drmem_lmb_size()
383 const __be32 *prop; in of_get_usable_memory() local
386 prop = of_get_property(dn, "linux,drconf-usable-memory", &len); in of_get_usable_memory()
387 if (!prop || len < sizeof(unsigned int)) in of_get_usable_memory()
390 return prop; in of_get_usable_memory()
396 const __be32 *prop, *usm; in walk_drmem_lmbs() local
413 prop = of_get_property(dn, "ibm,dynamic-memory", NULL); in walk_drmem_lmbs()
414 if (prop) { in walk_drmem_lmbs()
415 ret = __walk_drmem_v1_lmbs(prop, usm, data, func); in walk_drmem_lmbs()
417 prop = of_get_property(dn, "ibm,dynamic-memory-v2", NULL); in walk_drmem_lmbs()
418 if (prop) in walk_drmem_lmbs()
419 ret = __walk_drmem_v2_lmbs(prop, usm, data, func); in walk_drmem_lmbs()
425 static void __init init_drmem_v1_lmbs(const __be32 *prop) in init_drmem_v1_lmbs() argument
429 drmem_info->n_lmbs = of_read_number(prop++, 1); in init_drmem_v1_lmbs()
439 read_drconf_v1_cell(lmb, &prop); in init_drmem_v1_lmbs()
442 static void __init init_drmem_v2_lmbs(const __be32 *prop) in init_drmem_v2_lmbs() argument
450 lmb_sets = of_read_number(prop++, 1); in init_drmem_v2_lmbs()
455 p = prop; in init_drmem_v2_lmbs()
468 p = prop; in init_drmem_v2_lmbs()
491 const __be32 *prop; in drmem_init() local
504 prop = of_get_property(dn, "ibm,dynamic-memory", NULL); in drmem_init()
505 if (prop) { in drmem_init()
506 init_drmem_v1_lmbs(prop); in drmem_init()
508 prop = of_get_property(dn, "ibm,dynamic-memory-v2", NULL); in drmem_init()
509 if (prop) in drmem_init()
510 init_drmem_v2_lmbs(prop); in drmem_init()