[PATCH v1 25/49] board: ns3: program GIC LPI tables

Rayagonda Kokatanur rayagonda.kokatanur at broadcom.com
Mon Apr 27 12:51:43 CEST 2020


From: Bharat Kumar Reddy Gooty <bharat.gooty at broadcom.com>

U-boot programs the GIC LPI configuration tables and enables
the LPI table.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty at broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur at broadcom.com>
---
 board/broadcom/bcmns3/ns3.c | 4 ++++
 include/configs/bcm_ns3.h   | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c
index ae4da977b6..7d0a63f370 100644
--- a/board/broadcom/bcmns3/ns3.c
+++ b/board/broadcom/bcmns3/ns3.c
@@ -8,9 +8,12 @@
 #include <asm/io.h>
 #include <common.h>
 #include <asm/armv8/mmu.h>
+#include <asm/gic.h>
+#include <asm/gic-v3.h>
 #include <asm/system.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
+#include <dt-bindings/memory/bcm-ns3-mc.h>
 #include <fdtdec.h>
 #include <wdt.h>
 
@@ -146,6 +149,7 @@ static int start_wdt(void)
 
 int ft_board_setup(void *fdt, bd_t *bd)
 {
+	gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS);
 	start_wdt();
 
 	return 0;
diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h
index 02a736456a..a17b9d51c0 100644
--- a/include/configs/bcm_ns3.h
+++ b/include/configs/bcm_ns3.h
@@ -37,4 +37,10 @@
 #define CONFIG_SYS_MAXARGS		64
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
+/* Generic Interrupt Controller Definitions */
+#define GICD_BASE			0x63C00000
+#define GICR_BASE			0x63E00000
+/* Number of GIC re-distributors */
+#define MAX_GIC_REDISTRIBUTORS		8
+
 #endif /* __BCM_NS3_H */
-- 
2.17.1



More information about the U-Boot mailing list