diff options
author | Alistair Popple <alistair@popple.id.au> | 2017-06-08 16:10:24 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-20 14:18:22 +1000 |
commit | 5b4a8c1d91380f58257f6dcd5665704b787f479d (patch) | |
tree | 272c7c3773f5fbb0ebc105086cbeea89acf5d7c3 /hw/npu2.c | |
parent | f6c4a51a8244467c978d51e8128eca0347c9135d (diff) | |
download | skiboot-5b4a8c1d91380f58257f6dcd5665704b787f479d.zip skiboot-5b4a8c1d91380f58257f6dcd5665704b787f479d.tar.gz skiboot-5b4a8c1d91380f58257f6dcd5665704b787f479d.tar.bz2 |
hw/npu2-hw-procedures.c: Add nvram option to override zcal calculations
In some rare cases the zcal state machine may fail and flag an error. According
to hardware designers it is sometimes ok to ignore this failure and use nominal
values for the calculations. In this case we add a nvram variable
(nv_zcal_override) which will cause skiboot to ignore the failure and use the
nominal value specified in nvram.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/npu2.c')
-rw-r--r-- | hw/npu2.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -35,6 +35,7 @@ #include <bitutils.h> #include <chip.h> #include <phys-map.h> +#include <nvram.h> /* * NPU2 BAR layout definition. We have 3 stacks and each of them @@ -1615,6 +1616,14 @@ static void npu2_create_phb(struct dt_node *dn) void probe_npu2(void) { struct dt_node *np; + const char *zcal; + + /* Check for a zcal override */ + zcal = nvram_query("nv_zcal_override"); + if (zcal) { + nv_zcal_nominal = atoi(zcal); + prlog(PR_WARNING, "NPU2: Using ZCAL impedance override = %d\n", nv_zcal_nominal); + } /* Scan NPU XSCOM nodes */ dt_for_each_compatible(dt_root, np, "ibm,power9-npu") |