Commit 7d21114b authored by Koby Elbaz's avatar Koby Elbaz Committed by Oded Gabbay

habanalabs: support DEVICE_UNUSABLE error indication from FW

In case of multiple ECC errors, FW will set the DEVICE_UNUSABLE bit.
On boot-up, the driver will therefore fail inserting the device.
Signed-off-by: default avatarKoby Elbaz <kelbaz@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent ae382c22
...@@ -342,6 +342,9 @@ static int fw_read_errors(struct hl_device *hdev, u32 boot_err0_reg, ...@@ -342,6 +342,9 @@ static int fw_read_errors(struct hl_device *hdev, u32 boot_err0_reg,
dev_err(hdev->dev, "Device boot error - eFuse failure\n"); dev_err(hdev->dev, "Device boot error - eFuse failure\n");
if (err_val & CPU_BOOT_ERR0_PLL_FAIL) if (err_val & CPU_BOOT_ERR0_PLL_FAIL)
dev_err(hdev->dev, "Device boot error - PLL failure\n"); dev_err(hdev->dev, "Device boot error - PLL failure\n");
if (err_val & CPU_BOOT_ERR0_DEVICE_UNUSABLE_FAIL)
dev_err(hdev->dev,
"Device boot error - device unusable failure\n");
security_val = RREG32(cpu_security_boot_status_reg); security_val = RREG32(cpu_security_boot_status_reg);
if (security_val & CPU_BOOT_DEV_STS0_ENABLED) if (security_val & CPU_BOOT_DEV_STS0_ENABLED)
......
...@@ -73,6 +73,9 @@ ...@@ -73,6 +73,9 @@
* CPU_BOOT_ERR0_PLL_FAIL PLL settings failed, meaning that one * CPU_BOOT_ERR0_PLL_FAIL PLL settings failed, meaning that one
* of the PLLs remains in REF_CLK * of the PLLs remains in REF_CLK
* *
* CPU_BOOT_ERR0_DEVICE_UNUSABLE_FAIL Device is unusable and customer support
* should be contacted.
*
* CPU_BOOT_ERR0_ENABLED Error registers enabled. * CPU_BOOT_ERR0_ENABLED Error registers enabled.
* This is a main indication that the * This is a main indication that the
* running FW populates the error * running FW populates the error
...@@ -92,6 +95,7 @@ ...@@ -92,6 +95,7 @@
#define CPU_BOOT_ERR0_PRI_IMG_VER_FAIL (1 << 10) #define CPU_BOOT_ERR0_PRI_IMG_VER_FAIL (1 << 10)
#define CPU_BOOT_ERR0_SEC_IMG_VER_FAIL (1 << 11) #define CPU_BOOT_ERR0_SEC_IMG_VER_FAIL (1 << 11)
#define CPU_BOOT_ERR0_PLL_FAIL (1 << 12) #define CPU_BOOT_ERR0_PLL_FAIL (1 << 12)
#define CPU_BOOT_ERR0_DEVICE_UNUSABLE_FAIL (1 << 13)
#define CPU_BOOT_ERR0_ENABLED (1 << 31) #define CPU_BOOT_ERR0_ENABLED (1 << 31)
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment