diff options
author | Anup Patel <anup.patel@wdc.com> | 2021-05-20 21:16:25 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2021-05-24 15:49:21 +0530 |
commit | 54d7def6c254058f9458a0e26205b3c93a48bb42 (patch) | |
tree | b925e5ae2ad99804a49d8170653ef21b9cd1dfc7 /lib/utils/serial/fdt_serial.c | |
parent | b2dbbc0577e326b6dc1babaa53fb46605c996a72 (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 <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Diffstat (limited to 'lib/utils/serial/fdt_serial.c')
-rw-r--r-- | lib/utils/serial/fdt_serial.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/utils/serial/fdt_serial.c b/lib/utils/serial/fdt_serial.c index bad3387..25982ec 100644 --- a/lib/utils/serial/fdt_serial.c +++ b/lib/utils/serial/fdt_serial.c @@ -8,6 +8,7 @@ */ #include <libfdt.h> +#include <sbi/sbi_error.h> #include <sbi/sbi_scratch.h> #include <sbi_utils/fdt/fdt_helper.h> #include <sbi_utils/serial/fdt_serial.h> @@ -59,6 +60,8 @@ int fdt_serial_init(void) if (drv->init) { rc = drv->init(fdt, noff, match); + if (rc == SBI_ENODEV) + continue; if (rc) return rc; } @@ -80,6 +83,8 @@ int fdt_serial_init(void) if (drv->init) { rc = drv->init(fdt, noff, match); + if (rc == SBI_ENODEV) + continue; if (rc) return rc; } |