lib: utils/reset: Skip initialize reset when dt is not enabled

When the dt node has a status property and the value is not ok or
okay, skip initializing reset.

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xiang W
2024-06-11 19:19:33 +08:00
committed by Anup Patel
parent 86bbe6c52f
commit b5c984bd08

View File

@@ -26,6 +26,9 @@ int fdt_reset_driver_init(void *fdt, struct fdt_reset *drv)
if (noff < 0) if (noff < 0)
return SBI_ENODEV; return SBI_ENODEV;
if (!fdt_node_is_enabled(fdt, noff))
return SBI_ENODEV;
if (drv->init) { if (drv->init) {
rc = drv->init(fdt, noff, match); rc = drv->init(fdt, noff, match);
if (rc && rc != SBI_ENODEV) { if (rc && rc != SBI_ENODEV) {