crypto/octeontx: add global resource init
[dpdk.git] / drivers / crypto / octeontx / otx_cryptodev_hw_access.h
index 1e1877c..6e5731a 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <stdbool.h>
 
+#include <rte_io.h>
 #include <rte_memory.h>
 
 #include "cpt_common.h"
 /* Default command queue length */
 #define DEFAULT_CMD_QCHUNKS            2
 
+#define CPT_CSR_REG_BASE(cpt)          ((cpt)->reg_base)
+
+/* Read hw register */
+#define CPT_READ_CSR(__hw_addr, __offset) \
+       rte_read64_relaxed((uint8_t *)__hw_addr + __offset)
+
+/* Write hw register */
+#define CPT_WRITE_CSR(__hw_addr, __offset, __val) \
+       rte_write64_relaxed((__val), ((uint8_t *)__hw_addr + __offset))
+
 /* cpt instance */
 struct cpt_instance {
        uint32_t queue_id;
@@ -131,4 +142,7 @@ otx_cpt_poll_misc(struct cpt_vf *cptvf);
 int
 otx_cpt_hw_init(struct cpt_vf *cptvf, void *pdev, void *reg_base, char *name);
 
+int
+otx_cpt_deinit_device(void *dev);
+
 #endif /* _OTX_CRYPTODEV_HW_ACCESS_H_ */