aboutsummaryrefslogtreecommitdiff
path: root/hw
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 /hw
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 'hw')
-rw-r--r--hw/npu2-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/npu2-common.c b/hw/npu2-common.c
index 4043769..6d5c35a 100644
--- a/hw/npu2-common.c
+++ b/hw/npu2-common.c
@@ -641,6 +641,10 @@ void probe_npu2(void)
struct dt_node *np;
const char *zcal;
+ /* npu2 only */
+ if (!dt_find_compatible_node(dt_root, NULL, "ibm,power9-npu"))
+ return;
+
/* Abort if we're running on POWER9C DD1 (P9N DD1 is not supported) */
if (chip &&
chip->type == PROC_CHIP_P9_CUMULUS &&