aboutsummaryrefslogtreecommitdiff
path: root/plat/rpi
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2019-07-09 14:32:11 +0100
committerAndre Przywara <andre.przywara@arm.com>2019-09-13 16:54:21 +0100
commit4f2b984852556afc3543d90150c46be4aaadbc75 (patch)
tree246f5d432f93643d9b903d715e0626f1252bce8c /plat/rpi
parent3ef45dda88c83413c2c554212956d7966fab2807 (diff)
downloadtrusted-firmware-a-4f2b984852556afc3543d90150c46be4aaadbc75.tar.gz
rpi3: Move shared rpi3 files into common directory
To be able to share code more easily between the existing Raspberry Pi 3 and the upcoming Raspberry Pi 4 platform, move some code which is not board specific into a "common" directory. Change-Id: I9211ab2d754b040128fac13c2f0a30a5cc8c7f2c Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'plat/rpi')
-rw-r--r--plat/rpi/common/include/rpi_shared.h (renamed from plat/rpi/rpi3/rpi3_private.h)4
-rw-r--r--plat/rpi/common/rpi3_common.c (renamed from plat/rpi/rpi3/rpi3_common.c)4
-rw-r--r--plat/rpi/common/rpi3_image_load.c (renamed from plat/rpi/rpi3/rpi3_image_load.c)0
-rw-r--r--plat/rpi/common/rpi3_io_storage.c (renamed from plat/rpi/rpi3/rpi3_io_storage.c)0
-rw-r--r--plat/rpi/common/rpi3_pm.c (renamed from plat/rpi/rpi3/rpi3_pm.c)0
-rw-r--r--plat/rpi/common/rpi3_rotpk.S (renamed from plat/rpi/rpi3/rpi3_rotpk.S)0
-rw-r--r--plat/rpi/common/rpi3_stack_protector.c (renamed from plat/rpi/rpi3/rpi3_stack_protector.c)2
-rw-r--r--plat/rpi/common/rpi3_topology.c (renamed from plat/rpi/rpi3/rpi3_topology.c)4
-rw-r--r--plat/rpi/common/rpi3_trusted_boot.c (renamed from plat/rpi/rpi3/rpi3_trusted_boot.c)0
-rw-r--r--plat/rpi/rpi3/platform.mk25
-rw-r--r--plat/rpi/rpi3/rpi3_bl1_setup.c4
-rw-r--r--plat/rpi/rpi3/rpi3_bl2_setup.c4
-rw-r--r--plat/rpi/rpi3/rpi3_bl31_setup.c4
13 files changed, 26 insertions, 25 deletions
diff --git a/plat/rpi/rpi3/rpi3_private.h b/plat/rpi/common/include/rpi_shared.h
index b01c40c30e..6863438926 100644
--- a/plat/rpi/rpi3/rpi3_private.h
+++ b/plat/rpi/common/include/rpi_shared.h
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef RPI3_PRIVATE_H
-#define RPI3_PRIVATE_H
+#ifndef RPI_SHARED_H
+#define RPI_SHARED_H
#include <stdint.h>
diff --git a/plat/rpi/rpi3/rpi3_common.c b/plat/rpi/common/rpi3_common.c
index 85a26c2226..ac0330899c 100644
--- a/plat/rpi/rpi3/rpi3_common.c
+++ b/plat/rpi/common/rpi3_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,7 +17,7 @@
#include <lib/xlat_tables/xlat_tables_v2.h>
#include <rpi_hw.h>
-#include "rpi3_private.h"
+#include <rpi_shared.h>
#define MAP_DEVICE0 MAP_REGION_FLAT(DEVICE0_BASE, \
DEVICE0_SIZE, \
diff --git a/plat/rpi/rpi3/rpi3_image_load.c b/plat/rpi/common/rpi3_image_load.c
index 5394c6f7c8..5394c6f7c8 100644
--- a/plat/rpi/rpi3/rpi3_image_load.c
+++ b/plat/rpi/common/rpi3_image_load.c
diff --git a/plat/rpi/rpi3/rpi3_io_storage.c b/plat/rpi/common/rpi3_io_storage.c
index 49c6a760ca..49c6a760ca 100644
--- a/plat/rpi/rpi3/rpi3_io_storage.c
+++ b/plat/rpi/common/rpi3_io_storage.c
diff --git a/plat/rpi/rpi3/rpi3_pm.c b/plat/rpi/common/rpi3_pm.c
index b79e2736e5..b79e2736e5 100644
--- a/plat/rpi/rpi3/rpi3_pm.c
+++ b/plat/rpi/common/rpi3_pm.c
diff --git a/plat/rpi/rpi3/rpi3_rotpk.S b/plat/rpi/common/rpi3_rotpk.S
index 1c17b2141a..1c17b2141a 100644
--- a/plat/rpi/rpi3/rpi3_rotpk.S
+++ b/plat/rpi/common/rpi3_rotpk.S
diff --git a/plat/rpi/rpi3/rpi3_stack_protector.c b/plat/rpi/common/rpi3_stack_protector.c
index 6f49f617be..aae5fac72c 100644
--- a/plat/rpi/rpi3/rpi3_stack_protector.c
+++ b/plat/rpi/common/rpi3_stack_protector.c
@@ -9,7 +9,7 @@
#include <lib/utils.h>
#include <lib/utils_def.h>
-#include "rpi3_private.h"
+#include <drivers/rpi3/rng/rpi3_rng.h>
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#define TRNG_NBYTES 16U
diff --git a/plat/rpi/rpi3/rpi3_topology.c b/plat/rpi/common/rpi3_topology.c
index 200d41dd16..3747287c2f 100644
--- a/plat/rpi/rpi3/rpi3_topology.c
+++ b/plat/rpi/common/rpi3_topology.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -10,7 +10,7 @@
#include <arch.h>
-#include "rpi3_private.h"
+#include <rpi_shared.h>
/* The power domain tree descriptor */
static unsigned char power_domain_tree_desc[] = {
diff --git a/plat/rpi/rpi3/rpi3_trusted_boot.c b/plat/rpi/common/rpi3_trusted_boot.c
index f6c669fad7..f6c669fad7 100644
--- a/plat/rpi/rpi3/rpi3_trusted_boot.c
+++ b/plat/rpi/common/rpi3_trusted_boot.c
diff --git a/plat/rpi/rpi3/platform.mk b/plat/rpi/rpi3/platform.mk
index 21a880c0d1..a21a7709a3 100644
--- a/plat/rpi/rpi3/platform.mk
+++ b/plat/rpi/rpi3/platform.mk
@@ -7,10 +7,11 @@
include lib/libfdt/libfdt.mk
include lib/xlat_tables_v2/xlat_tables.mk
-PLAT_INCLUDES := -Iplat/rpi/rpi3/include
+PLAT_INCLUDES := -Iplat/rpi/common/include \
+ -Iplat/rpi/rpi3/include
PLAT_BL_COMMON_SOURCES := drivers/ti/uart/aarch64/16550_console.S \
- plat/rpi/rpi3/rpi3_common.c \
+ plat/rpi/common/rpi3_common.c \
${XLAT_TABLES_LIB_SRCS}
BL1_SOURCES += drivers/io/io_fip.c \
@@ -20,7 +21,7 @@ BL1_SOURCES += drivers/io/io_fip.c \
plat/common/aarch64/platform_mp_stack.S \
plat/rpi/rpi3/aarch64/plat_helpers.S \
plat/rpi/rpi3/rpi3_bl1_setup.c \
- plat/rpi/rpi3/rpi3_io_storage.c \
+ plat/rpi/common/rpi3_io_storage.c \
drivers/rpi3/mailbox/rpi3_mbox.c \
plat/rpi/rpi3/rpi_mbox_board.c
@@ -39,15 +40,15 @@ BL2_SOURCES += common/desc_image_load.c \
plat/rpi/rpi3/aarch64/plat_helpers.S \
plat/rpi/rpi3/aarch64/rpi3_bl2_mem_params_desc.c \
plat/rpi/rpi3/rpi3_bl2_setup.c \
- plat/rpi/rpi3/rpi3_image_load.c \
- plat/rpi/rpi3/rpi3_io_storage.c
+ plat/rpi/common/rpi3_image_load.c \
+ plat/rpi/common/rpi3_io_storage.c
BL31_SOURCES += lib/cpus/aarch64/cortex_a53.S \
plat/common/plat_psci_common.c \
plat/rpi/rpi3/aarch64/plat_helpers.S \
plat/rpi/rpi3/rpi3_bl31_setup.c \
- plat/rpi/rpi3/rpi3_pm.c \
- plat/rpi/rpi3/rpi3_topology.c \
+ plat/rpi/common/rpi3_pm.c \
+ plat/rpi/common/rpi3_topology.c \
${LIBFDT_SRCS}
# Tune compiler for Cortex-A53
@@ -160,7 +161,7 @@ endif
ifneq ($(ENABLE_STACK_PROTECTOR), 0)
PLAT_BL_COMMON_SOURCES += drivers/rpi3/rng/rpi3_rng.c \
- plat/rpi/rpi3/rpi3_stack_protector.c
+ plat/rpi/common/rpi3_stack_protector.c
endif
ifeq (${SPD},opteed)
@@ -190,13 +191,13 @@ ifneq (${TRUSTED_BOARD_BOOT},0)
BL1_SOURCES += ${AUTH_SOURCES} \
bl1/tbbr/tbbr_img_desc.c \
plat/common/tbbr/plat_tbbr.c \
- plat/rpi/rpi3/rpi3_trusted_boot.c \
- plat/rpi/rpi3/rpi3_rotpk.S
+ plat/rpi/common/rpi3_trusted_boot.c \
+ plat/rpi/common/rpi3_rotpk.S
BL2_SOURCES += ${AUTH_SOURCES} \
plat/common/tbbr/plat_tbbr.c \
- plat/rpi/rpi3/rpi3_trusted_boot.c \
- plat/rpi/rpi3/rpi3_rotpk.S
+ plat/rpi/common/rpi3_trusted_boot.c \
+ plat/rpi/common/rpi3_rotpk.S
ROT_KEY = $(BUILD_PLAT)/rot_key.pem
ROTPK_HASH = $(BUILD_PLAT)/rotpk_sha256.bin
diff --git a/plat/rpi/rpi3/rpi3_bl1_setup.c b/plat/rpi/rpi3/rpi3_bl1_setup.c
index b869e9da89..31ad31c19e 100644
--- a/plat/rpi/rpi3/rpi3_bl1_setup.c
+++ b/plat/rpi/rpi3/rpi3_bl1_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -13,7 +13,7 @@
#include <lib/xlat_tables/xlat_mmu_helpers.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
-#include "rpi3_private.h"
+#include <rpi_shared.h>
/* Data structure which holds the extents of the trusted SRAM for BL1 */
static meminfo_t bl1_tzram_layout;
diff --git a/plat/rpi/rpi3/rpi3_bl2_setup.c b/plat/rpi/rpi3/rpi3_bl2_setup.c
index b5e58352ab..991c0fcb28 100644
--- a/plat/rpi/rpi3/rpi3_bl2_setup.c
+++ b/plat/rpi/rpi3/rpi3_bl2_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -19,7 +19,7 @@
#include <drivers/rpi3/gpio/rpi3_gpio.h>
#include <drivers/rpi3/sdhost/rpi3_sdhost.h>
-#include "rpi3_private.h"
+#include <rpi_shared.h>
/* Data structure which holds the extents of the trusted SRAM for BL2 */
static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE);
diff --git a/plat/rpi/rpi3/rpi3_bl31_setup.c b/plat/rpi/rpi3/rpi3_bl31_setup.c
index 2f1bc6493e..a9efc52b82 100644
--- a/plat/rpi/rpi3/rpi3_bl31_setup.c
+++ b/plat/rpi/rpi3/rpi3_bl31_setup.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -15,7 +15,7 @@
#include <lib/xlat_tables/xlat_tables_defs.h>
#include <plat/common/platform.h>
-#include "rpi3_private.h"
+#include <rpi_shared.h>
/*
* Placeholder variables for copying the arguments that have been passed to