summaryrefslogtreecommitdiffstats
path: root/drivers/accel
diff options
context:
space:
mode:
authorVitaly Margolin <vmargolin@habana.ai>2024-05-27 16:25:37 +0200
committerOfir Bitton <obitton@habana.ai>2024-06-23 08:53:04 +0200
commitcebb64f9335b073cc2877fed16c613c56bed82bc (patch)
tree66b126c82bc522c27eb22c1d96b5acb7a8d705f5 /drivers/accel
parentaccel/habanalabs: add a common handler for clock change events (diff)
downloadlinux-cebb64f9335b073cc2877fed16c613c56bed82bc.tar.xz
linux-cebb64f9335b073cc2877fed16c613c56bed82bc.zip
accel/habanalabs: add cpld ts cpld_timestamp cpucp
Add cpld_timestamp field to cpucp_info structure and return cpld timestamp as part of cpld version Signed-off-by: Vitaly Margolin <vmargolin@habana.ai> Reviewed-by: Ofir Bitton <obitton@habana.ai> Signed-off-by: Ofir Bitton <obitton@habana.ai>
Diffstat (limited to 'drivers/accel')
-rw-r--r--drivers/accel/habanalabs/common/sysfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/accel/habanalabs/common/sysfs.c b/drivers/accel/habanalabs/common/sysfs.c
index b6c63f8a0c1b..e9f8ccc0bbf9 100644
--- a/drivers/accel/habanalabs/common/sysfs.c
+++ b/drivers/accel/habanalabs/common/sysfs.c
@@ -142,8 +142,9 @@ static ssize_t cpld_ver_show(struct device *dev, struct device_attribute *attr,
{
struct hl_device *hdev = dev_get_drvdata(dev);
- return sprintf(buf, "0x%08x\n",
- le32_to_cpu(hdev->asic_prop.cpucp_info.cpld_version));
+ return sprintf(buf, "0x%08x%08x\n",
+ le32_to_cpu(hdev->asic_prop.cpucp_info.cpld_timestamp),
+ le32_to_cpu(hdev->asic_prop.cpucp_info.cpld_version));
}
static ssize_t cpucp_kernel_ver_show(struct device *dev,