]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
crypto: Move CONFIG_SYS_FSL_SEC_LE and _BE to Kconfig
authorYork Sun <york.sun@nxp.com>
Wed, 28 Dec 2016 16:43:31 +0000 (08:43 -0800)
committerTom Rini <trini@konsulko.com>
Thu, 5 Jan 2017 00:40:19 +0000 (19:40 -0500)
Use Kconfig option to set little- or big-endian access to secure
boot and trust architecture.

Signed-off-by: York Sun <york.sun@nxp.com>
14 files changed:
arch/arm/Kconfig
arch/arm/cpu/armv7/ls102xa/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/include/asm/arch-fsl-layerscape/config.h
arch/arm/include/asm/arch-ls102xa/config.h
arch/powerpc/Kconfig
arch/powerpc/cpu/mpc85xx/Kconfig
arch/powerpc/include/asm/config.h
arch/powerpc/include/asm/config_mpc85xx.h
drivers/crypto/fsl/Kconfig
include/configs/mx6_common.h
include/configs/mx7_common.h
include/fsl_sec.h
scripts/config_whitelist.txt

index 5080a96c401dc4fae9b4f021fb6995043f3ae859..698370becfe500300b0b31db1d4402136025f128 100644 (file)
@@ -466,12 +466,14 @@ config ARCH_MX7
        select CPU_V7
        select SYS_FSL_HAS_SEC if SECURE_BOOT
        select SYS_FSL_SEC_COMPAT_4
+       select SYS_FSL_SEC_LE
 
 config ARCH_MX6
        bool "Freescale MX6"
        select CPU_V7
        select SYS_FSL_HAS_SEC if SECURE_BOOT
        select SYS_FSL_SEC_COMPAT_4
+       select SYS_FSL_SEC_LE
 
 config ARCH_MX5
        bool "Freescale MX5"
index e233aa495f2cd9f916e65fe1ea8fe03cf056c4d9..d154f7b0f68c8b4d9066e2bef326b1a4c483b3d8 100644 (file)
@@ -7,6 +7,7 @@ config ARCH_LS1021A
        select SYS_FSL_DDR_VER_50
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_COMPAT_5
+       select SYS_FSL_SEC_LE
 
 menu "LS102xA architecture"
        depends on ARCH_LS1021A
index 17b470dbd4ec01d852fe6005ff858023e699b56a..a1f781edb74823f49bccc82b12baad5eced61b52 100644 (file)
@@ -31,12 +31,14 @@ config ARCH_LS2080A
        select SYS_FSL_HAS_DP_DDR
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_COMPAT_5
+       select SYS_FSL_SEC_LE
        select SYS_FSL_SRDS_2
 
 config FSL_LSCH2
        bool
        select SYS_FSL_HAS_SEC
        select SYS_FSL_SEC_COMPAT_5
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SRDS_1
        select SYS_HAS_SERDES
 
index f4f9eaa4dc1628cb91be138f0345d2236ff3289c..29fc33d4de6f792ceb41952855c552abcd3e5b62 100644 (file)
@@ -55,9 +55,6 @@
 #define CONFIG_SYS_FSL_SFP_LE
 #define CONFIG_SYS_FSL_SRK_LE
 
-/* SEC */
-#define CONFIG_SYS_FSL_SEC_LE
-
 /* Security Monitor */
 #define CONFIG_SYS_FSL_SEC_MON_LE
 
 #define CONFIG_SYS_FSL_QSPI_BE
 #define CONFIG_SYS_FSL_CCSR_GUR_BE
 #define CONFIG_SYS_FSL_PEX_LUT_BE
-#define CONFIG_SYS_FSL_SEC_BE
 
 /* SoC related */
 #ifdef CONFIG_LS1043A
index 97c69e9639a7715fa2dd2e0b8ff84821784a2269..1c5158b00bd30de65568fcc66fb3f4d7b2c84e03 100644 (file)
 #define CONFIG_SYS_FSL_QSPI_BE
 #define CONFIG_SYS_FSL_DCU_BE
 #define CONFIG_SYS_FSL_SEC_MON_LE
-#define CONFIG_SYS_FSL_SEC_LE
 #define CONFIG_SYS_FSL_SFP_VER_3_2
 #define CONFIG_SYS_FSL_SFP_BE
 #define CONFIG_SYS_FSL_SRK_LE
index 9fc1d5c8837619efd0ffa5b9bebbcbe19e9324b1..853e2656fa7e41584a4a3f575ca6ab055bc2bd17 100644 (file)
@@ -24,6 +24,7 @@ config MPC83xx
        bool "MPC83xx"
        select CREATE_ARCH_SYMLINK
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
 
 config MPC85xx
index 1d4f702c4a7d4bbcc63b04e604897032137419cd..3f94f5cd1c056683e69fb15a83e134bf184faee7 100644 (file)
@@ -326,6 +326,7 @@ config ARCH_B4420
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_B4860
@@ -333,18 +334,21 @@ config ARCH_B4860
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_BSC9131
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_BSC9132
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -352,6 +356,7 @@ config ARCH_C29X
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_6
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -359,6 +364,7 @@ config ARCH_MPC8536
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -370,12 +376,14 @@ config ARCH_MPC8541
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
 
 config ARCH_MPC8544
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -383,6 +391,7 @@ config ARCH_MPC8548
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -390,6 +399,7 @@ config ARCH_MPC8555
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
 
 config ARCH_MPC8560
@@ -400,12 +410,14 @@ config ARCH_MPC8568
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
 
 config ARCH_MPC8569
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
 
 config ARCH_MPC8572
@@ -413,12 +425,14 @@ config ARCH_MPC8572
        select FSL_LAW
        select SYS_PPC_E500_USE_DEBUG_TLB
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
 
 config ARCH_P1010
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -426,6 +440,7 @@ config ARCH_P1011
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -433,6 +448,7 @@ config ARCH_P1020
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -440,6 +456,7 @@ config ARCH_P1021
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -447,6 +464,7 @@ config ARCH_P1022
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -454,12 +472,14 @@ config ARCH_P1023
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_P1024
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -467,6 +487,7 @@ config ARCH_P1025
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -474,6 +495,7 @@ config ARCH_P2020
        bool
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_2
        select SYS_PPC_E500_USE_DEBUG_TLB
 
@@ -482,6 +504,7 @@ config ARCH_P2041
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_P3041
@@ -489,6 +512,7 @@ config ARCH_P3041
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_P4080
@@ -496,6 +520,7 @@ config ARCH_P4080
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_P5020
@@ -503,6 +528,7 @@ config ARCH_P5020
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_P5040
@@ -510,6 +536,7 @@ config ARCH_P5040
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_QEMU_E500
@@ -520,6 +547,7 @@ config ARCH_T1023
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_5
 
 config ARCH_T1024
@@ -527,6 +555,7 @@ config ARCH_T1024
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_5
 
 config ARCH_T1040
@@ -534,6 +563,7 @@ config ARCH_T1040
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_5
 
 config ARCH_T1042
@@ -541,6 +571,7 @@ config ARCH_T1042
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_5
 
 config ARCH_T2080
@@ -548,6 +579,7 @@ config ARCH_T2080
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_T2081
@@ -555,6 +587,7 @@ config ARCH_T2081
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_T4160
@@ -562,6 +595,7 @@ config ARCH_T4160
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config ARCH_T4240
@@ -569,6 +603,7 @@ config ARCH_T4240
        select E500MC
        select FSL_LAW
        select SYS_FSL_HAS_SEC
+       select SYS_FSL_SEC_BE
        select SYS_FSL_SEC_COMPAT_4
 
 config BOOKE
index 9b7bcb03f91bdbcbf92553d1811dbf4401741ba0..d4f05d1806acc0be9e5045c2711fd7c1030cb56a 100644 (file)
 #endif
 #endif
 
-/*
- * SEC (crypto unit) major compatible version determination
- */
-#if defined(CONFIG_MPC83xx)
-#define CONFIG_SYS_FSL_SEC_BE
-#endif
-
 /* Since so many PPC SOCs have a semi-common LBC, define this here */
 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \
        defined(CONFIG_MPC83xx)
index 7131b61db7c134f891297e9dd933f9a244746003..8bae57701ec12ee64c6eafd1588ba87eab69bc65 100644 (file)
@@ -20,7 +20,6 @@
 
 /* IP endianness */
 #define CONFIG_SYS_FSL_IFC_BE
-#define CONFIG_SYS_FSL_SEC_BE
 #define CONFIG_SYS_FSL_SFP_BE
 #define CONFIG_SYS_FSL_SEC_MON_BE
 
index 510a108052d165a123088407a2c0bd5febf68a49..31889598e8e7c5a4246f77a86a9bfcf63750008f 100644 (file)
@@ -30,6 +30,9 @@ config SYS_FSL_SEC_COMPAT_6
        help
                Secure boot and trust architecture compatible version 6
 
+config SYS_FSL_SEC_BE
+       bool "Big-endian access to Freescale Secure Boot"
+
 config SYS_FSL_SEC_COMPAT
        int "Freescale Secure Boot compatibility"
        depends on SYS_FSL_HAS_SEC
@@ -37,3 +40,6 @@ config SYS_FSL_SEC_COMPAT
        default 4 if SYS_FSL_SEC_COMPAT_4
        default 5 if SYS_FSL_SEC_COMPAT_5
        default 6 if SYS_FSL_SEC_COMPAT_6
+
+config SYS_FSL_SEC_LE
+       bool "Little-endian access to Freescale Secure Boot"
index 7c949971dc3035e82058f3ce4dbaf3b4d7d1a405..0a1563c6f50e6556faab430d98fb8b3cddea8a68 100644 (file)
@@ -96,7 +96,6 @@
 #define CONFIG_CSF_SIZE                        0x2000
 #define CONFIG_FSL_CAAM
 #define CONFIG_CMD_DEKBLOB
-#define CONFIG_SYS_FSL_SEC_LE
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
 #endif
index 4b62cedcd36a232533946ad99c20e33fb1ade668..16fedfb20b8d65a430791224256f6d47c261d4ec 100644 (file)
@@ -76,7 +76,6 @@
 #define CONFIG_CSF_SIZE                        0x2000
 #define CONFIG_FSL_CAAM
 #define CONFIG_CMD_DEKBLOB
-#define CONFIG_SYS_FSL_SEC_LE
 #endif
 
 #endif
index e6080d4ff078a4afb592a59c74f0d3d797fa98a5..61c671d6c734c4d4d59fe0df421309d07dd166b7 100644 (file)
@@ -24,7 +24,7 @@
 #define sec_in16(a)       in_be16(a)
 #define sec_clrbits32     clrbits_be32
 #define sec_setbits32     setbits_be32
-#else
+#elif defined(CONFIG_SYS_FSL_HAS_SEC)
 #error Neither CONFIG_SYS_FSL_SEC_LE nor CONFIG_SYS_FSL_SEC_BE is defined
 #endif
 
index 487c6ab27f182dee3b917f3b7b002f24f4d7a250..364a4713486765cc132d505acd9af820cf67f5f2 100644 (file)
@@ -5545,9 +5545,7 @@ CONFIG_SYS_FSL_SCFG_OFFSET
 CONFIG_SYS_FSL_SCFG_PIXCLKCR_OFFSET
 CONFIG_SYS_FSL_SCFG_PIXCLK_ADDR
 CONFIG_SYS_FSL_SEC_ADDR
-CONFIG_SYS_FSL_SEC_BE
 CONFIG_SYS_FSL_SEC_IDX_OFFSET
-CONFIG_SYS_FSL_SEC_LE
 CONFIG_SYS_FSL_SEC_MON_BE
 CONFIG_SYS_FSL_SEC_MON_LE
 CONFIG_SYS_FSL_SEC_OFFSET