habanalabs: fix endianness when reading cpld version

Current sysfs implementation does not take endianness into
consideration when dumping the cpld version.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
Ofir Bitton 2021-12-15 14:48:27 +02:00 committed by Oded Gabbay
parent b9d31cada7
commit a7224c2116
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ static ssize_t cpld_ver_show(struct device *dev, struct device_attribute *attr,
struct hl_device *hdev = dev_get_drvdata(dev); struct hl_device *hdev = dev_get_drvdata(dev);
return sprintf(buf, "0x%08x\n", return sprintf(buf, "0x%08x\n",
hdev->asic_prop.cpucp_info.cpld_version); le32_to_cpu(hdev->asic_prop.cpucp_info.cpld_version));
} }
static ssize_t cpucp_kernel_ver_show(struct device *dev, static ssize_t cpucp_kernel_ver_show(struct device *dev,