Program GIC LPI configuration table
cover Program GIC LPI configuration table
This patch set programs GIC LPI configuration table from Uboot for NXP's LX2160A SoC.
Wasim Khan (3):
board: fsl: lx2160a: Program GIC LPI configuration table
configs: lx2160a: Enable GIC_V3_ITS config
board: fsl: lx2160a: Add GIC LPI memory reserve fixup
board/freescale/lx2160a/lx2160a.c | 26 +++++++++++++++++++++++++- configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160aqds_tfa_defconfig | 1 + configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160ardb_tfa_defconfig | 1 + 5 files changed, 29 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
PATCH 1/3 board: fsl: lx2160a: Program GIC LPI configuration table
Program GIC LPI configuration table:
1. Redistributor PROCBASER configuration table (which is common for all redistributors)
2. Redistributor pending table (PENDBASER), for all the available redistributors.
---
This patch has dependency on patch:
https://patchwork.ozlabs.org/patch/1237847/
board/freescale/lx2160a/lx2160a.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
board/freescale/lx2160a/lx2160a.c +9 -1
@@ -29,11 +29,14 @@#include "../common/vid.h" #include <fsl_immap.h> #include <asm/arch-fsl-layerscape/fsl_icid.h> +#include <asm/gic-v3.h> +#include <cpu_func.h> #ifdef CONFIG_EMC2305 #include "../common/emc2305.h" #endif +#define GIC_LPI_SIZE 0x200000#ifdef CONFIG_TARGET_LX2160AQDS #define CFG_MUX_I2C_SDHC (reg, value) ((reg & 0x3f) | value)#define SET_CFG_MUX1_SDHC1_SDHC (reg) (reg & 0x3f)
@@ -628,7 +631,6 @@ void board_quiesce_devices(void)#endif #ifdef CONFIG_OF_BOARD_SETUP -int ft_board_setup (void *blob,bd_t *bd) {int i;
@@ -639,6 +641,7 @@ int ft_board_setup(void *blob, bd_t *bd)u64 mc_memory_base =0 ;u64 mc_memory_size =0 ;u16 total_memory_banks; +u64 gic_lpi_base;ft_cpu_setup (blob, bd);
@@ -658,6 +661,11 @@ int ft_board_setup(void *blob, bd_t *bd) size[i] = gd->bd->bi_dram[i].size; } +#ifdef CONFIG_GIC_V3_ITS + gic_lpi_base = gd->arch.resv_ram -GIC_LPI_SIZE ; +gic_lpi_tables_init (gic_lpi_base,cpu_numcores ()); +#endif +#ifdef CONFIG_RESV_RAM /* reduce size if reserved memory is within this bank */ if (gd->arch.resv_ram >= base[0] &&
Signature · 1 line
2.7.4
PATCH 2/3 configs: lx2160a: Enable GIC_V3_ITS config
In reply to Wasim KhanEnable GIC_V3_ITS config to program GIC LPI
configuration table.
--- configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160aqds_tfa_defconfig | 1 + configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160ardb_tfa_defconfig | 1 + 4 files changed, 4 insertions(+)
configs/lx2160aqds_tfa_SECURE_BOOT_defconfig +1 -0
@@ -73,3 +73,4 @@ CONFIG_RSA=y CONFIG_SPL_RSA=y CONFIG_RSA_SOFTWARE_EXP=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_GIC_V3_ITS=y
configs/lx2160aqds_tfa_defconfig +1 -0
@@ -70,3 +70,4 @@ CONFIG_DM_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_GIC_V3_ITS=y
configs/lx2160ardb_tfa_SECURE_BOOT_defconfig +1 -0
@@ -68,3 +68,4 @@ CONFIG_RSA=y CONFIG_SPL_RSA=y CONFIG_RSA_SOFTWARE_EXP=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_GIC_V3_ITS=y
configs/lx2160ardb_tfa_defconfig +1 -0
@@ -69,3 +69,4 @@ CONFIG_DM_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_GIC_V3_ITS=y
Signature · 1 line
2.7.4
PATCH 3/3 board: fsl: lx2160a: Add GIC LPI memory reserve fixup
In reply to Wasim KhanReserve DDR memory region used for GIC LPI configuration table.
--- board/freescale/lx2160a/lx2160a.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
board/freescale/lx2160a/lx2160a.c +16 -0
@@ -630,6 +630,21 @@ void board_quiesce_devices(void) }#endif +#ifdef CONFIG_GIC_V3_ITS +void fdt_fixup_gic_lpi_memory (void *blob,u64 gic_lpi_base) +{ +u32 phandle; +int err; +struct fdt_memory gic_lpi; + + gic_lpi.start = gic_lpi_base; + gic_lpi.end = gic_lpi_base +GIC_LPI_SIZE -1 ; + err =fdtdec_add_reserved_memory (blob,"gic-lpi" , &gic_lpi, &phandle); +if (err <0 ) +debug ("failed to add reserved memory: %d\n" , err); +} +#endif +#ifdef CONFIG_OF_BOARD_SETUP int ft_board_setup (void *blob,bd_t *bd) {
@@ -664,6 +679,7 @@ int ft_board_setup(void *blob, bd_t *bd)#ifdef CONFIG_GIC_V3_ITS gic_lpi_base = gd->arch.resv_ram -GIC_LPI_SIZE ;gic_lpi_tables_init (gic_lpi_base,cpu_numcores ()); +fdt_fixup_gic_lpi_memory (blob, gic_lpi_base);#endif #ifdef CONFIG_RESV_RAM
Signature · 1 line
2.7.4
cover Program GIC LPI configuration table
In reply to Wasim KhanHi ,
Please help to review.
Dependent patch https://patchwork.ozlabs.org/patch/1237847/ has already been accepted.
Quoted 25 lines
-----Original Message-----
From: Wasim Khan <[email protected]>
Sent: Friday, February 14, 2020 11:05 AM
To: Priyanka Jain <[email protected]>; Udit Agarwal <[email protected]>; Pankaj Bansal <[email protected]>
Cc: u-boot at lists.denx.de; Wasim Khan <[email protected]>
Subject: [PATCH 0/3] Program GIC LPI configuration tableThis patch set programs GIC LPI configuration table from Uboot for NXP's LX2160A SoC.
Wasim Khan (3):
board: fsl: lx2160a: Program GIC LPI configuration table
configs: lx2160a: EnableGIC_V3_ITSconfig
board: fsl: lx2160a: Add GIC LPI memory reserve fixupboard/freescale/lx2160a/lx2160a.c | 26 +++++++++++++++++++++++++- configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160aqds_tfa_defconfig | 1 + configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160ardb_tfa_defconfig | 1 + 5 files changed, 29 insertions(+), 1 deletion(-)--
2.7.4
cover Program GIC LPI configuration table
In reply to Wasim KhanQuoted 23 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Wasim Khan
Sent: Friday, February 14, 2020 11:05 AM
To: Priyanka Jain <[email protected]>; Udit Agarwal <[email protected]>; Pankaj Bansal <[email protected]>
Cc: u-boot at lists.denx.de; Wasim Khan <[email protected]>
Subject: [PATCH 0/3] Program GIC LPI configuration tableThis patch set programs GIC LPI configuration table from Uboot for NXP's LX2160A SoC.
Wasim Khan (3):
board: fsl: lx2160a: Program GIC LPI configuration table
configs: lx2160a: EnableGIC_V3_ITSconfig
board: fsl: lx2160a: Add GIC LPI memory reserve fixupboard/freescale/lx2160a/lx2160a.c | 26 +++++++++++++++++++++++++- configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160aqds_tfa_defconfig | 1 + configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 + configs/lx2160ardb_tfa_defconfig | 1 + 5 files changed, 29 insertions(+), 1 deletion(-)
Quoted 2 lines
--
2.7.4
Applied to u-boot-fsl-qoriq. Waiting upstream
Thanks
Priyanka