summaryrefslogtreecommitdiff
path: root/lib/utils/timer
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2021-05-20 21:16:25 +0530
committerAnup Patel <[email protected]>2021-05-24 15:49:21 +0530
commit54d7def6c254058f9458a0e26205b3c93a48bb42 (patch)
treeb925e5ae2ad99804a49d8170653ef21b9cd1dfc7 /lib/utils/timer
parentb2dbbc0577e326b6dc1babaa53fb46605c996a72 (diff)
lib: utils: Try other FDT drivers when we see SBI_ENODEV
We should try other FDT drivers when we see SBI_ENODEV returned by cold_init() of FDT driver. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]> Reviewed-by: Xiang W <[email protected]>
Diffstat (limited to 'lib/utils/timer')
-rw-r--r--lib/utils/timer/fdt_timer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/timer/fdt_timer.c b/lib/utils/timer/fdt_timer.c
index 92198cd5..1fad42c2 100644
--- a/lib/utils/timer/fdt_timer.c
+++ b/lib/utils/timer/fdt_timer.c
@@ -7,6 +7,7 @@
* Anup Patel <[email protected]>
*/
+#include <sbi/sbi_error.h>
#include <sbi/sbi_scratch.h>
#include <sbi_utils/fdt/fdt_helper.h>
#include <sbi_utils/timer/fdt_timer.h>
@@ -54,6 +55,8 @@ static int fdt_timer_cold_init(void)
drv->match_table, &match)) >= 0) {
if (drv->cold_init) {
rc = drv->cold_init(fdt, noff, match);
+ if (rc == SBI_ENODEV)
+ continue;
if (rc)
return rc;
}