From patchwork Mon May 4 11:44:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 244986 List-Id: U-Boot discussion From: rayagonda.kokatanur at broadcom.com (Rayagonda Kokatanur) Date: Mon, 4 May 2020 17:14:25 +0530 Subject: [PATCH v2 09/16] board: ns3: program GIC LPI tables In-Reply-To: <20200504114432.10886-1-rayagonda.kokatanur@broadcom.com> References: <20200504114432.10886-1-rayagonda.kokatanur@broadcom.com> Message-ID: <20200504114432.10886-10-rayagonda.kokatanur@broadcom.com> U-boot programs the GIC LPI configuration tables and enables the LPI table. Signed-off-by: Bharat Kumar Reddy Gooty Signed-off-by: Rayagonda Kokatanur --- board/broadcom/bcmns3/ns3.c | 12 ++++++++++++ include/configs/bcm_ns3.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c index 6687028d19..7b93c53d9e 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -8,7 +8,10 @@ #include #include #include +#include +#include #include +#include #include static struct mm_region ns3_mem_map[] = { @@ -89,3 +92,12 @@ void reset_cpu(ulong level) psci_system_reset(); } } + +#ifdef CONFIG_OF_BOARD_SETUP +int ft_board_setup(void *fdt, bd_t *bd) +{ + gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS); + + return 0; +} +#endif /* CONFIG_OF_BOARD_SETUP */ 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 */