Commit e5490f95 authored by gtk_pangao's avatar gtk_pangao Committed by Yidi Lin
Browse files

mediatek: mt8195: add sys_cirq support



MT8192 cirq driver can be shared with MT8195. Move cirq driver to common
common folder.
Signed-off-by: default avatargtk_pangao <gtk_pangao@mediatek.com>
Change-Id: Iba5cdcfd2116f0bd07e0497250f2da45613e3a4f
parent c63f1451
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
#include <lib/mmio.h> #include <lib/mmio.h>
#include <mt_gic_v3.h> #include <mt_gic_v3.h>
#include <plat_mt_cirq.h> #include <mtk_cirq.h>
#include <platform_def.h>
static struct cirq_events cirq_all_events = { static struct cirq_events cirq_all_events = {
.spi_start = CIRQ_SPI_START, .spi_start = CIRQ_SPI_START,
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define PLAT_MT_CIRQ_H #define PLAT_MT_CIRQ_H
#include <stdint.h> #include <stdint.h>
#include <platform_def.h>
enum { enum {
IRQ_MASK_HEADER = 0xF1F1F1F1, IRQ_MASK_HEADER = 0xF1F1F1F1,
...@@ -35,13 +36,6 @@ struct mtk_irq_mask { ...@@ -35,13 +36,6 @@ struct mtk_irq_mask {
/* /*
* Define hardware register * Define hardware register
*/ */
#define SYS_CIRQ_BASE U(0x10204000)
#define CIRQ_REG_NUM U(14)
#define CIRQ_IRQ_NUM U(439)
#define CIRQ_SPI_START U(64)
#define MD_WDT_IRQ_BIT_ID U(110)
#define CIRQ_STA_BASE (SYS_CIRQ_BASE + U(0x000)) #define CIRQ_STA_BASE (SYS_CIRQ_BASE + U(0x000))
#define CIRQ_ACK_BASE (SYS_CIRQ_BASE + U(0x080)) #define CIRQ_ACK_BASE (SYS_CIRQ_BASE + U(0x080))
#define CIRQ_MASK_BASE (SYS_CIRQ_BASE + U(0x100)) #define CIRQ_MASK_BASE (SYS_CIRQ_BASE + U(0x100))
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#include <mt_lp_rm.h> #include <mt_lp_rm.h>
#include <mt_lp_irqremain.h> #include <mt_lp_irqremain.h>
#include <mtk_cirq.h>
#include <plat_mtk_lpm.h> #include <plat_mtk_lpm.h>
#include <plat_mt_cirq.h>
#define EDMA0_IRQ_ID U(448) #define EDMA0_IRQ_ID U(448)
#define MDLA_IRQ_ID U(446) #define MDLA_IRQ_ID U(446)
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#ifndef ATF_PLAT_CIRQ_UNSUPPORT #ifndef ATF_PLAT_CIRQ_UNSUPPORT
#include <mt_gic_v3.h> #include <mt_gic_v3.h>
#include <plat_mt_cirq.h> #include <mtk_cirq.h>
#endif #endif
#define CONSTRAINT_BUS26M_ALLOW \ #define CONSTRAINT_BUS26M_ALLOW \
......
...@@ -68,6 +68,12 @@ ...@@ -68,6 +68,12 @@
#define BASE_GICD_BASE MT_GIC_BASE #define BASE_GICD_BASE MT_GIC_BASE
#define MT_GIC_RDIST_BASE (MT_GIC_BASE + 0x40000) #define MT_GIC_RDIST_BASE (MT_GIC_BASE + 0x40000)
#define SYS_CIRQ_BASE (IO_PHYS + 0x204000)
#define CIRQ_REG_NUM 14
#define CIRQ_IRQ_NUM 439
#define CIRQ_SPI_START 64
#define MD_WDT_IRQ_BIT_ID 110
/******************************************************************************* /*******************************************************************************
* Platform binary types for linking * Platform binary types for linking
******************************************************************************/ ******************************************************************************/
......
...@@ -46,6 +46,7 @@ BL31_SOURCES += common/desc_image_load.c \ ...@@ -46,6 +46,7 @@ BL31_SOURCES += common/desc_image_load.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 \
${MTK_PLAT}/common/lpm/mt_lp_rm.c \ ${MTK_PLAT}/common/lpm/mt_lp_rm.c \
${MTK_PLAT}/common/mtk_cirq.c \
${MTK_PLAT}/common/mtk_plat_common.c \ ${MTK_PLAT}/common/mtk_plat_common.c \
${MTK_PLAT}/common/mtk_sip_svc.c \ ${MTK_PLAT}/common/mtk_sip_svc.c \
${MTK_PLAT}/common/params_setup.c \ ${MTK_PLAT}/common/params_setup.c \
...@@ -56,7 +57,6 @@ BL31_SOURCES += common/desc_image_load.c \ ...@@ -56,7 +57,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_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 \
${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \ ${MTK_PLAT_SOC}/drivers/dcm/mtk_dcm_utils.c \
......
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
#define BASE_GICD_BASE MT_GIC_BASE #define BASE_GICD_BASE MT_GIC_BASE
#define MT_GIC_RDIST_BASE (MT_GIC_BASE + 0x40000) #define MT_GIC_RDIST_BASE (MT_GIC_BASE + 0x40000)
#define SYS_CIRQ_BASE (IO_PHYS + 0x204000)
#define CIRQ_REG_NUM 23
#define CIRQ_IRQ_NUM 730
#define CIRQ_SPI_START 96
#define MD_WDT_IRQ_BIT_ID 141
/******************************************************************************* /*******************************************************************************
* Platform binary types for linking * Platform binary types for linking
******************************************************************************/ ******************************************************************************/
......
...@@ -28,6 +28,7 @@ BL31_SOURCES += common/desc_image_load.c \ ...@@ -28,6 +28,7 @@ BL31_SOURCES += common/desc_image_load.c \
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/drivers/gic600/mt_gic_v3.c \
${MTK_PLAT}/common/mtk_cirq.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