diff options
author | Alistair Popple <alistair@popple.id.au> | 2017-06-15 15:51:54 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-20 14:31:56 +1000 |
commit | 3704e7784d0f65d926901799af14247613006876 (patch) | |
tree | 8c5b717167164200faabf525fd45728d2dfb42ed /include/npu2.h | |
parent | ebfcfaa0c3e5b3813d3e35d456f7c16c6a53ff0d (diff) | |
download | talos-skiboot-3704e7784d0f65d926901799af14247613006876.tar.gz talos-skiboot-3704e7784d0f65d926901799af14247613006876.zip |
NPU2: Add flag to nvlink config space indicating DL reset state
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>
Diffstat (limited to 'include/npu2.h')
-rw-r--r-- | include/npu2.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/npu2.h b/include/npu2.h index c7daeb66..3b013c9c 100644 --- a/include/npu2.h +++ b/include/npu2.h @@ -35,6 +35,10 @@ #define NPU2_LINKS_PER_CHIP 6 +/* Link flags */ +#define NPU2_DEV_PCI_LINKED 0x1 +#define NPU2_DEV_DL_RESET 0x2 + /* Return the stack (0-2) of a device */ #define NPU2DEV_STACK(ndev) ((ndev)->index / 2) @@ -89,7 +93,7 @@ struct npu2_dev { struct phb *phb; struct pci_device *pd; - int ntl_reset_done; + uint8_t link_flags; /* Vendor specific capability */ uint32_t vendor_cap; @@ -147,5 +151,6 @@ void npu2_write_mask(struct npu2 *p, uint64_t reg, uint64_t val, uint64_t mask); int64_t npu2_dev_procedure(void *dev, struct pci_cfg_reg_filter *pcrf, uint32_t offset, uint32_t len, uint32_t *data, bool write); +void npu2_set_link_flag(struct npu2_dev *ndev, uint8_t flag); extern int nv_zcal_nominal; #endif /* __NPU2_H */ |