diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-12-08 22:22:45 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-12-16 14:50:56 +1100 |
commit | 1b9a449d5d48de9520befd09892d85d6aec7ba62 (patch) | |
tree | d8fb15c0217cf0328a8afeb90cb03bac1dbbc8db /hw/phb4.c | |
parent | 0ed09ec18e3f856d5456908c4abe3649a025ea12 (diff) | |
download | skiboot-1b9a449d5d48de9520befd09892d85d6aec7ba62.zip skiboot-1b9a449d5d48de9520befd09892d85d6aec7ba62.tar.gz skiboot-1b9a449d5d48de9520befd09892d85d6aec7ba62.tar.bz2 |
opal-api: add endian conversions to most opal calls
This adds missing endian conversions to most calls, sufficient at least
to handle calls from a kernel booting on mambo.
Subsystems requiring more extensive changes (e.g., xive) will be done
with individual changes.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/phb4.c')
-rw-r--r-- | hw/phb4.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1571,7 +1571,7 @@ static int64_t phb4_set_option(struct phb *phb, enum OpalPhbOption opt, } static int64_t phb4_get_option(struct phb *phb, enum OpalPhbOption opt, - uint64_t *setting) + __be64 *setting) { struct phb4 *p = phb_to_phb4(phb); uint64_t data64; @@ -1579,10 +1579,10 @@ static int64_t phb4_get_option(struct phb *phb, enum OpalPhbOption opt, data64 = phb4_read_reg(p, PHB_CTRLR); switch (opt) { case OPAL_PHB_OPTION_TVE1_4GB: - *setting = (data64 & PPC_BIT(24)) ? 1 : 0; + *setting = cpu_to_be64((data64 & PPC_BIT(24)) ? 1 : 0); break; case OPAL_PHB_OPTION_MMIO_EEH_DISABLE: - *setting = (data64 & PPC_BIT(14)) ? 1 : 0; + *setting = cpu_to_be64((data64 & PPC_BIT(14)) ? 1 : 0); break; default: return OPAL_UNSUPPORTED; |