refactor(qemu): common BL31 sources
Move BL31 source list into common file.
Change-Id: Iaa27cfd8f87b691728379c87a6ff6331e87951e1
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
diff --git a/plat/qemu/common/common.mk b/plat/qemu/common/common.mk
index 5678278..1914045 100644
--- a/plat/qemu/common/common.mk
+++ b/plat/qemu/common/common.mk
@@ -63,3 +63,13 @@
${PLAT_QEMU_COMMON_PATH}/qemu_image_load.c \
common/desc_image_load.c \
common/fdt_fixup.c
+
+BL31_SOURCES += ${QEMU_CPU_LIBS} \
+ lib/semihosting/semihosting.c \
+ lib/semihosting/${ARCH}/semihosting_call.S \
+ plat/common/plat_psci_common.c \
+ ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
+ ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
+ common/fdt_fixup.c \
+ ${QEMU_GIC_SOURCES}
+
diff --git a/plat/qemu/qemu/platform.mk b/plat/qemu/qemu/platform.mk
index c0fd3a9..057fc0e 100644
--- a/plat/qemu/qemu/platform.mk
+++ b/plat/qemu/qemu/platform.mk
@@ -156,18 +156,11 @@
$(error "Incorrect GIC driver chosen for QEMU platform")
endif
-ifeq (${ARM_ARCH_MAJOR},8)
-BL31_SOURCES += ${QEMU_CPU_LIBS} \
- lib/semihosting/semihosting.c \
- lib/semihosting/${ARCH}/semihosting_call.S \
- plat/common/plat_psci_common.c \
- drivers/arm/pl061/pl061_gpio.c \
+ifeq (${ARCH},aarch64)
+BL31_SOURCES += drivers/arm/pl061/pl061_gpio.c \
drivers/gpio/gpio.c \
- ${PLAT_QEMU_COMMON_PATH}/qemu_pm.c \
- ${PLAT_QEMU_COMMON_PATH}/topology.c \
- ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
- ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
- ${QEMU_GIC_SOURCES}
+ ${PLAT_QEMU_COMMON_PATH}/qemu_pm.c \
+ ${PLAT_QEMU_COMMON_PATH}/topology.c
ifeq (${SDEI_SUPPORT}, 1)
BL31_SOURCES += plat/qemu/common/qemu_sdei.c
diff --git a/plat/qemu/qemu_sbsa/platform.mk b/plat/qemu/qemu_sbsa/platform.mk
index 492f0ba..c2fbce5 100644
--- a/plat/qemu/qemu_sbsa/platform.mk
+++ b/plat/qemu/qemu_sbsa/platform.mk
@@ -43,18 +43,10 @@
QEMU_GIC_SOURCES := ${GICV3_SOURCES} \
plat/common/plat_gicv3.c
-BL31_SOURCES += ${QEMU_CPU_LIBS} \
- lib/semihosting/semihosting.c \
- lib/semihosting/${ARCH}/semihosting_call.S \
- plat/common/plat_psci_common.c \
- ${PLAT_QEMU_PATH}/sbsa_gic.c \
+BL31_SOURCES += ${PLAT_QEMU_PATH}/sbsa_gic.c \
${PLAT_QEMU_PATH}/sbsa_pm.c \
${PLAT_QEMU_PATH}/sbsa_sip_svc.c \
- ${PLAT_QEMU_PATH}/sbsa_topology.c \
- ${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
- ${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
- common/fdt_fixup.c \
- ${QEMU_GIC_SOURCES}
+ ${PLAT_QEMU_PATH}/sbsa_topology.c
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}