imx8qm: imx8qx: Migrate to new interfaces
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Mon, 24 Sep 2018 16:56:56 +0000 (17:56 +0100)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 28 Sep 2018 14:34:17 +0000 (15:34 +0100)
- Migrate to new GIC interfaces.
- Migrate to bl31_early_platform_setup2().
- Remove references to removed build options.

Change-Id: Ia7c63f75325ea4b41e32a9de3f01b0007d0ae210
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
plat/imx/common/plat_imx8_gic.c
plat/imx/imx8qm/imx8qm_bl31_setup.c
plat/imx/imx8qm/platform.mk
plat/imx/imx8qx/imx8qx_bl31_setup.c
plat/imx/imx8qx/platform.mk

index 242e31b4b16f1281831381605f8dbdbfa0a2366b..2da9cc0d98c909f1174402f90c66f46506a1dc82 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <bl_common.h>
 #include <gicv3.h>
+#include <interrupt_props.h>
 #include <plat_imx8.h>
 #include <platform.h>
 #include <platform_def.h>
 /* the GICv3 driver only needs to be initialized in EL3 */
 uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT];
 
-/* array of Group1 secure interrupts to be configured by the gic driver */
-const unsigned int g1s_interrupt_array[] = { 6 };
-
-/* array of Group0 interrupts to be configured by the gic driver */
-const unsigned int g0_interrupt_array[] = { 7 };
+static const interrupt_prop_t g01s_interrupt_props[] = {
+       INTR_PROP_DESC(6, GIC_HIGHEST_SEC_PRIORITY,
+                      INTR_GROUP1S, GIC_INTR_CFG_LEVEL),
+       INTR_PROP_DESC(7, GIC_HIGHEST_SEC_PRIORITY,
+                      INTR_GROUP0, GIC_INTR_CFG_LEVEL),
+};
 
 static unsigned int plat_imx_mpidr_to_core_pos(unsigned long mpidr)
 {
@@ -28,10 +30,8 @@ static unsigned int plat_imx_mpidr_to_core_pos(unsigned long mpidr)
 const gicv3_driver_data_t arm_gic_data = {
        .gicd_base = PLAT_GICD_BASE,
        .gicr_base = PLAT_GICR_BASE,
-       .g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array),
-       .g1s_interrupt_num = ARRAY_SIZE(g1s_interrupt_array),
-       .g0_interrupt_array = g0_interrupt_array,
-       .g1s_interrupt_array = g1s_interrupt_array,
+       .interrupt_props = g01s_interrupt_props,
+       .interrupt_props_num = ARRAY_SIZE(g01s_interrupt_props),
        .rdistif_num = PLATFORM_CORE_COUNT,
        .rdistif_base_addrs = rdistif_base_addrs,
        .mpidr_to_core_pos = plat_imx_mpidr_to_core_pos,
index 6cfdaf8ee920f25312c335a8ce792894ed7951e2..7410ac136e0d37781593e98d02189e8f6b5f8d35 100644 (file)
@@ -291,8 +291,8 @@ void mx8_partition_resources(void)
 
 }
 
-void bl31_early_platform_setup(bl31_params_t *from_bl2,
-                               void *plat_params_from_bl2)
+void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+                               u_register_t arg2, u_register_t arg3)
 {
 #if DEBUG_CONSOLE
        static console_lpuart_t console;
index 022ad9902a85646bb30a715660bc033d01146f23..ce84e2baa2b49503b4bf0d8682a8cf67004a39d2 100644 (file)
@@ -32,10 +32,8 @@ BL31_SOURCES         +=      plat/imx/common/lpuart_console.S        \
 
 include plat/imx/common/sci/sci_api.mk
 
-ENABLE_PLAT_COMPAT     :=      0
 USE_COHERENT_MEM       :=      1
 RESET_TO_BL31          :=      1
-ARM_GIC_ARCH           :=      3
 A53_DISABLE_NON_TEMPORAL_HINT := 0
 MULTI_CONSOLE_API      :=      1
 ERRATA_A72_859971      :=      1
index 8dac9439dd19a61b17e32f74e68d5d2cd3b9885d..6384a8566140c17bd1fc4991db9a11fcb4bceb3c 100644 (file)
@@ -250,8 +250,8 @@ void imx8_partition_resources(void)
                NOTICE("Non-secure Partitioning Succeeded\n");
 }
 
-void bl31_early_platform_setup(bl31_params_t *from_bl2,
-                               void *plat_params_from_bl2)
+void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+                               u_register_t arg2, u_register_t arg3)
 {
 #if DEBUG_CONSOLE
        static console_lpuart_t console;
index 067661890bee70b5a30db9c21cf9aad1b4a6e093..02559b46256274718a6a730a8fb67fe7da7536ca 100644 (file)
@@ -30,8 +30,6 @@ BL31_SOURCES          +=      plat/imx/common/lpuart_console.S        \
 
 include plat/imx/common/sci/sci_api.mk
 
-ENABLE_PLAT_COMPAT     :=      0
 USE_COHERENT_MEM       :=      1
 RESET_TO_BL31          :=      1
-ARM_GIC_ARCH           :=      3
 MULTI_CONSOLE_API      :=      1