Skip to contentSkip to conversation

Few misc fixes

PATCH New Anup Patel 3 participants 9 messages May 20, 2021 – May 24, 2021

lore
Share & tools
lore

Anup Patel

author
#0 lore raw

cover Few misc fixes

This series adds few fixes which were discovered while adding ACLINT support in OpenSBI.

These patches can be found in misc_fixes_v1 branch at:
https://github.com/avpatel/opensbi.git

Anup Patel (2):
lib: Check region base for merging in sbi_domain_root_add_memregion()
lib: utils: Try other FDT drivers when we see SBI_ENODEV

 lib/sbi/sbi_domain.c            | 3 ++-
 lib/utils/ipi/fdt_ipi.c         | 3 +++
 lib/utils/irqchip/fdt_irqchip.c | 3 +++
 lib/utils/reset/fdt_reset.c     | 3 +++
 lib/utils/serial/fdt_serial.c   | 5 +++++
 lib/utils/timer/fdt_timer.c     | 3 +++
 6 files changed, 19 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 1/2 lib: Check region base for merging in sbi_domain_root_add_memregion()

We can merge region B onto region A only if base of region A is aligned to region A order + 1.

---
 lib/sbi/sbi_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/sbi/sbi_domain.c +2 -1
index 84f30b9..3096af0 100644
@@ -511,7 +511,8 @@ int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg)
 			if (!nreg1->order)
 				continue;
 
-			if ((nreg->base + BIT(nreg->order)) == nreg1->base &&
+			if (!(nreg->base & (BIT(nreg->order + 1) - 1)) &&
+			    (nreg->base + BIT(nreg->order)) == nreg1->base &&
 			    nreg->order == nreg1->order &&
 			    nreg->flags == nreg1->flags) {
 				nreg->order++;
Signature · 1 line
2.25.1
#2 lore raw

PATCH 1/2 lib: Check region base for merging in sbi_domain_root_add_memregion()

Quoted 27 lines · Anup Patel

We can merge region B onto region A only if base of region A is aligned to region A order + 1.

---
 lib/sbi/sbi_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/sbi/sbi_domain.c +2 -2
index 84f30b9..3096af0 100644
@@ -511,7 +511,8 @@ int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg)
                        if (!nreg1->order)
                                continue;
 
-                       if ((nreg->base + BIT(nreg->order)) == nreg1->base &&
+                       if (!(nreg->base & (BIT(nreg->order + 1) - 1)) &&
+                           (nreg->base + BIT(nreg->order)) == nreg1->base &&
                            nreg->order == nreg1->order &&
                            nreg->flags == nreg1->flags) {
                                nreg->order++;
--

2.25.1

Quoted 4 lines

--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

Signature · 2 lines
Regards,
Atish
#3 lore raw

PATCH 1/2 lib: Check region base for merging in sbi_domain_root_add_memregion()

In reply to Anup Patel

? 2021-05-20?? 21:29 +0530?Anup Patel???

Quoted 4 lines

We can merge region B onto region A only if base of region A is aligned to region A order + 1.

Quoted 26 lines
---
 lib/sbi/sbi_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/sbi/sbi_domain.c +0 -1
index 84f30b9..3096af0 100644
@@ -511,7 +511,8 @@ int sbi_domain_root_add_memregion(const struct
 sbi_domain_memregion *reg)
 			if (!nreg1->order)
 				continue;
 
-			if ((nreg->base + BIT(nreg->order)) == nreg1-
Quoted 1 line

base &&

lib/sbi/sbi_domain.c +1 -0
+			if (!(nreg->base & (BIT(nreg->order + 1) - 1))

&&

lib/sbi/sbi_domain.c +1 -0
+			    (nreg->base + BIT(nreg->order)) == nreg1-
Quoted 1 line

base &&

lib/sbi/sbi_domain.c +0 -0
 			    nreg->order == nreg1->order &&
 			    nreg->flags == nreg1->flags) {
 				nreg->order++;
Signature · 1 line
2.25.1
author Applied
#4 lore raw

PATCH 1/2 lib: Check region base for merging in sbi_domain_root_add_memregion()

Quoted 11 lines

-----Original Message-----
From: Xiang W <[email protected]>
Sent: 21 May 2021 12:09
To: Anup Patel <[email protected]>; Atish Patra <[email protected]>; Alistair Francis <[email protected]>
Cc: Anup Patel <[email protected]>; opensbi at lists.infradead.org
Subject: Re: [PATCH 1/2] lib: Check region base for merging in sbi_domain_root_add_memregion()

Quoted 7 lines

? 2021-05-20?? 21:29 +0530?Anup Patel???

Quoted 4 lines

We can merge region B onto region A only if base of region A is aligned to region A order + 1.

Applied this patch to the riscv/opensbi repo

Regards,
Anup

Quoted 27 lines
Quoted 27 lines
---
 lib/sbi/sbi_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/sbi/sbi_domain.c index renamed from lib/sbi/sbi_domain.c +0 -0

84f30b9..3096af0 100644

lib/sbi/sbi_domain.c +0 -1
@@ -511,7 +511,8 @@ int sbi_domain_root_add_memregion(const struct
 sbi_domain_memregion *reg)
 			if (!nreg1->order)
 				continue;
 
-			if ((nreg->base + BIT(nreg->order)) == nreg1-
Quoted 1 line

base &&

lib/sbi/sbi_domain.c +1 -0
+			if (!(nreg->base & (BIT(nreg->order + 1) - 1))

&&

lib/sbi/sbi_domain.c +1 -0
+			    (nreg->base + BIT(nreg->order)) == nreg1-
Quoted 1 line

base &&

lib/sbi/sbi_domain.c +0 -1
 			    nreg->order == nreg1->order &&
 			    nreg->flags == nreg1->flags) {
 				nreg->order++;
--

2.25.1

author
#5 lore raw

PATCH 2/2 lib: utils: Try other FDT drivers when we see SBI_ENODEV

In reply to Anup Patel

We should try other FDT drivers when we see SBI_ENODEV returned by cold_init() of FDT driver.

---
 lib/utils/ipi/fdt_ipi.c         | 3 +++
 lib/utils/irqchip/fdt_irqchip.c | 3 +++
 lib/utils/reset/fdt_reset.c     | 3 +++
 lib/utils/serial/fdt_serial.c   | 5 +++++
 lib/utils/timer/fdt_timer.c     | 3 +++
 5 files changed, 17 insertions(+)
lib/utils/ipi/fdt_ipi.c +3 -0
index efca37e..3932f50 100644
@@ -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/ipi/fdt_ipi.h>
@@ -54,6 +55,8 @@ static int fdt_ipi_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;
 			}
lib/utils/irqchip/fdt_irqchip.c +3 -0
index 3630be6..1306d50 100644
@@ -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/irqchip/fdt_irqchip.h>
@@ -47,6 +48,8 @@ static int fdt_irqchip_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;
 			}
lib/utils/reset/fdt_reset.c +3 -0
index b01b0d1..1d687dc 100644
@@ -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/reset/fdt_reset.h>
@@ -39,6 +40,8 @@ int fdt_reset_init(void)
 
 		if (drv->init) {
 			rc = drv->init(fdt, noff, match);
+			if (rc == SBI_ENODEV)
+				continue;
 			if (rc)
 				return rc;
 		}
lib/utils/serial/fdt_serial.c +5 -0
index bad3387..25982ec 100644
@@ -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;
 		}
lib/utils/timer/fdt_timer.c +3 -0
index 92198cd..1fad42c 100644
@@ -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;
 			}
Signature · 1 line
2.25.1
#6 lore raw

PATCH 2/2 lib: utils: Try other FDT drivers when we see SBI_ENODEV

Quoted 131 lines · Anup Patel

We should try other FDT drivers when we see SBI_ENODEV returned by cold_init() of FDT driver.

---
 lib/utils/ipi/fdt_ipi.c         | 3 +++
 lib/utils/irqchip/fdt_irqchip.c | 3 +++
 lib/utils/reset/fdt_reset.c     | 3 +++
 lib/utils/serial/fdt_serial.c   | 5 +++++
 lib/utils/timer/fdt_timer.c     | 3 +++
 5 files changed, 17 insertions(+)
lib/utils/ipi/fdt_ipi.c +3 -0
index efca37e..3932f50 100644
@@ -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/ipi/fdt_ipi.h>
@@ -54,6 +55,8 @@ static int fdt_ipi_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;
                        }
lib/utils/irqchip/fdt_irqchip.c +3 -0
index 3630be6..1306d50 100644
@@ -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/irqchip/fdt_irqchip.h>
@@ -47,6 +48,8 @@ static int fdt_irqchip_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;
                        }
lib/utils/reset/fdt_reset.c +3 -0
index b01b0d1..1d687dc 100644
@@ -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/reset/fdt_reset.h>
@@ -39,6 +40,8 @@ int fdt_reset_init(void)
 
                if (drv->init) {
                        rc = drv->init(fdt, noff, match);
+                       if (rc == SBI_ENODEV)
+                               continue;
                        if (rc)
                                return rc;
                }
lib/utils/serial/fdt_serial.c +5 -0
index bad3387..25982ec 100644
@@ -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;
                }
lib/utils/timer/fdt_timer.c +3 -1
index 92198cd..1fad42c 100644
@@ -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;
                        }
--

2.25.1

Quoted 4 lines

--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

Signature · 2 lines
Regards,
Atish
#7 lore raw

PATCH 2/2 lib: utils: Try other FDT drivers when we see SBI_ENODEV

In reply to Anup Patel

? 2021-05-20?? 21:29 +0530?Anup Patel???

Quoted 4 lines

We should try other FDT drivers when we see SBI_ENODEV returned by cold_init() of FDT driver.

Quoted 133 lines
---
 lib/utils/ipi/fdt_ipi.c         | 3 +++
 lib/utils/irqchip/fdt_irqchip.c | 3 +++
 lib/utils/reset/fdt_reset.c     | 3 +++
 lib/utils/serial/fdt_serial.c   | 5 +++++
 lib/utils/timer/fdt_timer.c     | 3 +++
 5 files changed, 17 insertions(+)
lib/utils/ipi/fdt_ipi.c +3 -0
index efca37e..3932f50 100644
@@ -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/ipi/fdt_ipi.h>
@@ -54,6 +55,8 @@ static int fdt_ipi_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;
lib/utils/ipi/fdt_ipi.c +0 -0
 			}
lib/utils/irqchip/fdt_irqchip.c +3 -0
index 3630be6..1306d50 100644
@@ -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/irqchip/fdt_irqchip.h>
@@ -47,6 +48,8 @@ static int fdt_irqchip_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;
lib/utils/irqchip/fdt_irqchip.c +0 -0
 			}
lib/utils/reset/fdt_reset.c +3 -0
index b01b0d1..1d687dc 100644
@@ -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/reset/fdt_reset.h>
@@ -39,6 +40,8 @@ int fdt_reset_init(void)
 
 		if (drv->init) {
 			rc = drv->init(fdt, noff, match);
+			if (rc == SBI_ENODEV)
+				continue;
 			if (rc)
 				return rc;
 		}
lib/utils/serial/fdt_serial.c +5 -0
index bad3387..25982ec 100644
@@ -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;
 		}
lib/utils/timer/fdt_timer.c +3 -0
index 92198cd..1fad42c 100644
@@ -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;

}

Signature · 1 line
2.25.1
author Applied
#8 lore raw

PATCH 2/2 lib: utils: Try other FDT drivers when we see SBI_ENODEV

Quoted 11 lines

-----Original Message-----
From: Xiang W <[email protected]>
Sent: 21 May 2021 12:09
To: Anup Patel <[email protected]>; Atish Patra <[email protected]>; Alistair Francis <[email protected]>
Cc: Anup Patel <[email protected]>; opensbi at lists.infradead.org
Subject: Re: [PATCH 2/2] lib: utils: Try other FDT drivers when we see SBI_ENODEV

Quoted 7 lines

? 2021-05-20?? 21:29 +0530?Anup Patel???

Quoted 4 lines

We should try other FDT drivers when we see SBI_ENODEV returned by cold_init() of FDT driver.

Applied this patch to the riscv/opensbi repo

Regards,
Anup

Quoted 130 lines
Quoted 130 lines
---
 lib/utils/ipi/fdt_ipi.c         | 3 +++
 lib/utils/irqchip/fdt_irqchip.c | 3 +++
 lib/utils/reset/fdt_reset.c     | 3 +++
 lib/utils/serial/fdt_serial.c   | 5 +++++
 lib/utils/timer/fdt_timer.c     | 3 +++
 5 files changed, 17 insertions(+)
lib/utils/ipi/fdt_ipi.c index renamed from lib/utils/ipi/fdt_ipi.c +0 -0

efca37e..3932f50 100644

lib/utils/ipi/fdt_ipi.c +1 -0
@@ -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/ipi/fdt_ipi.h> @@ -54,6 +55,8 @@ static int fdt_ipi_cold_init(void)
drv->match_table, &match)) >=
0) {

lib/utils/ipi/fdt_ipi.c +2 -0
 			if (drv->cold_init) {
 				rc = drv->cold_init(fdt, noff, match);
+				if (rc == SBI_ENODEV)
+					continue;
 				if (rc)
 					return rc;
 			}
(quoted diff) +0 -0

b/lib/utils/irqchip/fdt_irqchip.c index 3630be6..1306d50 100644

lib/utils/irqchip/fdt_irqchip.c +1 -0
@@ -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/irqchip/fdt_irqchip.h> @@ -47,6 +48,8 @@ static int fdt_irqchip_cold_init(void)
drv->match_table, &match)) >=
0) {

lib/utils/irqchip/fdt_irqchip.c +2 -0
 			if (drv->cold_init) {
 				rc = drv->cold_init(fdt, noff, match);
+				if (rc == SBI_ENODEV)
+					continue;
 				if (rc)
 					return rc;
 			}
lib/utils/reset/fdt_reset.c +1 -0
index b01b0d1..1d687dc 100644
@@ -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/reset/fdt_reset.h> @@ -39,6 +40,8 @@ int fdt_reset_init(void)

lib/utils/reset/fdt_reset.c +2 -0
 		if (drv->init) {
 			rc = drv->init(fdt, noff, match);
+			if (rc == SBI_ENODEV)
+				continue;
 			if (rc)
 				return rc;
 		}
(quoted diff) +0 -0

b/lib/utils/serial/fdt_serial.c index bad3387..25982ec 100644

lib/utils/serial/fdt_serial.c +1 -0
@@ -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)

lib/utils/serial/fdt_serial.c +4 -0
 		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;
 		}
lib/utils/timer/fdt_timer.c +1 -0
index 92198cd..1fad42c 100644
@@ -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) {

lib/utils/timer/fdt_timer.c +2 -1
 			if (drv->cold_init) {
 				rc = drv->cold_init(fdt, noff, match);
+				if (rc == SBI_ENODEV)
+					continue;
 				if (rc)
 					return rc;
 			}
--

2.25.1