[Skiboot] [PATCH stable 05/14] Fix endian flip in printf for FSP in hdata/fsp.c
Stewart Smith
stewart at linux.vnet.ibm.com
Thu Jan 21 14:51:12 AEDT 2016
commit dfab2fb87c2d83e240a002e8829b525d10342df3 upstream
Harmless for skiboot as we're BE.
When building and running unit tests on LE though, we got an incorrect
hw/software version for FSP hardware/software for hdata_to_dt test.
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
hdata/fsp.c | 5 +++--
hdata/test/p81-811.spira.dt | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 595e1f8b1795..158b78b7625f 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -39,8 +39,9 @@ static struct dt_node *fsp_create_node(const void *spss, int i,
}
prlog(PR_INFO, "FSP #%d: FSP HW version %d, SW version %d,"
- " chip DD%d.%d\n",
- i, sp_impl->hw_version, sp_impl->sw_version,
+ " chip DD%d.%d\n", i,
+ be16_to_cpu(sp_impl->hw_version),
+ be16_to_cpu(sp_impl->sw_version),
sp_impl->chip_version >> 4, sp_impl->chip_version & 0xf);
mask = SPSS_SP_IMPL_FLAGS_INSTALLED | SPSS_SP_IMPL_FLAGS_FUNCTIONAL;
if ((be16_to_cpu(sp_impl->func_flags) & mask) != mask) {
diff --git a/hdata/test/p81-811.spira.dt b/hdata/test/p81-811.spira.dt
index 388bb56a26b5..025779a64d1f 100644
--- a/hdata/test/p81-811.spira.dt
+++ b/hdata/test/p81-811.spira.dt
@@ -70,7 +70,7 @@ XSCOM: Found HW ID 0x10 (PCID 0x2) @ 0x3c8000000000
VPD: CCIN desc not available for : 54E8
XSCOM: Found HW ID 0x11 (PCID 0x3) @ 0x3c8800000000
VPD: CCIN desc not available for : 54E8
-FSP #0: FSP HW version 512, SW version 256, chip DD1.0
+FSP #0: FSP HW version 2, SW version 1, chip DD1.0
CEC: HUB FRU 0 is CPU Card
CEC: 2 chips in FRU
CEC: Murano !
--
2.1.4
More information about the Skiboot
mailing list