diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-01-13 12:03:58 -0600 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-01-16 12:11:28 +1100 |
commit | 0d81bda68f2b7adcecf268522ab9149b91115739 (patch) | |
tree | fca09f99b52fc4a422a4d5dda60de4ad50a73aa2 /hdata | |
parent | 97fa9dd999e118144e7d4a5f876c0c7adde5d378 (diff) | |
download | skiboot-0d81bda68f2b7adcecf268522ab9149b91115739.zip skiboot-0d81bda68f2b7adcecf268522ab9149b91115739.tar.gz skiboot-0d81bda68f2b7adcecf268522ab9149b91115739.tar.bz2 |
hdat: Fix XSCOM nodes for P9
The address mapping for multiple chips is different
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r-- | hdata/spira.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/hdata/spira.c b/hdata/spira.c index 987955d..18a0c69 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -233,7 +233,21 @@ static struct dt_node *add_xscom_node(uint64_t base, uint32_t hw_id, uint64_t addr, size; uint64_t freq; - addr = base | ((uint64_t)hw_id << PPC_BITLSHIFT(28)); + switch (proc_gen) { + case proc_gen_p7: + case proc_gen_p8: + /* On P7 and P8 all the chip SCOMs share single region */ + addr = base | ((uint64_t)hw_id << PPC_BITLSHIFT(28)); + break; + case proc_gen_p9: + default: + /* On P9 we need to put the chip ID in the natural powerbus + * position. + */ + addr = base | (((uint64_t)hw_id) << 42); + break; + }; + size = (u64)1 << PPC_BITLSHIFT(28); prlog(PR_INFO, "XSCOM: Found HW ID 0x%x (PCID 0x%x) @ 0x%llx\n", @@ -262,6 +276,10 @@ static struct dt_node *add_xscom_node(uint64_t base, uint32_t hw_id, dt_add_property_strings(node, "compatible", "ibm,xscom", "ibm,power9-xscom"); break; + case proc_gen_p9: + dt_add_property_strings(node, "compatible", + "ibm,xscom", "ibm,power9-xscom"); + break; default: dt_add_property_strings(node, "compatible", "ibm,xscom"); } |