OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] lib: utils: Implement "64bit-mmio" property parsing
@ 2021-04-17 16:26 guoren
  2021-04-17 16:26 ` [PATCH v2 2/2] lib: utils: reset: Add T-HEAD sample platform reset driver guoren
  2021-04-22 10:03 ` [PATCH v2 1/2] lib: utils: Implement "64bit-mmio" property parsing Anup Patel
  0 siblings, 2 replies; 6+ messages in thread
From: guoren @ 2021-04-17 16:26 UTC (permalink / raw)
  To: opensbi

From: Guo Ren <guoren@linux.alibaba.com>

Figure out CLINT has_64bit_mmio from DT node and using antonym for
compatibility.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
---
 lib/utils/fdt/fdt_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c
index bf19ff9..909de01 100644
--- a/lib/utils/fdt/fdt_helper.c
+++ b/lib/utils/fdt/fdt_helper.c
@@ -442,8 +442,9 @@ int fdt_parse_clint_node(void *fdt, int nodeoffset, bool for_timer,
 	if (clint->hart_count < count)
 		clint->hart_count = count;
 
-	/* TODO: We should figure-out CLINT has_64bit_mmio from DT node */
 	clint->has_64bit_mmio = TRUE;
+	if (fdt_getprop(fdt, nodeoffset, "clint,has-no-64bit-mmio", &count))
+		clint->has_64bit_mmio = FALSE;
 
 	return 0;
 }
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-22 10:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-17 16:26 [PATCH v2 1/2] lib: utils: Implement "64bit-mmio" property parsing guoren
2021-04-17 16:26 ` [PATCH v2 2/2] lib: utils: reset: Add T-HEAD sample platform reset driver guoren
2021-04-21  4:30   ` Anup Patel
2021-04-21  7:42     ` Guo Ren
2021-04-22 10:04     ` Anup Patel
2021-04-22 10:03 ` [PATCH v2 1/2] lib: utils: Implement "64bit-mmio" property parsing Anup Patel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox