From 4666d046489a865f6434d7925903e0365da44575 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Tue, 9 Jul 2019 11:44:14 +0100 Subject: [PATCH] rpi3: Move rpi3_hw.h header file to include/rpi_hw.h With the advent of Raspberry Pi 4 support, we need to separate some board specific headers between the RPi3 and RPi4. Rename and move the "rpi3_hw.h" header, so that .c files just include rpi_hw.h, and automatically get the correct version. Change-Id: I03b39063028d2bee1429bffccde71dddfe2dcde8 Signed-off-by: Andre Przywara --- plat/rpi/rpi3/aarch64/plat_helpers.S | 2 +- plat/rpi/rpi3/include/platform_def.h | 2 +- plat/rpi/rpi3/{rpi3_hw.h => include/rpi_hw.h} | 6 +++--- plat/rpi/rpi3/rpi3_common.c | 2 +- plat/rpi/rpi3/rpi3_mbox.c | 2 +- plat/rpi/rpi3/rpi3_pm.c | 2 +- plat/rpi/rpi3/rpi3_rng.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename plat/rpi/rpi3/{rpi3_hw.h => include/rpi_hw.h} (98%) diff --git a/plat/rpi/rpi3/aarch64/plat_helpers.S b/plat/rpi/rpi3/aarch64/plat_helpers.S index 7974b602..556d8721 100644 --- a/plat/rpi/rpi3/aarch64/plat_helpers.S +++ b/plat/rpi/rpi3/aarch64/plat_helpers.S @@ -9,7 +9,7 @@ #include #include -#include "../rpi3_hw.h" +#include "../include/rpi_hw.h" .globl plat_crash_console_flush .globl plat_crash_console_init diff --git a/plat/rpi/rpi3/include/platform_def.h b/plat/rpi/rpi3/include/platform_def.h index 4d902225..2a12fe72 100644 --- a/plat/rpi/rpi3/include/platform_def.h +++ b/plat/rpi/rpi3/include/platform_def.h @@ -12,7 +12,7 @@ #include #include -#include "../rpi3_hw.h" +#include "rpi_hw.h" /* Special value used to verify platform parameters from BL2 to BL31 */ #define RPI3_BL31_PLAT_PARAM_VAL ULL(0x0F1E2D3C4B5A6978) diff --git a/plat/rpi/rpi3/rpi3_hw.h b/plat/rpi/rpi3/include/rpi_hw.h similarity index 98% rename from plat/rpi/rpi3/rpi3_hw.h rename to plat/rpi/rpi3/include/rpi_hw.h index 1a86835b..7a3ea57b 100644 --- a/plat/rpi/rpi3/rpi3_hw.h +++ b/plat/rpi/rpi3/include/rpi_hw.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef RPI3_HW_H -#define RPI3_HW_H +#ifndef RPI_HW_H +#define RPI_HW_H #include @@ -107,4 +107,4 @@ #define RPI3_INTC_PENDING_FIQ_OFFSET ULL(0x00000070) #define RPI3_INTC_PENDING_FIQ_MBOX3 ULL(0x00000080) -#endif /* RPI3_HW_H */ +#endif /* RPI_HW_H */ diff --git a/plat/rpi/rpi3/rpi3_common.c b/plat/rpi/rpi3/rpi3_common.c index 9b10974a..85a26c22 100644 --- a/plat/rpi/rpi3/rpi3_common.c +++ b/plat/rpi/rpi3/rpi3_common.c @@ -16,7 +16,7 @@ #include #include -#include "rpi3_hw.h" +#include #include "rpi3_private.h" #define MAP_DEVICE0 MAP_REGION_FLAT(DEVICE0_BASE, \ diff --git a/plat/rpi/rpi3/rpi3_mbox.c b/plat/rpi/rpi3/rpi3_mbox.c index 2db605ed..03b395e7 100644 --- a/plat/rpi/rpi3/rpi3_mbox.c +++ b/plat/rpi/rpi3/rpi3_mbox.c @@ -12,7 +12,7 @@ #include #include -#include "rpi3_hw.h" +#include /* This struct must be aligned to 16 bytes */ typedef struct __packed __aligned(16) rpi3_mbox_request { diff --git a/plat/rpi/rpi3/rpi3_pm.c b/plat/rpi/rpi3/rpi3_pm.c index 4f586b51..b79e2736 100644 --- a/plat/rpi/rpi3/rpi3_pm.c +++ b/plat/rpi/rpi3/rpi3_pm.c @@ -15,7 +15,7 @@ #include #include -#include "rpi3_hw.h" +#include /* Make composite power state parameter till power level 0 */ #if PSCI_EXTENDED_STATE_ID diff --git a/plat/rpi/rpi3/rpi3_rng.c b/plat/rpi/rpi3/rpi3_rng.c index fd69adbf..b6bf0052 100644 --- a/plat/rpi/rpi3/rpi3_rng.c +++ b/plat/rpi/rpi3/rpi3_rng.c @@ -9,7 +9,7 @@ #include -#include "rpi3_hw.h" +#include /* Initial amount of values to discard */ #define RNG_WARMUP_COUNT U(0x40000) -- 2.30.2