summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/include/common
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2020-07-21 10:49:51 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-09-22 18:49:49 +0300
commit0a068adde505a90ece23caaf19b77567e1d18298 (patch)
treebb4a8b951eef94143747d05ac8ef68c19d1549ba /drivers/misc/habanalabs/include/common
parenta98d73c7fae486f7fea83bdec8599d4fccb6807d (diff)
downloadlinux-0a068adde505a90ece23caaf19b77567e1d18298.tar.bz2
habanalabs: add information about PCIe controller
Update firmware header with new API for getting pcie info such as tx/rx throughput and replay counter. These counters are needed by customers for monitor and maintenance of multiple devices. Add new opcodes to the INFO ioctl to retrieve these counters. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/include/common')
-rw-r--r--drivers/misc/habanalabs/include/common/armcp_if.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/include/common/armcp_if.h b/drivers/misc/habanalabs/include/common/armcp_if.h
index 07f9972db28d..1403c937253c 100644
--- a/drivers/misc/habanalabs/include/common/armcp_if.h
+++ b/drivers/misc/habanalabs/include/common/armcp_if.h
@@ -243,6 +243,8 @@ enum armcp_packet_id {
ARMCP_PACKET_TEMPERATURE_SET, /* sysfs */
ARMCP_PACKET_VOLTAGE_SET, /* sysfs */
ARMCP_PACKET_CURRENT_SET, /* sysfs */
+ ARMCP_PACKET_PCIE_THROUGHPUT_GET, /* internal */
+ ARMCP_PACKET_PCIE_REPLAY_CNT_GET, /* internal */
};
#define ARMCP_PACKET_FENCE_VAL 0xFE8CE7A5
@@ -277,6 +279,9 @@ struct armcp_packet {
__u8 pad; /* unused */
};
+ /* For any general request */
+ __le32 index;
+
/* For frequency get/set */
__le32 pll_index;
@@ -344,6 +349,11 @@ enum armcp_pwm_attributes {
armcp_pwm_enable
};
+enum armcp_pcie_throughput_attributes {
+ armcp_pcie_throughput_tx,
+ armcp_pcie_throughput_rx
+};
+
/* Event Queue Packets */
struct eq_generic_event {