[Skiboot] [PATCH v2 1/2] hdata: Use GCID in LPC setup
Oliver O'Halloran
oohall at gmail.com
Thu Jun 15 16:00:21 AEST 2017
The HDAT has a notion of "chip ID" which is an arbitrary numbering of
chips. This numbering isn't useful outside of the HDAT so we refer to
chips uing their Global Chip ID (GCID). Currently we're using the HDAT
chip ID in a few places and this patch fixes them.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
hdata/fsp.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 2c8254f930b2..5487f33191ea 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -288,7 +288,8 @@ static void bmc_create_node(const struct HDIF_common_hdr *sp)
const struct spss_sp_impl *sp_impl;
struct dt_node *lpcm, *lpc, *n;
u64 lpcm_base, lpcm_end;
- int chip_id, size;
+ uint32_t chip_id;
+ int size;
bmc_node = dt_new(dt_root, "bmc");
assert(bmc_node);
@@ -318,7 +319,11 @@ static void bmc_create_node(const struct HDIF_common_hdr *sp)
return;
#define GB (1024ul * 1024ul * 1024ul)
- chip_id = be32_to_cpu(iopath->lpc.chip_id);
+ /*
+ * convert the hdat chip ID the HW chip id so we get the right
+ * phys map offset
+ */
+ chip_id = pcid_to_chip_id(be32_to_cpu(iopath->lpc.chip_id));
phys_map_get(get_chip(chip_id), LPC_BUS, 0, &lpcm_base, NULL);
lpcm = dt_new_addr(dt_root, "lpcm-opb", lpcm_base);
--
2.9.3
More information about the Skiboot
mailing list