summaryrefslogtreecommitdiffstats
path: root/hw/npu2-hw-procedures.c
Commit message (Collapse)AuthorAgeFilesLines
* npu2: hw-procedures: Add settings to PHY_RESETReza Arbab2017-09-151-0/+10
| | | | | | | | | Set a few new values in the PHY_RESET procedure, as specified by our updated programming guide documentation. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* npu2: Implement FLRReza Arbab2017-09-121-0/+5
| | | | | | | | | | | | | | Add basic handling of FLR (function level reset) by porting the changes from commit b74841db759d ("npu: Implement FLR") to npu2. The only difference for npu2 is that we track the reset state explicitly with a link flag instead of inferring it from dev->procedure_{status,number,step,data}. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Cc: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* npu2: hw-procedures: Update PHY DC calibration procedureReza Arbab2017-09-041-1/+9
| | | | | | | | | | Per the updated programming guide (procedure 1.2.4), set rx_pr_edge_track_cntl and rx_pr_fw_off appropriately before and after calibration. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* npu2: hw-procedures: Change rx_pr_phase_step valueReza Arbab2017-09-041-1/+1
| | | | | | | | Change this value, per the updated programming guide. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* npu2: hw-procedures: Add comments denoting procedure numberReza Arbab2017-09-041-0/+2
| | | | | | | | | | | There are comments in this file to indicate where each numbered procedure from the programming guide is implemented, for easy searching. Add a couple which were missing. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hw/npu2-hw-procedures.c: Update PHY_RESET procedureAlistair Popple2017-08-271-0/+11
| | | | | | | | | | Newer versions of Hostboot will have various clocks powered down by default to save power. Therefore we need to power them up before accessing the OBUS PHY. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* npu2: Fix typo in messageAndrew Donnellan2017-08-151-1/+1
| | | | | | | Correct "procuedure" -> "procedure". Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* NPU2: Add flag to nvlink config space indicating DL reset stateAlistair Popple2017-06-201-0/+2
| | | | | | | | | | Device drivers need to be able to determine if the DL is out of reset or not so they can safely probe to see if links have already been trained. This patch adds a flag to the vendor specific config space indicating if the DL is out of reset. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hw/npu2-hw-procedures.c: Add nvram option to override zcal calculationsAlistair Popple2017-06-201-8/+20
| | | | | | | | | | | 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>
* npu2: Fix npu2_{read,write}_4b()Reza Arbab2017-06-061-2/+2
| | | | | | | | | | | | When writing or reading 4-byte values, we need to use the upper half of the 64-bit SCOM register. Fix npu2_{read,write}_4b() and their callers to use uint32_t, and appropriately shift the value being written or returned. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> Acked-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hw/npu2-hw-procedures.c: Fix running of zcal procedureAlistair Popple2017-06-061-19/+5
| | | | | | | | | | | The zcal procedure should only be run once per obus (ie. once per group of 3 links). Clean up the code and fix the potential buffer overflow due to a typo. Also updates the zcal settings to their proper values. Fixes coverity 143248. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* npu2: Add hardware link training proceduresAlistair Popple2017-03-301-0/+721
Unlike other system buses the NVLink2 links need to be trained at runtime as training requires interaction from the GPU device drivers. This patch implements the required training procedures for NVLink2, which are different than the NVLink1 equivalents. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud