aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2016-11-17 18:05:19 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-12-21 16:56:17 +1100
commit5413f5c9a1c3183711f1062ff19dfda39cfb711f (patch)
treea3bfbee85fcfa92c1ea02c862f3e6821c1a91762 /hdata
parent77be3339fba1ea188b19bde5c4199b63c9024a30 (diff)
downloadskiboot-5413f5c9a1c3183711f1062ff19dfda39cfb711f.zip
skiboot-5413f5c9a1c3183711f1062ff19dfda39cfb711f.tar.gz
skiboot-5413f5c9a1c3183711f1062ff19dfda39cfb711f.tar.bz2
tree-wide: use dt_add_property_u64s() where we can
A few places (mostly old code) were using: add_property_cells(hi32(number), lo32(number)); This patch converts them to use the helper rather than doing it manually. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/cpu-common.c3
-rw-r--r--hdata/iohub.c13
-rw-r--r--hdata/memory.c5
-rw-r--r--hdata/spira.c6
4 files changed, 9 insertions, 18 deletions
diff --git a/hdata/cpu-common.c b/hdata/cpu-common.c
index cf0ce8a..491eab8 100644
--- a/hdata/cpu-common.c
+++ b/hdata/cpu-common.c
@@ -104,8 +104,7 @@ struct dt_node * add_core_common(struct dt_node *cpus,
freq = ((uint64_t)be32_to_cpu(tb->actual_clock_speed)) * 1000000ul;
if (freq <= 0xfffffffful)
dt_add_property_cells(cpu, "clock-frequency", freq);
- dt_add_property_cells(cpu, "ibm,extended-clock-frequency",
- hi32(freq), lo32(freq));
+ dt_add_property_u64(cpu, "ibm,extended-clock-frequency", freq);
/* FIXME: Hardcoding is bad. */
dt_add_property_cells(cpu, "timebase-frequency", 512000000);
diff --git a/hdata/iohub.c b/hdata/iohub.c
index 7676adf..50915f8 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -46,10 +46,8 @@ static void io_add_common(struct dt_node *hn, const struct cechub_io_hub *hub)
* do too complex ranges property parsing
*/
dt_add_property(hn, "ranges", NULL, 0);
- dt_add_property_cells(hn, "ibm,gx-bar-1",
- hi32(be64_to_cpu(hub->gx_ctrl_bar1)), lo32(be64_to_cpu(hub->gx_ctrl_bar1)));
- dt_add_property_cells(hn, "ibm,gx-bar-2",
- hi32(be64_to_cpu(hub->gx_ctrl_bar2)), lo32(be64_to_cpu(hub->gx_ctrl_bar2)));
+ dt_add_property_u64(hn, "ibm,gx-bar-1", be64_to_cpu(hub->gx_ctrl_bar1));
+ dt_add_property_u64(hn, "ibm,gx-bar-2", be64_to_cpu(hub->gx_ctrl_bar2));
/* Add presence detect if valid */
if (hub->flags & CECHUB_HUB_FLAG_FAB_BR0_PDT)
@@ -240,11 +238,8 @@ static struct dt_node *io_add_phb3(const struct cechub_io_hub *hub,
u64 eq1 = be64_to_cpu(hub->phb_lane_eq[index][1]);
u64 eq2 = be64_to_cpu(hub->phb_lane_eq[index][2]);
u64 eq3 = be64_to_cpu(hub->phb_lane_eq[index][3]);
- dt_add_property_cells(pbcq, "ibm,lane-eq",
- hi32(eq0), lo32(eq0),
- hi32(eq1), lo32(eq1),
- hi32(eq2), lo32(eq2),
- hi32(eq3), lo32(eq3));
+
+ dt_add_property_u64s(pbcq, "ibm,lane-eq", eq0, eq1, eq2, eq3);
}
/* Currently we only create a PBCQ node, the actual PHB nodes
diff --git a/hdata/memory.c b/hdata/memory.c
index a8b9955..c608091 100644
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -225,9 +225,8 @@ static void add_bus_freq_to_ram_area(struct dt_node *ram_node, u32 chip_id)
return;
}
- freq = ((u64)be32_to_cpu(timebase->memory_bus_frequency)) *1000000ul;
- dt_add_property_cells(ram_node, "ibm,memory-bus-frequency", hi32(freq),
- lo32(freq));
+ freq = ((u64)be32_to_cpu(timebase->memory_bus_frequency)) * 1000000ul;
+ dt_add_property_u64(ram_node, "ibm,memory-bus-frequency", freq);
}
static void add_size_to_ram_area(struct dt_node *ram_node,
diff --git a/hdata/spira.c b/hdata/spira.c
index f3b3502..f87aa27 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -267,8 +267,7 @@ static struct dt_node *add_xscom_node(uint64_t base, uint32_t hw_id,
freq = dt_prop_get_u64_def(dt_root, "nest-frequency", 0);
freq /= 4;
if (freq)
- dt_add_property_cells(node, "bus-frequency",
- hi32(freq), lo32(freq));
+ dt_add_property_u64(node, "bus-frequency", freq);
return node;
}
@@ -806,8 +805,7 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
u64 freq = be32_to_cpu(p->nest_freq_mhz);
freq *= 1000000;
- dt_add_property_cells(dt_root, "nest-frequency",
- hi32(freq), lo32(freq));
+ dt_add_property_u64(dt_root, "nest-frequency", freq);
}
}