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:
parent
b9d31cada7
commit
a7224c2116
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue