aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sbi_utils/reset/fdt_reset.h7
-rw-r--r--lib/utils/reset/fdt_reset.c13
2 files changed, 12 insertions, 8 deletions
diff --git a/include/sbi_utils/reset/fdt_reset.h b/include/sbi_utils/reset/fdt_reset.h
index 6d58697..46167b9 100644
--- a/include/sbi_utils/reset/fdt_reset.h
+++ b/include/sbi_utils/reset/fdt_reset.h
@@ -17,6 +17,11 @@ struct fdt_reset {
int (*init)(void *fdt, int nodeoff, const struct fdt_match *match);
};
-int fdt_reset_init(void);
+/**
+ * fdt_reset_init() - initialize reset drivers based on the device-tree
+ *
+ * This function shall be invoked in final init.
+ */
+void fdt_reset_init(void);
#endif
diff --git a/lib/utils/reset/fdt_reset.c b/lib/utils/reset/fdt_reset.c
index 7d0aba6..f4befa2 100644
--- a/lib/utils/reset/fdt_reset.c
+++ b/lib/utils/reset/fdt_reset.c
@@ -7,6 +7,7 @@
* Anup Patel <anup.patel@wdc.com>
*/
+#include <sbi/sbi_console.h>
#include <sbi/sbi_error.h>
#include <sbi/sbi_scratch.h>
#include <sbi_utils/fdt/fdt_helper.h>
@@ -28,7 +29,7 @@ static struct fdt_reset *reset_drivers[] = {
&fdt_reset_thead,
};
-int fdt_reset_init(void)
+void fdt_reset_init(void)
{
int pos, noff, rc;
struct fdt_reset *drv;
@@ -44,12 +45,10 @@ int fdt_reset_init(void)
if (drv->init) {
rc = drv->init(fdt, noff, match);
- if (rc == SBI_ENODEV)
- continue;
- if (rc)
- return rc;
+ if (rc && rc != SBI_ENODEV) {
+ sbi_printf("%s: %s init failed, %d\n",
+ __func__, match->compatible, rc);
+ }
}
}
-
- return 0;
}