public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [PATCH v2 1/9] treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT
Date: Wed, 18 Nov 2020 17:45:54 +0100	[thread overview]
Message-ID: <20201118164602.22518-2-michael@walle.cc> (raw)
In-Reply-To: <20201118164602.22518-1-michael@walle.cc>

There is SPL_ARMV8_SEC_FIRMWARE_SUPPORT and ARMV8_SEC_FIRMWARE_SUPPORT.
Thus use CONFIG_IS_ENABLED() instead of the simple #ifdef.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Michal Simek <michal.simek@xilinx.com>
---
 arch/arm/cpu/armv8/cpu-dt.c             | 2 +-
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 8 ++++----
 arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 2 +-
 arch/arm/lib/bootm-fdt.c                | 2 +-
 arch/arm/lib/psci-dt.c                  | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/armv8/cpu-dt.c b/arch/arm/cpu/armv8/cpu-dt.c
index 97d4473a68..61c38b17cb 100644
--- a/arch/arm/cpu/armv8/cpu-dt.c
+++ b/arch/arm/cpu/armv8/cpu-dt.c
@@ -9,7 +9,7 @@
 #include <asm/system.h>
 #include <asm/armv8/sec_firmware.h>
 
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 int psci_update_dt(void *fdt)
 {
 	/*
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
index 6d3391db3b..598ee2ffa2 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c
@@ -26,7 +26,7 @@
 #endif
 #include <fsl_sec.h>
 #include <asm/arch-fsl-layerscape/soc.h>
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 #include <asm/armv8/sec_firmware.h>
 #endif
 #include <asm/arch/speed.h>
@@ -81,7 +81,7 @@ void ft_fixup_cpu(void *blob)
 						    "device_type", "cpu", 4);
 	}
 
-#if defined(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) && \
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT) && \
 	defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
 	int node;
 	u32 psci_ver;
@@ -383,7 +383,7 @@ static void fdt_fixup_msi(void *blob)
 }
 #endif
 
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 /* Remove JR node used by SEC firmware */
 void fdt_fixup_remove_jr(void *blob)
 {
@@ -488,7 +488,7 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
 	else {
 		ccsr_sec_t __iomem *sec;
 
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 		fdt_fixup_remove_jr(blob);
 		fdt_fixup_kaslr(blob);
 #endif
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 1ddb267093..2285296ea0 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -16,7 +16,7 @@
 #elif defined(CONFIG_FSL_LSCH2)
 #include <asm/arch/immap_lsch2.h>
 #endif
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 #include <asm/armv8/sec_firmware.h>
 #endif
 #ifdef CONFIG_CHAIN_OF_TRUST
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index 02a49a8e10..fe46a7d7c9 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -63,7 +63,7 @@ int arch_fixup_fdt(void *blob)
 #endif
 
 #if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV8_PSCI) || \
-	defined(CONFIG_SEC_FIRMWARE_ARMV8_PSCI)
+	CONFIG_IS_ENABLED(SEC_FIRMWARE_ARMV8_PSCI)
 	ret = psci_update_dt(blob);
 	if (ret)
 		return ret;
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 0ed29a43f1..903b335704 100644
--- a/arch/arm/lib/psci-dt.c
+++ b/arch/arm/lib/psci-dt.c
@@ -10,7 +10,7 @@
 #include <linux/sizes.h>
 #include <linux/kernel.h>
 #include <asm/psci.h>
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 #include <asm/armv8/sec_firmware.h>
 #endif
 
@@ -64,7 +64,7 @@ int fdt_psci(void *fdt)
 		return nodeoff;
 
 init_psci_node:
-#ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 	psci_ver = sec_firmware_support_psci_version();
 #elif defined(CONFIG_ARMV7_PSCI_1_0) || defined(CONFIG_ARMV8_PSCI)
 	psci_ver = ARM_PSCI_VER_1_0;
@@ -85,7 +85,7 @@ init_psci_node:
 			return tmp;
 	}
 
-#ifndef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
+#if !CONFIG_IS_ENABLED(ARMV8_SEC_FIRMWARE_SUPPORT)
 	/*
 	 * The Secure firmware framework isn't able to support PSCI version 0.1.
 	 */
-- 
2.20.1

  reply	other threads:[~2020-11-18 16:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 16:45 [PATCH v2 0/9] spl: atf: add support for LOAD_IMAGE_V2 Michael Walle
2020-11-18 16:45 ` Michael Walle [this message]
2020-12-07 22:19   ` [PATCH v2 1/9] treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT Tom Rini
2020-11-18 16:45 ` [PATCH v2 2/9] spl: atf: move storage for bl31_params into function Michael Walle
2020-12-07 22:19   ` Tom Rini
2020-11-18 16:45 ` [PATCH v2 3/9] spl: atf: provide a bl2_plat_get_bl31_params_default() Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-11-18 16:45 ` [PATCH v2 4/9] spl: atf: remove helper structure from common header Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-11-18 16:45 ` [PATCH v2 5/9] spl: atf: add support for LOAD_IMAGE_V2 Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-11-18 16:45 ` [PATCH v2 6/9] armv8: layerscape: don't initialize GIC in SPL Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-11-18 16:46 ` [PATCH v2 7/9] board: sl28: remove u-boot from loadable DT node Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-12-07 22:20   ` Tom Rini
2020-11-18 16:46 ` [PATCH v2 8/9] board: sl28: add ATF support (bl31) Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-11-18 16:46 ` [PATCH v2 9/9] board: sl28: add OP-TEE Trusted OS support (bl32) Michael Walle
2020-12-07 22:20   ` Tom Rini
2020-11-20 10:14 ` [PATCH v2 0/9] spl: atf: add support for LOAD_IMAGE_V2 Michal Simek
2020-11-20 10:48   ` Michael Walle
2020-11-20 11:15     ` Michal Simek
2020-11-20 11:27       ` Michael Walle
2020-11-20 13:16         ` Michal Simek
2020-11-20 13:25           ` Michael Walle
2020-11-20 13:35             ` Michal Simek
2020-11-20 13:48               ` Michael Walle
2020-11-20 14:42               ` Tom Rini
2020-11-20 12:48     ` Michael Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201118164602.22518-2-michael@walle.cc \
    --to=michael@walle.cc \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox