[PATCH 6/7] lib: utils/reset: Skip initialize reset when dt is not enabled
Xiang W
wxjstz at 126.com
Tue Jun 11 04:19:33 PDT 2024
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 at 126.com>
---
lib/utils/reset/fdt_reset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/utils/reset/fdt_reset.c b/lib/utils/reset/fdt_reset.c
index 4334586..327fb99 100644
--- a/lib/utils/reset/fdt_reset.c
+++ b/lib/utils/reset/fdt_reset.c
@@ -26,6 +26,9 @@ int fdt_reset_driver_init(void *fdt, struct fdt_reset *drv)
if (noff < 0)
return SBI_ENODEV;
+ if (!fdt_node_is_enabled(fdt, noff))
+ return SBI_ENODEV;
+
if (drv->init) {
rc = drv->init(fdt, noff, match);
if (rc && rc != SBI_ENODEV) {
--
2.43.0
More information about the opensbi
mailing list