Commit 91e6f26f authored by Chandni Cherukuri's avatar Chandni Cherukuri
Browse files

plat/arm/sgi: reorganize platform macros



In preparation of adding support for upcoming SGI platforms, macros
common to all the SGI platforms are moved into sgi_base_platform_def.h
file. Macros that are specific to sgi575 platform remain in the
platform_def.h file. In addition to this, the platform_def.h file is
moved to sgi575 board directory. Also the ENT_CPU_SOURCES has been
renamed to SGI_CPU_SOURCES and moved from sgi-common.mk to board
specific makefile platform.mk

Change-Id: Iccdd9f070f4feea232b9fbf4fdcc0ef2e8eccbf2
Signed-off-by: default avatarChandni Cherukuri <chandni.cherukuri@arm.com>
parent 0595abce
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PLATFORM_DEF_H
#define PLATFORM_DEF_H
#include <sgi_base_platform_def.h>
#define PLAT_ARM_CLUSTER_COUNT 2
#define CSS_SGI_MAX_CPUS_PER_CLUSTER 4
#define CSS_SGI_MAX_PE_PER_CPU 1
#define PLAT_CSS_MHU_BASE 0x45000000
#endif /* PLATFORM_DEF_H */
...@@ -6,9 +6,18 @@ ...@@ -6,9 +6,18 @@
include plat/arm/css/sgi/sgi-common.mk include plat/arm/css/sgi/sgi-common.mk
SGI575_BASE = plat/arm/board/sgi575
PLAT_INCLUDES += -I${SGI575_BASE}/include/
SGI_CPU_SOURCES := lib/cpus/aarch64/cortex_a75.S
BL1_SOURCES += ${SGI_CPU_SOURCES}
BL2_SOURCES += lib/utils/mem_region.c \ BL2_SOURCES += lib/utils/mem_region.c \
plat/arm/common/arm_nor_psci_mem_protect.c plat/arm/common/arm_nor_psci_mem_protect.c
BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \ BL31_SOURCES += ${SGI_CPU_SOURCES} \
drivers/cfi/v2m/v2m_flash.c \
lib/utils/mem_region.c \ lib/utils/mem_region.c \
plat/arm/common/arm_nor_psci_mem_protect.c plat/arm/common/arm_nor_psci_mem_protect.c
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef PLATFORM_DEF_H #ifndef SGI_BASE_PLATFORM_DEF_H
#define PLATFORM_DEF_H #define SGI_BASE_PLATFORM_DEF_H
#include <arm_def.h> #include <arm_def.h>
#include <arm_spm_def.h> #include <arm_spm_def.h>
...@@ -17,11 +17,6 @@ ...@@ -17,11 +17,6 @@
#include <v2m_def.h> #include <v2m_def.h>
#include <xlat_tables_defs.h> #include <xlat_tables_defs.h>
#define CSS_SGI_MAX_CPUS_PER_CLUSTER 4
/* CPU topology */
#define PLAT_ARM_CLUSTER_COUNT 2
#define CSS_SGI_MAX_PE_PER_CPU 1
#define PLATFORM_CORE_COUNT (PLAT_ARM_CLUSTER_COUNT * \ #define PLATFORM_CORE_COUNT (PLAT_ARM_CLUSTER_COUNT * \
CSS_SGI_MAX_CPUS_PER_CLUSTER * \ CSS_SGI_MAX_CPUS_PER_CLUSTER * \
CSS_SGI_MAX_PE_PER_CPU) CSS_SGI_MAX_PE_PER_CPU)
...@@ -118,8 +113,6 @@ ...@@ -118,8 +113,6 @@
#define PLAT_ARM_NSTIMER_FRAME_ID 0 #define PLAT_ARM_NSTIMER_FRAME_ID 0
#define PLAT_CSS_MHU_BASE 0x45000000
#define PLAT_ARM_TRUSTED_ROM_BASE 0x0 #define PLAT_ARM_TRUSTED_ROM_BASE 0x0
#define PLAT_ARM_TRUSTED_ROM_SIZE 0x00080000 /* 512KB */ #define PLAT_ARM_TRUSTED_ROM_SIZE 0x00080000 /* 512KB */
...@@ -216,4 +209,4 @@ ...@@ -216,4 +209,4 @@
V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
#endif /* PLATFORM_DEF_H */ #endif /* SGI_BASE_PLATFORM_DEF_H */
...@@ -22,8 +22,6 @@ INTERCONNECT_SOURCES := ${CSS_ENT_BASE}/sgi_interconnect.c ...@@ -22,8 +22,6 @@ INTERCONNECT_SOURCES := ${CSS_ENT_BASE}/sgi_interconnect.c
PLAT_INCLUDES += -I${CSS_ENT_BASE}/include PLAT_INCLUDES += -I${CSS_ENT_BASE}/include
ENT_CPU_SOURCES := lib/cpus/aarch64/cortex_a75.S
ENT_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ ENT_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
drivers/arm/gic/v3/gicv3_main.c \ drivers/arm/gic/v3/gicv3_main.c \
drivers/arm/gic/v3/gicv3_helpers.c \ drivers/arm/gic/v3/gicv3_helpers.c \
...@@ -36,15 +34,13 @@ PLAT_BL_COMMON_SOURCES += ${CSS_ENT_BASE}/sgi_plat.c \ ...@@ -36,15 +34,13 @@ PLAT_BL_COMMON_SOURCES += ${CSS_ENT_BASE}/sgi_plat.c \
${CSS_ENT_BASE}/aarch64/sgi_helper.S ${CSS_ENT_BASE}/aarch64/sgi_helper.S
BL1_SOURCES += ${INTERCONNECT_SOURCES} \ BL1_SOURCES += ${INTERCONNECT_SOURCES} \
${ENT_CPU_SOURCES} \
${CSS_ENT_BASE}/sgi_bl1_setup.c \ ${CSS_ENT_BASE}/sgi_bl1_setup.c \
${CSS_ENT_BASE}/sgi_plat_config.c ${CSS_ENT_BASE}/sgi_plat_config.c
BL2_SOURCES += ${CSS_ENT_BASE}/sgi_security.c \ BL2_SOURCES += ${CSS_ENT_BASE}/sgi_security.c \
${CSS_ENT_BASE}/sgi_image_load.c ${CSS_ENT_BASE}/sgi_image_load.c
BL31_SOURCES += ${ENT_CPU_SOURCES} \ BL31_SOURCES += ${INTERCONNECT_SOURCES} \
${INTERCONNECT_SOURCES} \
${ENT_GIC_SOURCES} \ ${ENT_GIC_SOURCES} \
${CSS_ENT_BASE}/sgi_bl31_setup.c \ ${CSS_ENT_BASE}/sgi_bl31_setup.c \
${CSS_ENT_BASE}/sgi_topology.c \ ${CSS_ENT_BASE}/sgi_topology.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