nvme: assume die 0 if clock-gates not set

Signed-off-by: Mario Hros <git@reversity.org>
This commit is contained in:
Mario Hros 2023-02-06 22:48:18 +01:00 committed by Hector Martin
parent 8bf08b0ff1
commit 34f49a56fc

View file

@ -304,8 +304,8 @@ bool nvme_init(void)
u32 cg;
if (ADT_GETPROP(adt, node, "clock-gates", &cg) < 0) {
printf("nvme: Error getting NVMe clock-gates\n");
return NULL;
printf("nvme: clock-gates not set\n");
cg = 0;
}
nvme_die = FIELD_GET(PMGR_DIE_ID, cg);
printf("nvme: ANS is on die %d\n", nvme_die);