aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorReza Arbab <arbab@linux.ibm.com>2019-07-17 15:44:24 -0500
committerOliver O'Halloran <oohall@gmail.com>2019-07-26 15:30:21 +1000
commitd9b06b855e8b858976491c19ab9bd792e3a4c3e5 (patch)
tree408509b682fc6fe19adc70f4edb99e160314c7e9 /hdata
parentd9ecf61c330f5b8d0e2ff66af4e29a999dfd111b (diff)
downloadskiboot-d9b06b855e8b858976491c19ab9bd792e3a4c3e5.zip
skiboot-d9b06b855e8b858976491c19ab9bd792e3a4c3e5.tar.gz
skiboot-d9b06b855e8b858976491c19ab9bd792e3a4c3e5.tar.bz2
npu2: Add checks to npu2-only codepaths
To prepare for npu3, add a few checks in codepaths that are only for npu2. Compare against PVR_TYPE_P9, as npu3 will be in systems of PVR_TYPE_P9P (or greater). Alternatively, check for dt compatibility with "ibm,power9-npu" because npu3 will use "ibm,power9-npu3". Signed-off-by: Reza Arbab <arbab@linux.ibm.com> Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/spira.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index b34a1a2..f6003ea 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1507,7 +1507,8 @@ static void add_npus(void)
int phb_index = 7; /* Start counting from 7, for no reason */
int npu_index = 0;
- if (proc_gen < proc_gen_p9)
+ /* Only consult HDAT for npu2 */
+ if (cpu_type != PVR_TYPE_P9)
return;
dt_for_each_compatible(dt_root, xscom, "ibm,xscom") {
@@ -1634,8 +1635,7 @@ int parse_hdat(bool is_opal)
io_parse();
/* Add NPU nodes */
- if (proc_gen >= proc_gen_p9)
- add_npus();
+ add_npus();
/* Parse VPD */
vpd_parse();