diff mbox

[U-Boot,v3,05/45] arm: fsl: Adjust ordering of #ifndef CONFIG_SPL_BUILD

Message ID 1473743943-15003-6-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Sept. 13, 2016, 5:18 a.m. UTC
The secure boot header files incorrectly define SPL options only if
CONFIG_SPL_BUILD is defined. This means that the options are only enabled
in an SPL build, and not with a normal 'make xxx_defconfig'. This means
that moveconfig.py cannot work, since it sees the options as disabled even
when they may be manually enabled in an SPL build.

Fix this by changing the order.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/arm/include/asm/fsl_secure_boot.h     | 2 +-
 arch/powerpc/include/asm/fsl_secure_boot.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Tom Rini Sept. 18, 2016, 3:58 p.m. UTC | #1
On Mon, Sep 12, 2016 at 11:18:23PM -0600, Simon Glass wrote:

> The secure boot header files incorrectly define SPL options only if
> CONFIG_SPL_BUILD is defined. This means that the options are only enabled
> in an SPL build, and not with a normal 'make xxx_defconfig'. This means
> that moveconfig.py cannot work, since it sees the options as disabled even
> when they may be manually enabled in an SPL build.
> 
> Fix this by changing the order.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/include/asm/fsl_secure_boot.h b/arch/arm/include/asm/fsl_secure_boot.h
index b35c271..1d379c7 100644
--- a/arch/arm/include/asm/fsl_secure_boot.h
+++ b/arch/arm/include/asm/fsl_secure_boot.h
@@ -26,13 +26,13 @@ 
 #define CONFIG_FSL_CAAM
 #endif
 
-#ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_DM			1
 #define CONFIG_SPL_CRYPTO_SUPPORT
 #define CONFIG_SPL_HASH_SUPPORT
 #define CONFIG_SPL_RSA
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
+#ifdef CONFIG_SPL_BUILD
 /*
  * Define the key hash for U-Boot here if public/private key pair used to
  * sign U-boot are different from the SRK hash put in the fuse
diff --git a/arch/powerpc/include/asm/fsl_secure_boot.h b/arch/powerpc/include/asm/fsl_secure_boot.h
index 2e937f0..01255d8 100644
--- a/arch/powerpc/include/asm/fsl_secure_boot.h
+++ b/arch/powerpc/include/asm/fsl_secure_boot.h
@@ -80,12 +80,13 @@ 
 
 #ifdef CONFIG_CHAIN_OF_TRUST
 
-#ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_DM			1
 #define CONFIG_SPL_CRYPTO_SUPPORT
 #define CONFIG_SPL_HASH_SUPPORT
 #define CONFIG_SPL_RSA
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
+
+#ifdef CONFIG_SPL_BUILD
 /*
  * PPAACT and SPAACT table for PAMU must be placed on DDR after DDR init
  * due to space crunch on CPC and thus malloc will not work.