summaryrefslogtreecommitdiffstats
path: root/hdata
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-06-15 16:00:21 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-16 14:38:46 +1000
commitd939c1bbd13cb1f922be80769578eae99a30cad6 (patch)
tree259fb87f167ecfc79b7f370a92b80407a8b78162 /hdata
parent8b5a7c05ac2da8449746687217e75e97fb469b18 (diff)
downloadblackbird-skiboot-d939c1bbd13cb1f922be80769578eae99a30cad6.tar.gz
blackbird-skiboot-d939c1bbd13cb1f922be80769578eae99a30cad6.zip
hdata: Use GCID in LPC setup
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@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/fsp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 2c8254f9..5487f331 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);
OpenPOWER on IntegriCloud