aboutsummaryrefslogtreecommitdiff
path: root/hw/psi.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/psi.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/psi.c')
-rw-r--r--hw/psi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/psi.c b/hw/psi.c
index 73e49ce..30c2a6c 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -786,10 +786,10 @@ static void psi_create_p9_int_map(struct psi *psi, struct dt_node *np)
int i;
for (i = 0; i < P9_PSI_NUM_IRQS; i++) {
- map[i][0] = i;
- map[i][1] = get_ics_phandle();
- map[i][2] = psi->interrupt + i;
- map[i][3] = 1;
+ map[i][0] = cpu_to_be32(i);
+ map[i][1] = cpu_to_be32(get_ics_phandle());
+ map[i][2] = cpu_to_be32(psi->interrupt + i);
+ map[i][3] = cpu_to_be32(1);
}
dt_add_property(np, "interrupt-map", map, sizeof(map));
dt_add_property_cells(np, "#address-cells", 0);