Commit c63f1451 authored by christine.zhu's avatar christine.zhu Committed by Yidi Lin
Browse files

mediatek: mt8195: initialize GIC



MT8192 GIC driver can be shared with MT8195. Move GIC driver to common
and do the initialization.
Signed-off-by: default avatarchristine.zhu <christine.zhu@mediatek.corp-partner.google.com>
Change-Id: I63f3e668b5ca6df8bcf17b5cd4d53fa84f330fed
parent 174a1cfe
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#define SYS_COUNTER_FREQ_IN_MHZ 13 #define SYS_COUNTER_FREQ_IN_MHZ 13
/******************************************************************************* /*******************************************************************************
* GIC-400 & interrupt handling related constants * GIC-600 & interrupt handling related constants
******************************************************************************/ ******************************************************************************/
/* Base MTK_platform compatible GIC memory map */ /* Base MTK_platform compatible GIC memory map */
......
...@@ -8,6 +8,7 @@ MTK_PLAT := plat/mediatek ...@@ -8,6 +8,7 @@ MTK_PLAT := plat/mediatek
MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT} MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}
PLAT_INCLUDES := -I${MTK_PLAT}/common/ \ PLAT_INCLUDES := -I${MTK_PLAT}/common/ \
-I${MTK_PLAT}/common/drivers/gic600/ \
-I${MTK_PLAT}/common/drivers/uart/ \ -I${MTK_PLAT}/common/drivers/uart/ \
-I${MTK_PLAT}/common/lpm/ \ -I${MTK_PLAT}/common/lpm/ \
-I${MTK_PLAT_SOC}/include/ \ -I${MTK_PLAT_SOC}/include/ \
...@@ -40,6 +41,7 @@ BL31_SOURCES += common/desc_image_load.c \ ...@@ -40,6 +41,7 @@ BL31_SOURCES += common/desc_image_load.c \
lib/cpus/aarch64/cortex_a55.S \ lib/cpus/aarch64/cortex_a55.S \
lib/cpus/aarch64/cortex_a76.S \ lib/cpus/aarch64/cortex_a76.S \
plat/common/plat_gicv3.c \ plat/common/plat_gicv3.c \
${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \
${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \ ${MTK_PLAT}/common/drivers/pmic_wrap/pmic_wrap_init_v2.c \
${MTK_PLAT}/common/drivers/rtc/rtc_common.c \ ${MTK_PLAT}/common/drivers/rtc/rtc_common.c \
${MTK_PLAT}/common/drivers/uart/uart.c \ ${MTK_PLAT}/common/drivers/uart/uart.c \
...@@ -54,7 +56,6 @@ BL31_SOURCES += common/desc_image_load.c \ ...@@ -54,7 +56,6 @@ BL31_SOURCES += common/desc_image_load.c \
${MTK_PLAT_SOC}/drivers/rtc/rtc.c \ ${MTK_PLAT_SOC}/drivers/rtc/rtc.c \
${MTK_PLAT_SOC}/plat_pm.c \ ${MTK_PLAT_SOC}/plat_pm.c \
${MTK_PLAT_SOC}/plat_topology.c \ ${MTK_PLAT_SOC}/plat_topology.c \
${MTK_PLAT_SOC}/plat_mt_gic.c \
${MTK_PLAT_SOC}/plat_mt_cirq.c \ ${MTK_PLAT_SOC}/plat_mt_cirq.c \
${MTK_PLAT_SOC}/plat_sip_calls.c \ ${MTK_PLAT_SOC}/plat_sip_calls.c \
${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \ ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm.c \
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <lib/coreboot.h> #include <lib/coreboot.h>
/* Platform Includes */ /* Platform Includes */
#include <mt_gic_v3.h>
#include <plat_params.h> #include <plat_params.h>
#include <plat_private.h> #include <plat_private.h>
...@@ -79,6 +80,9 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, ...@@ -79,6 +80,9 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
******************************************************************************/ ******************************************************************************/
void bl31_platform_setup(void) void bl31_platform_setup(void)
{ {
/* Initialize the GIC driver, CPU and distributor interfaces */
mt_gic_driver_init();
mt_gic_init();
} }
/******************************************************************************* /*******************************************************************************
......
...@@ -36,6 +36,13 @@ ...@@ -36,6 +36,13 @@
#define SYS_COUNTER_FREQ_IN_TICKS 13000000 #define SYS_COUNTER_FREQ_IN_TICKS 13000000
#define SYS_COUNTER_FREQ_IN_MHZ 13 #define SYS_COUNTER_FREQ_IN_MHZ 13
/*******************************************************************************
* GIC-600 & interrupt handling related constants
******************************************************************************/
/* Base MTK_platform compatible GIC memory map */
#define BASE_GICD_BASE MT_GIC_BASE
#define MT_GIC_RDIST_BASE (MT_GIC_BASE + 0x40000)
/******************************************************************************* /*******************************************************************************
* Platform binary types for linking * Platform binary types for linking
******************************************************************************/ ******************************************************************************/
......
...@@ -8,8 +8,10 @@ MTK_PLAT := plat/mediatek ...@@ -8,8 +8,10 @@ MTK_PLAT := plat/mediatek
MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT} MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}
PLAT_INCLUDES := -I${MTK_PLAT}/common/ \ PLAT_INCLUDES := -I${MTK_PLAT}/common/ \
-I${MTK_PLAT}/common/drivers/gic600/ \
-I${MTK_PLAT_SOC}/include/ -I${MTK_PLAT_SOC}/include/
GICV3_SUPPORT_GIC600 := 1
include drivers/arm/gic/v3/gicv3.mk include drivers/arm/gic/v3/gicv3.mk
include lib/xlat_tables_v2/xlat_tables.mk include lib/xlat_tables_v2/xlat_tables.mk
...@@ -25,6 +27,7 @@ BL31_SOURCES += common/desc_image_load.c \ ...@@ -25,6 +27,7 @@ BL31_SOURCES += common/desc_image_load.c \
lib/cpus/aarch64/cortex_a55.S \ lib/cpus/aarch64/cortex_a55.S \
lib/cpus/aarch64/cortex_a78.S \ lib/cpus/aarch64/cortex_a78.S \
plat/common/plat_gicv3.c \ plat/common/plat_gicv3.c \
${MTK_PLAT}/common/drivers/gic600/mt_gic_v3.c \
${MTK_PLAT}/common/mtk_plat_common.c \ ${MTK_PLAT}/common/mtk_plat_common.c \
${MTK_PLAT}/common/params_setup.c \ ${MTK_PLAT}/common/params_setup.c \
${MTK_PLAT_SOC}/aarch64/platform_common.c \ ${MTK_PLAT_SOC}/aarch64/platform_common.c \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment