aboutsummaryrefslogtreecommitdiff
path: root/hw/imc.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-12-08 22:22:44 +1000
committerOliver O'Halloran <oohall@gmail.com>2019-12-16 14:50:56 +1100
commit0ed09ec18e3f856d5456908c4abe3649a025ea12 (patch)
tree20b76cfd7599e2550af377071b445a94d9766b45 /hw/imc.c
parentca412e3e4ec28a108ffe8be34ab2226c0cf36a9c (diff)
downloadskiboot-0ed09ec18e3f856d5456908c4abe3649a025ea12.zip
skiboot-0ed09ec18e3f856d5456908c4abe3649a025ea12.tar.gz
skiboot-0ed09ec18e3f856d5456908c4abe3649a025ea12.tar.bz2
cpu: use dt accessor device tree access
In several cases the make test reference .dts files were incorrectly byteswapped, these are fixed here too. Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/imc.c')
-rw-r--r--hw/imc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/imc.c b/hw/imc.c
index ca06f3c..16b060d 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -458,8 +458,8 @@ static void imc_dt_update_nest_node(struct dt_node *dev)
base_addr = malloc(sizeof(uint64_t) * nr_chip);
chipids = malloc(sizeof(uint32_t) * nr_chip);
for_each_chip(chip) {
- base_addr[i] = chip->homer_base;
- chipids[i] = chip->id;
+ base_addr[i] = cpu_to_be64(chip->homer_base);
+ chipids[i] = cpu_to_be32(chip->id);
i++;
}