aboutsummaryrefslogtreecommitdiff
path: root/plat/mediatek/mt8173
diff options
context:
space:
mode:
Diffstat (limited to 'plat/mediatek/mt8173')
-rw-r--r--plat/mediatek/mt8173/aarch64/platform_common.c15
-rw-r--r--plat/mediatek/mt8173/bl31_plat_setup.c17
-rw-r--r--plat/mediatek/mt8173/drivers/crypt/crypt.c11
-rw-r--r--plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c7
-rw-r--r--plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c8
-rw-r--r--plat/mediatek/mt8173/drivers/rtc/rtc.c7
-rw-r--r--plat/mediatek/mt8173/drivers/spm/spm.c8
-rw-r--r--plat/mediatek/mt8173/drivers/spm/spm_hotplug.c6
-rw-r--r--plat/mediatek/mt8173/drivers/spm/spm_mcdi.c11
-rw-r--r--plat/mediatek/mt8173/drivers/spm/spm_suspend.c10
-rw-r--r--plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c4
-rw-r--r--plat/mediatek/mt8173/include/mcucfg.h3
-rw-r--r--plat/mediatek/mt8173/include/plat_macros.S6
-rw-r--r--plat/mediatek/mt8173/include/platform_def.h7
-rw-r--r--plat/mediatek/mt8173/plat_mt_gic.c5
-rw-r--r--plat/mediatek/mt8173/plat_pm.c18
-rw-r--r--plat/mediatek/mt8173/plat_sip_calls.c8
-rw-r--r--plat/mediatek/mt8173/plat_topology.c5
-rw-r--r--plat/mediatek/mt8173/power_tracer.c3
-rw-r--r--plat/mediatek/mt8173/scu.c3
20 files changed, 99 insertions, 63 deletions
diff --git a/plat/mediatek/mt8173/aarch64/platform_common.c b/plat/mediatek/mt8173/aarch64/platform_common.c
index a7619926a1..a2dbe3e479 100644
--- a/plat/mediatek/mt8173/aarch64/platform_common.c
+++ b/plat/mediatek/mt8173/aarch64/platform_common.c
@@ -3,14 +3,17 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
+#include <platform_def.h>
+
#include <arch_helpers.h>
-#include <bl_common.h>
-#include <cci.h>
-#include <debug.h>
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/arm/cci.h>
+#include <lib/utils.h>
+#include <lib/xlat_tables/xlat_tables.h>
+
#include <mt8173_def.h>
-#include <platform_def.h>
-#include <utils.h>
-#include <xlat_tables.h>
static const int cci_map[] = {
PLAT_MT_CCI_CLUSTER0_SL_IFACE_IX,
diff --git a/plat/mediatek/mt8173/bl31_plat_setup.c b/plat/mediatek/mt8173/bl31_plat_setup.c
index c27de8295d..bd384a1d41 100644
--- a/plat/mediatek/mt8173/bl31_plat_setup.c
+++ b/plat/mediatek/mt8173/bl31_plat_setup.c
@@ -3,19 +3,22 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <assert.h>
-#include <bl_common.h>
-#include <common_def.h>
-#include <console.h>
-#include <debug.h>
-#include <generic_delay_timer.h>
+
+#include <common/bl_common.h>
+#include <common/debug.h>
+#include <drivers/console.h>
+#include <drivers/generic_delay_timer.h>
+#include <lib/mmio.h>
+#include <plat/common/common_def.h>
+#include <plat/common/platform.h>
+
#include <mcucfg.h>
-#include <mmio.h>
#include <mtcmos.h>
#include <mtk_plat_common.h>
#include <plat_arm.h>
#include <plat_private.h>
-#include <platform.h>
#include <spm.h>
static entry_point_info_t bl32_ep_info;
diff --git a/plat/mediatek/mt8173/drivers/crypt/crypt.c b/plat/mediatek/mt8173/drivers/crypt/crypt.c
index 74d7702ad3..bfb3082ba0 100644
--- a/plat/mediatek/mt8173/drivers/crypt/crypt.c
+++ b/plat/mediatek/mt8173/drivers/crypt/crypt.c
@@ -3,12 +3,15 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
+#include <assert.h>
+
#include <arch.h>
#include <arch_helpers.h>
-#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
#include <mt8173_def.h>
#include <mtk_sip_svc.h>
diff --git a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c b/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c
index 25f25097ed..452ac224c6 100644
--- a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c
+++ b/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c
@@ -4,9 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
#include <mt8173_def.h>
#include <mtcmos.h>
#include <spm.h>
diff --git a/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c b/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c
index c64fdf7c21..8120d99626 100644
--- a/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c
+++ b/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.c
@@ -3,9 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/mmio.h>
+
#include <mt8173_def.h>
#include <pmic_wrap_init.h>
diff --git a/plat/mediatek/mt8173/drivers/rtc/rtc.c b/plat/mediatek/mt8173/drivers/rtc/rtc.c
index 22fed9e640..2b9033ed91 100644
--- a/plat/mediatek/mt8173/drivers/rtc/rtc.c
+++ b/plat/mediatek/mt8173/drivers/rtc/rtc.c
@@ -3,9 +3,12 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <assert.h>
-#include <debug.h>
-#include <delay_timer.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+
#include <mt8173_def.h>
#include <pmic_wrap_init.h>
#include <rtc.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm.c b/plat/mediatek/mt8173/drivers/spm/spm.c
index eb40072b9b..1caab3bdf1 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm.c
@@ -3,9 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bakery_lock.h>
-#include <debug.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
#include <mt8173_def.h>
#include <spm.h>
#include <spm_suspend.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c b/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
index 6d275d0438..b2b9adafe3 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c
@@ -3,10 +3,12 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <arch.h>
-#include <mmio.h>
+#include <lib/mmio.h>
#include <mt8173_def.h>
-#include <platform.h>
+#include <plat/common/platform.h>
+
#include <spm.h>
#include <spm_hotplug.h>
#include <spm_mcdi.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c b/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
index de8d73a517..ea5f2bb14b 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
@@ -3,12 +3,15 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
+#include <platform_def.h>
+
#include <arch.h>
-#include <debug.h>
-#include <mmio.h>
+#include <common/debug.h>
+#include <lib/mmio.h>
+#include <plat/common/platform.h>
+
#include <mt8173_def.h>
-#include <platform.h>
-#include <platform_def.h>
#include <spm.h>
#include <spm_hotplug.h>
#include <spm_mcdi.h>
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_suspend.c b/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
index 8c79b3b4e7..5021695db1 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_suspend.c
@@ -3,10 +3,12 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bakery_lock.h>
-#include <debug.h>
-#include <delay_timer.h>
-#include <mmio.h>
+
+#include <common/debug.h>
+#include <drivers/delay_timer.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+
#include <mt8173_def.h>
#include <spm.h>
#include <spm_suspend.h>
diff --git a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c b/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c
index 8a30d8aefa..174a24d88f 100644
--- a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c
+++ b/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c
@@ -3,9 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#include <arch_helpers.h>
+#include <lib/mmio.h>
+
#include <mcucfg.h>
-#include <mmio.h>
#include <mt8173_def.h>
#include <mt_cpuxgpt.h>
diff --git a/plat/mediatek/mt8173/include/mcucfg.h b/plat/mediatek/mt8173/include/mcucfg.h
index 49d7c3e180..dedbc082fd 100644
--- a/plat/mediatek/mt8173/include/mcucfg.h
+++ b/plat/mediatek/mt8173/include/mcucfg.h
@@ -6,9 +6,10 @@
#ifndef MCUCFG_H
#define MCUCFG_H
-#include <mt8173_def.h>
#include <stdint.h>
+#include <mt8173_def.h>
+
struct mt8173_mcucfg_regs {
uint32_t mp0_ca7l_cache_config;
struct {
diff --git a/plat/mediatek/mt8173/include/plat_macros.S b/plat/mediatek/mt8173/include/plat_macros.S
index 5eb4913f1f..ac9fb160d4 100644
--- a/plat/mediatek/mt8173/include/plat_macros.S
+++ b/plat/mediatek/mt8173/include/plat_macros.S
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <cci.h>
-#include <gic_common.h>
-#include <gicv2.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
#include <mt8173_def.h>
.section .rodata.gic_reg_name, "aS"
diff --git a/plat/mediatek/mt8173/include/platform_def.h b/plat/mediatek/mt8173/include/platform_def.h
index 9bbed3c3b9..205e263870 100644
--- a/plat/mediatek/mt8173/include/platform_def.h
+++ b/plat/mediatek/mt8173/include/platform_def.h
@@ -7,9 +7,10 @@
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
-#include <gic_common.h>
-#include <interrupt_props.h>
-#include <utils_def.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
+
#include "mt8173_def.h"
/*******************************************************************************
diff --git a/plat/mediatek/mt8173/plat_mt_gic.c b/plat/mediatek/mt8173/plat_mt_gic.c
index 16e36afbf7..80b9010c1a 100644
--- a/plat/mediatek/mt8173/plat_mt_gic.c
+++ b/plat/mediatek/mt8173/plat_mt_gic.c
@@ -4,9 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <bl_common.h>
+#include <common/bl_common.h>
+#include <lib/utils.h>
+
#include <mt8173_def.h>
-#include <utils.h>
const unsigned int mt_irq_sec_array[] = {
MT_IRQ_SEC_SGI_0,
diff --git a/plat/mediatek/mt8173/plat_pm.c b/plat/mediatek/mt8173/plat_pm.c
index b19d3f307c..9673d2c289 100644
--- a/plat/mediatek/mt8173/plat_pm.c
+++ b/plat/mediatek/mt8173/plat_pm.c
@@ -4,22 +4,24 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch_helpers.h>
#include <assert.h>
-#include <bakery_lock.h>
-#include <cci.h>
-#include <console.h>
-#include <debug.h>
#include <errno.h>
-#include <gicv2.h>
+
+#include <arch_helpers.h>
+#include <common/debug.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/console.h>
+#include <lib/bakery_lock.h>
+#include <lib/mmio.h>
+#include <lib/psci/psci.h>
+
#include <mcucfg.h>
-#include <mmio.h>
#include <mt8173_def.h>
#include <mt_cpuxgpt.h> /* generic_timer_backup() */
#include <plat_arm.h>
#include <plat_private.h>
#include <power_tracer.h>
-#include <psci.h>
#include <rtc.h>
#include <scu.h>
#include <spm_hotplug.h>
diff --git a/plat/mediatek/mt8173/plat_sip_calls.c b/plat/mediatek/mt8173/plat_sip_calls.c
index 1d51cb592f..102feb22a6 100644
--- a/plat/mediatek/mt8173/plat_sip_calls.c
+++ b/plat/mediatek/mt8173/plat_sip_calls.c
@@ -3,13 +3,15 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
+#include <common/debug.h>
+#include <common/runtime_svc.h>
+#include <lib/mmio.h>
+
#include <crypt.h>
-#include <debug.h>
-#include <mmio.h>
#include <mtcmos.h>
#include <mtk_sip_svc.h>
#include <plat_sip_calls.h>
-#include <runtime_svc.h>
/* Authorized secure register list */
enum {
diff --git a/plat/mediatek/mt8173/plat_topology.c b/plat/mediatek/mt8173/plat_topology.c
index d70fea5229..23e7d2d3b6 100644
--- a/plat/mediatek/mt8173/plat_topology.c
+++ b/plat/mediatek/mt8173/plat_topology.c
@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <arch.h>
+
#include <platform_def.h>
-#include <psci.h>
+#include <arch.h>
+#include <lib/psci/psci.h>
const unsigned char mtk_power_domain_tree_desc[] = {
/* No of root nodes */
diff --git a/plat/mediatek/mt8173/power_tracer.c b/plat/mediatek/mt8173/power_tracer.c
index 787dad13fa..d1fcf9f269 100644
--- a/plat/mediatek/mt8173/power_tracer.c
+++ b/plat/mediatek/mt8173/power_tracer.c
@@ -5,7 +5,8 @@
*/
#include <arch.h>
-#include <debug.h>
+#include <common/debug.h>
+
#include <power_tracer.h>
#define trace_log(...) INFO("psci: " __VA_ARGS__)
diff --git a/plat/mediatek/mt8173/scu.c b/plat/mediatek/mt8173/scu.c
index 4daa9e5ff9..2524d72e12 100644
--- a/plat/mediatek/mt8173/scu.c
+++ b/plat/mediatek/mt8173/scu.c
@@ -5,8 +5,9 @@
*/
#include <arch.h>
+#include <lib/mmio.h>
+
#include <mcucfg.h>
-#include <mmio.h>
void disable_scu(unsigned long mpidr)
{