Message ID | 20170615060022.5741-1-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show |
Oliver O'Halloran <oohall@gmail.com> writes: > 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> > --- > hdata/fsp.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Thanks, series merged to master as of 92d7ccf00bdd6c994341feb013390c28993652bf I kept the acked by Mikey from previous round too.
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);
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> --- hdata/fsp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)