aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2018-03-01 18:57:10 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-03-01 20:17:54 -0600
commit399151e1425e496dad5fb47940dafdd562f255aa (patch)
tree02514599b66d5048c63a377715415ba162bb1213 /include
parentfa1eeea2e98728d364f0bae706d06905cc46ee5c (diff)
downloadskiboot-399151e1425e496dad5fb47940dafdd562f255aa.zip
skiboot-399151e1425e496dad5fb47940dafdd562f255aa.tar.gz
skiboot-399151e1425e496dad5fb47940dafdd562f255aa.tar.bz2
npu2: Split out common helper functions into separate file
Split out common helper functions for NPU register access into a separate file, as these will be used extensively by both NVLink and OpenCAPI code. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Reza Arbab <arbab@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/npu2-regs.h5
-rw-r--r--include/npu2.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/include/npu2-regs.h b/include/npu2-regs.h
index 73925f9..669ab98 100644
--- a/include/npu2-regs.h
+++ b/include/npu2-regs.h
@@ -23,6 +23,11 @@ void npu2_write4(struct npu2 *p, uint64_t reg, uint64_t val);
uint64_t npu2_read(struct npu2 *p, uint64_t reg);
void npu2_write(struct npu2 *p, uint64_t reg, uint64_t val);
void npu2_write_mask(struct npu2 *p, uint64_t reg, uint64_t val, uint64_t mask);
+uint64_t npu2_scom_read(uint64_t gcid, uint64_t scom_base,
+ uint64_t reg, uint64_t size);
+void npu2_scom_write(uint64_t gcid, uint64_t scom_base,
+ uint64_t reg, uint64_t size,
+ uint64_t val);
/* SCOM Registers to dump on HMI to aid in debugging */
#define NPU2_DEBUG_REG_START 0x5011000
diff --git a/include/npu2.h b/include/npu2.h
index c1f3961..a1d57e4 100644
--- a/include/npu2.h
+++ b/include/npu2.h
@@ -164,4 +164,6 @@ void npu2_set_link_flag(struct npu2_dev *ndev, uint8_t flag);
void npu2_clear_link_flag(struct npu2_dev *ndev, uint8_t flag);
uint32_t reset_ntl(struct npu2_dev *ndev);
extern int nv_zcal_nominal;
+bool is_p9dd1(void);
+
#endif /* __NPU2_H */