habanalabs: add new device CPU boot status
authorIgor Grinberg <igrinberg@habana.ai>
Sun, 24 Feb 2019 09:20:02 +0000 (11:20 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 24 Feb 2019 09:20:02 +0000 (11:20 +0200)
This patch adds a definition of a new status in the device CPU boot stages
and add the handling of the new status.

Signed-off-by: Igor Grinberg <igrinberg@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/include/hl_boot_if.h

index ea979eb..0185f11 100644 (file)
@@ -2550,6 +2550,11 @@ static int goya_init_cpu(struct hl_device *hdev, u32 cpu_timeout)
                                "ARM status %d - DDR initialization failed\n",
                                status);
                        break;
+               case CPU_BOOT_STATUS_UBOOT_NOT_READY:
+                       dev_err(hdev->dev,
+                               "ARM status %d - u-boot stopped by user\n",
+                               status);
+                       break;
                default:
                        dev_err(hdev->dev,
                                "ARM status %d - Invalid status code\n",
index 7475732..4cd04c0 100644 (file)
@@ -18,7 +18,8 @@ enum cpu_boot_status {
        CPU_BOOT_STATUS_IN_SPL,
        CPU_BOOT_STATUS_IN_UBOOT,
        CPU_BOOT_STATUS_DRAM_INIT_FAIL,
-       CPU_BOOT_STATUS_FIT_CORRUPTED
+       CPU_BOOT_STATUS_FIT_CORRUPTED,
+       CPU_BOOT_STATUS_UBOOT_NOT_READY,
 };
 
 enum kmd_msg {