diff options
Diffstat (limited to 'hw/ppc/spapr_drc.c')
-rw-r--r-- | hw/ppc/spapr_drc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 597f236b9c..bacadfcac5 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -781,7 +781,7 @@ SpaprDrc *spapr_drc_by_id(const char *type, uint32_t id) } /** - * spapr_drc_populate_dt + * spapr_dt_drc * * @fdt: libfdt device tree * @path: path in the DT to generate properties @@ -794,8 +794,7 @@ SpaprDrc *spapr_drc_by_id(const char *type, uint32_t id) * * as documented in PAPR+ v2.1, 13.5.2 */ -int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner, - uint32_t drc_type_mask) +int spapr_dt_drc(void *fdt, int offset, Object *owner, uint32_t drc_type_mask) { Object *root_container; ObjectProperty *prop; @@ -873,7 +872,7 @@ int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner, *(uint32_t *)drc_names->str = cpu_to_be32(drc_count); *(uint32_t *)drc_types->str = cpu_to_be32(drc_count); - ret = fdt_setprop(fdt, fdt_offset, "ibm,drc-indexes", + ret = fdt_setprop(fdt, offset, "ibm,drc-indexes", drc_indexes->data, drc_indexes->len * sizeof(uint32_t)); if (ret) { @@ -881,7 +880,7 @@ int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner, goto out; } - ret = fdt_setprop(fdt, fdt_offset, "ibm,drc-power-domains", + ret = fdt_setprop(fdt, offset, "ibm,drc-power-domains", drc_power_domains->data, drc_power_domains->len * sizeof(uint32_t)); if (ret) { @@ -889,14 +888,14 @@ int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner, goto out; } - ret = fdt_setprop(fdt, fdt_offset, "ibm,drc-names", + ret = fdt_setprop(fdt, offset, "ibm,drc-names", drc_names->str, drc_names->len); if (ret) { error_report("Couldn't finalize ibm,drc-names property"); goto out; } - ret = fdt_setprop(fdt, fdt_offset, "ibm,drc-types", + ret = fdt_setprop(fdt, offset, "ibm,drc-types", drc_types->str, drc_types->len); if (ret) { error_report("Couldn't finalize ibm,drc-types property"); |