Unverified Commit 83a2285e authored by Antonio Niño Díaz's avatar Antonio Niño Díaz Committed by GitHub
Browse files

Merge pull request #1784 from antonio-nino-diaz-arm/an/includes-arm

plat/arm: Cleanup of includes and drivers
parents bc153881 560293bb
...@@ -7,13 +7,12 @@ ...@@ -7,13 +7,12 @@
#include <platform_def.h> #include <platform_def.h>
#include <arch.h> #include <arch.h>
#include <drivers/arm/fvp/fvp_pwrc.h>
#include <lib/cassert.h> #include <lib/cassert.h>
#include <plat/arm/common/arm_config.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <plat_arm.h>
#include <arm_config.h>
#include "drivers/pwrc/fvp_pwrc.h"
/* The FVP power domain tree descriptor */ /* The FVP power domain tree descriptor */
static unsigned char fvp_power_domain_tree_desc[FVP_CLUSTER_COUNT + 2]; static unsigned char fvp_power_domain_tree_desc[FVP_CLUSTER_COUNT + 2];
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#ifndef PLAT_LD_S #ifndef PLAT_LD_S
#define PLAT_LD_S #define PLAT_LD_S
#include <arm_tzc_dram.ld.S> #include <plat/arm/common/arm_tzc_dram.ld.S>
#include <arm_reclaim_init.ld.S> #include <plat/arm/common/arm_reclaim_init.ld.S>
#endif /* PLAT_LD_S */ #endif /* PLAT_LD_S */
...@@ -7,25 +7,13 @@ ...@@ -7,25 +7,13 @@
#ifndef PLATFORM_DEF_H #ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H #define PLATFORM_DEF_H
/* Enable the dynamic translation tables library. */
#ifdef AARCH32
# if defined(IMAGE_BL32) && RESET_TO_SP_MIN
# define PLAT_XLAT_TABLES_DYNAMIC 1
# endif
#else
# if defined(IMAGE_BL31) && (RESET_TO_BL31 || (ENABLE_SPM && !SPM_MM))
# define PLAT_XLAT_TABLES_DYNAMIC 1
# endif
#endif /* AARCH32 */
#include <drivers/arm/tzc400.h> #include <drivers/arm/tzc400.h>
#include <lib/utils_def.h> #include <lib/utils_def.h>
#include <plat/arm/board/common/v2m_def.h>
#include <plat/arm/common/arm_def.h>
#include <plat/arm/common/arm_spm_def.h>
#include <plat/common/common_def.h> #include <plat/common/common_def.h>
#include <arm_def.h>
#include <arm_spm_def.h>
#include <v2m_def.h>
#include "../fvp_def.h" #include "../fvp_def.h"
/* Required platform porting definitions */ /* Required platform porting definitions */
......
# #
# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -146,14 +146,14 @@ endif ...@@ -146,14 +146,14 @@ endif
BL2U_SOURCES += plat/arm/board/fvp/fvp_bl2u_setup.c \ BL2U_SOURCES += plat/arm/board/fvp/fvp_bl2u_setup.c \
${FVP_SECURITY_SOURCES} ${FVP_SECURITY_SOURCES}
BL31_SOURCES += drivers/arm/smmu/smmu_v3.c \ BL31_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
drivers/arm/smmu/smmu_v3.c \
drivers/cfi/v2m/v2m_flash.c \ drivers/cfi/v2m/v2m_flash.c \
lib/utils/mem_region.c \ lib/utils/mem_region.c \
plat/arm/board/fvp/fvp_bl31_setup.c \ plat/arm/board/fvp/fvp_bl31_setup.c \
plat/arm/board/fvp/fvp_pm.c \ plat/arm/board/fvp/fvp_pm.c \
plat/arm/board/fvp/fvp_topology.c \ plat/arm/board/fvp/fvp_topology.c \
plat/arm/board/fvp/aarch64/fvp_helpers.S \ plat/arm/board/fvp/aarch64/fvp_helpers.S \
plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.c \
plat/arm/common/arm_nor_psci_mem_protect.c \ plat/arm/common/arm_nor_psci_mem_protect.c \
${FVP_CPU_LIBS} \ ${FVP_CPU_LIBS} \
${FVP_GIC_SOURCES} \ ${FVP_GIC_SOURCES} \
...@@ -231,6 +231,22 @@ ifeq (${ARCH},aarch32) ...@@ -231,6 +231,22 @@ ifeq (${ARCH},aarch32)
NEED_BL32 := yes NEED_BL32 := yes
endif endif
# Enable the dynamic translation tables library.
ifeq (${ARCH},aarch32)
ifeq (${RESET_TO_SP_MIN},1)
BL32_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
endif
else
ifeq (${RESET_TO_BL31},1)
BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
endif
ifeq (${ENABLE_SPM},1)
ifeq (${SPM_MM},0)
BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
endif
endif
endif
# Add support for platform supplied linker script for BL31 build # Add support for platform supplied linker script for BL31 build
$(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT))
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat_arm.h> #include <plat/arm/common/plat_arm.h>
#include "../fvp_private.h" #include "../fvp_private.h"
void plat_arm_sp_min_early_platform_setup(u_register_t arg0, u_register_t arg1, void plat_arm_sp_min_early_platform_setup(u_register_t arg0, u_register_t arg1,
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
# #
# SP_MIN source files specific to FVP platform # SP_MIN source files specific to FVP platform
BL32_SOURCES += drivers/cfi/v2m/v2m_flash.c \ BL32_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
drivers/cfi/v2m/v2m_flash.c \
lib/utils/mem_region.c \ lib/utils/mem_region.c \
plat/arm/board/fvp/aarch32/fvp_helpers.S \ plat/arm/board/fvp/aarch32/fvp_helpers.S \
plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.c \
plat/arm/board/fvp/fvp_pm.c \ plat/arm/board/fvp/fvp_pm.c \
plat/arm/board/fvp/fvp_topology.c \ plat/arm/board/fvp/fvp_topology.c \
plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c \ plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c \
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat_arm.h> #include <plat/arm/common/plat_arm.h>
#include "../fvp_private.h" #include "../fvp_private.h"
void tsp_early_platform_setup(void) void tsp_early_platform_setup(void)
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
# #
# TSP source files specific to FVP platform # TSP source files specific to FVP platform
BL32_SOURCES += plat/arm/board/fvp/aarch64/fvp_helpers.S \ BL32_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
plat/arm/board/fvp/drivers/pwrc/fvp_pwrc.c \ plat/arm/board/fvp/aarch64/fvp_helpers.S \
plat/arm/board/fvp/fvp_topology.c \ plat/arm/board/fvp/fvp_topology.c \
plat/arm/board/fvp/tsp/fvp_tsp_setup.c \ plat/arm/board/fvp/tsp/fvp_tsp_setup.c \
${FVP_GIC_SOURCES} ${FVP_GIC_SOURCES}
......
/* /*
* Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -7,29 +7,17 @@ ...@@ -7,29 +7,17 @@
#ifndef PLATFORM_DEF_H #ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H #define PLATFORM_DEF_H
/* Enable the dynamic translation tables library. */
#ifdef AARCH32
# if defined(IMAGE_BL32) && RESET_TO_SP_MIN
# define PLAT_XLAT_TABLES_DYNAMIC 1
# endif
#else
# if defined(IMAGE_BL31) && RESET_TO_BL31
# define PLAT_XLAT_TABLES_DYNAMIC 1
# endif
#endif /* AARCH32 */
#include <drivers/arm/tzc400.h> #include <drivers/arm/tzc400.h>
#if TRUSTED_BOARD_BOOT #if TRUSTED_BOARD_BOOT
#include <drivers/auth/mbedtls/mbedtls_config.h> #include <drivers/auth/mbedtls/mbedtls_config.h>
#endif #endif
#include <plat/arm/board/common/board_css_def.h>
#include <plat/arm/board/common/v2m_def.h>
#include <plat/arm/common/arm_def.h>
#include <plat/arm/css/common/css_def.h>
#include <plat/arm/soc/common/soc_css_def.h>
#include <plat/common/common_def.h> #include <plat/common/common_def.h>
#include <arm_def.h>
#include <board_css_def.h>
#include <css_def.h>
#include <soc_css_def.h>
#include <v2m_def.h>
#include "../juno_def.h" #include "../juno_def.h"
/* Required platform porting definitions */ /* Required platform porting definitions */
......
...@@ -9,13 +9,12 @@ ...@@ -9,13 +9,12 @@
#include <common/bl_common.h> #include <common/bl_common.h>
#include <common/debug.h> #include <common/debug.h>
#include <common/tbbr/tbbr_img_def.h> #include <common/tbbr/tbbr_img_def.h>
#include <drivers/arm/css/sds.h>
#include <drivers/arm/sp805.h> #include <drivers/arm/sp805.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <platform_def.h> #include <platform_def.h>
#include <plat_arm.h>
#include <sds.h>
void juno_reset_to_aarch32_state(void); void juno_reset_to_aarch32_state(void);
static int is_watchdog_reset(void) static int is_watchdog_reset(void)
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
#include <common/bl_common.h> #include <common/bl_common.h>
#include <common/desc_image_load.h> #include <common/desc_image_load.h>
#include <plat/arm/common/plat_arm.h>
#include <plat_arm.h>
#if JUNO_AARCH32_EL3_RUNTIME #if JUNO_AARCH32_EL3_RUNTIME
/******************************************************************************* /*******************************************************************************
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
#include <platform_def.h> #include <platform_def.h>
#include <plat_arm.h> #include <plat/arm/common/plat_arm.h>
/* /*
* Table of memory regions for different BL stages to map using the MMU. * Table of memory regions for different BL stages to map using the MMU.
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat_arm.h> #include <drivers/arm/css/scmi.h>
#include <scmi.h> #include <plat/arm/common/plat_arm.h>
const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops) const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops)
{ {
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#include <drivers/arm/nic_400.h> #include <drivers/arm/nic_400.h>
#include <lib/mmio.h> #include <lib/mmio.h>
#include <platform_def.h> #include <platform_def.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/arm/soc/common/soc_css.h>
#include <plat_arm.h>
#include <soc_css.h>
#include "juno_tzmp1_def.h" #include "juno_tzmp1_def.h"
#ifdef JUNO_TZMP1 #ifdef JUNO_TZMP1
......
...@@ -4,14 +4,13 @@ ...@@ -4,14 +4,13 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <drivers/arm/css/css_mhu_doorbell.h>
#include <drivers/arm/css/scmi.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/arm/css/common/css_pm.h>
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <platform_def.h> #include <platform_def.h>
#include <css_pm.h>
#include <plat_arm.h>
#include "../../css/drivers/scmi/scmi.h"
#include "../../css/drivers/mhu/css_mhu_doorbell.h"
#if CSS_USE_SCMI_SDS_DRIVER #if CSS_USE_SCMI_SDS_DRIVER
static scmi_channel_plat_info_t juno_scmi_plat_info = { static scmi_channel_plat_info_t juno_scmi_plat_info = {
.scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE, .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE,
......
# #
# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. # Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# #
...@@ -26,9 +26,7 @@ endif ...@@ -26,9 +26,7 @@ endif
# SCP during power management operations and for SCP RAM Firmware transfer. # SCP during power management operations and for SCP RAM Firmware transfer.
CSS_USE_SCMI_SDS_DRIVER := 1 CSS_USE_SCMI_SDS_DRIVER := 1
PLAT_INCLUDES := -Iplat/arm/board/juno/include \ PLAT_INCLUDES := -Iplat/arm/board/juno/include
-Iplat/arm/css/drivers/scmi \
-Iplat/arm/css/drivers/sds
PLAT_BL_COMMON_SOURCES := plat/arm/board/juno/${ARCH}/juno_helpers.S \ PLAT_BL_COMMON_SOURCES := plat/arm/board/juno/${ARCH}/juno_helpers.S \
plat/arm/board/juno/juno_common.c plat/arm/board/juno/juno_common.c
...@@ -88,7 +86,7 @@ BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \ ...@@ -88,7 +86,7 @@ BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \
${JUNO_SECURITY_SOURCES} ${JUNO_SECURITY_SOURCES}
ifeq (${CSS_USE_SCMI_SDS_DRIVER},1) ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
BL1_SOURCES += plat/arm/css/drivers/sds/sds.c BL1_SOURCES += drivers/arm/css/sds/sds.c
endif endif
endif endif
...@@ -134,6 +132,17 @@ SKIP_A57_L1_FLUSH_PWR_DWN := 1 ...@@ -134,6 +132,17 @@ SKIP_A57_L1_FLUSH_PWR_DWN := 1
# Do not enable SVE # Do not enable SVE
ENABLE_SVE_FOR_NS := 0 ENABLE_SVE_FOR_NS := 0
# Enable the dynamic translation tables library.
ifeq (${ARCH},aarch32)
ifeq (${RESET_TO_SP_MIN},1)
BL32_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
endif
else
ifeq (${RESET_TO_BL31},1)
BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC=1
endif
endif
include plat/arm/board/common/board_common.mk include plat/arm/board/common/board_common.mk
include plat/arm/common/arm_common.mk include plat/arm/common/arm_common.mk
include plat/arm/soc/common/soc_css.mk include plat/arm/soc/common/soc_css.mk
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#ifndef PLATFORM_DEF_H #ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H #define PLATFORM_DEF_H
#include <arm_def.h> #include <plat/arm/board/common/v2m_def.h>
#include <css_def.h> #include <plat/arm/common/arm_def.h>
#include <v2m_def.h> #include <plat/arm/css/common/css_def.h>
/* UART related constants */ /* UART related constants */
#define PLAT_ARM_BOOT_UART_BASE 0x2A400000 #define PLAT_ARM_BOOT_UART_BASE 0x2A400000
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include <platform_def.h> #include <platform_def.h>
#include "../../css/drivers/scmi/scmi.h" #include <drivers/arm/css/css_mhu_doorbell.h>
#include "../../css/drivers/mhu/css_mhu_doorbell.h" #include <drivers/arm/css/scmi.h>
#include <plat_arm.h> #include <plat/arm/common/plat_arm.h>
static scmi_channel_plat_info_t n1sdp_scmi_plat_info = { static scmi_channel_plat_info_t n1sdp_scmi_plat_info = {
.scmi_mbx_mem = N1SDP_SCMI_PAYLOAD_BASE, .scmi_mbx_mem = N1SDP_SCMI_PAYLOAD_BASE,
......
...@@ -8,10 +8,9 @@ ...@@ -8,10 +8,9 @@
#include <common/bl_common.h> #include <common/bl_common.h>
#include <common/debug.h> #include <common/debug.h>
#include <plat/arm/common/plat_arm.h>
#include <plat/common/platform.h> #include <plat/common/platform.h>
#include <plat_arm.h>
/* /*
* Table of regions to map using the MMU. * Table of regions to map using the MMU.
* Replace or extend the below regions as required * Replace or extend the below regions as required
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <plat_arm.h> #include <plat/arm/common/plat_arm.h>
/* Topology */ /* Topology */
typedef struct n1sdp_topology { typedef struct n1sdp_topology {
......
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