[U-Boot] [PATCH 1/3] ARM: Kconfig: Move TI_SECURE_DEVICE to a common area

TI_SECURE_DEVICE is used by both OMAP2+ and Keystone2 family devices, and so when ARCH_OMAP2PLUS was used to gate off the OMAP2+ Kconfig Keystone2 family devices lost this config option.
Move this option out of mach-omap2 Kconfig to a spot accessible by both families. We picked arch/arm/Kconfig over the TI specific board/ti/ location as this option is not specific to our boards but rather our architecture.
Plus at some point this option can be changed to just SECURE_DEVICE, as having secure parts is not exclusive to TI and so other vendors can interpret this option as needed by their device configurations.
Fixes: a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig") Signed-off-by: Andrew F. Davis afd@ti.com --- arch/arm/Kconfig | 10 ++++++++++ arch/arm/mach-omap2/Kconfig | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7b618d6881..466c7502d5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1189,6 +1189,16 @@ config ARCH_ASPEED
endchoice
+config TI_SECURE_DEVICE + bool "HS Device Type Support" + depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS + help + If a high secure (HS) device type is being used, this config + must be set. This option impacts various aspects of the + build system (to create signed boot images that can be + authenticated) and the code. See the doc/README.ti-secure + file for further details. + source "arch/arm/mach-aspeed/Kconfig"
source "arch/arm/mach-at91/Kconfig" diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index abd1aa7fe1..62c25c4044 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -133,16 +133,6 @@ config SYS_MPUCLK help Defines the MPU clock speed (in MHz).
-config TI_SECURE_DEVICE - bool "HS Device Type Support" - depends on OMAP54XX || AM43XX || AM33XX || ARCH_KEYSTONE - help - If a high secure (HS) device type is being used, this config - must be set. This option impacts various aspects of the - build system (to create signed boot images that can be - authenticated) and the code. See the doc/README.ti-secure - file for further details. - config TI_SECURE_EMIF_REGION_START hex "Reserved EMIF region start address" depends on TI_SECURE_DEVICE

This seems to have been missed, possibly due to the inability to enable TI_SECURE_DEVICE on Keystone2 devices previously.
Fixes: bfebc8c965e4 ("env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()") Signed-off-by: Andrew F. Davis afd@ti.com --- board/ti/ks2_evm/board_k2g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 88df419b10..b9575a8e46 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -376,7 +376,7 @@ int get_num_eth_ports(void) #ifdef CONFIG_TI_SECURE_DEVICE void board_pmmc_image_process(ulong pmmc_image, size_t pmmc_size) { - int id = getenv_ulong("dev_pmmc", 10, 0); + int id = env_get_ulong("dev_pmmc", 10, 0); int ret;
if (!rproc_is_initialized())

On Wednesday 14 February 2018 11:23 PM, Andrew F. Davis wrote:
This seems to have been missed, possibly due to the inability to enable TI_SECURE_DEVICE on Keystone2 devices previously.
Fixes: bfebc8c965e4 ("env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()") Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Thanks and regards, Lokesh
board/ti/ks2_evm/board_k2g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 88df419b10..b9575a8e46 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -376,7 +376,7 @@ int get_num_eth_ports(void) #ifdef CONFIG_TI_SECURE_DEVICE void board_pmmc_image_process(ulong pmmc_image, size_t pmmc_size) {
- int id = getenv_ulong("dev_pmmc", 10, 0);
int id = env_get_ulong("dev_pmmc", 10, 0); int ret;
if (!rproc_is_initialized())

On Wed, Feb 14, 2018 at 11:53:38AM -0600, Andrew F. Davis wrote:
This seems to have been missed, possibly due to the inability to enable TI_SECURE_DEVICE on Keystone2 devices previously.
Fixes: bfebc8c965e4 ("env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()") Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Applied to u-boot/master, thanks!

These got removed in config re-syncs due to a Kconfig bug. Add these back here.
Signed-off-by: Andrew F. Davis afd@ti.com --- configs/k2e_hs_evm_defconfig | 2 ++ configs/k2g_hs_evm_defconfig | 2 ++ configs/k2hk_hs_evm_defconfig | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig index 266fb8abdc..44ed07e7f9 100644 --- a/configs/k2e_hs_evm_defconfig +++ b/configs/k2e_hs_evm_defconfig @@ -1,9 +1,11 @@ CONFIG_ARM=y CONFIG_ARCH_KEYSTONE=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_TEXT_BASE=0xC000060 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_TARGET_K2E_EVM=y CONFIG_DEFAULT_DEVICE_TREE="keystone-k2e-evm" +CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig index 5acc04be6f..ea1a61efa5 100644 --- a/configs/k2g_hs_evm_defconfig +++ b/configs/k2g_hs_evm_defconfig @@ -1,9 +1,11 @@ CONFIG_ARM=y CONFIG_ARCH_KEYSTONE=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_TEXT_BASE=0xC000060 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_TARGET_K2G_EVM=y CONFIG_DEFAULT_DEVICE_TREE="keystone-k2g-evm" +CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig index 931a20c8e7..0a39da55f5 100644 --- a/configs/k2hk_hs_evm_defconfig +++ b/configs/k2hk_hs_evm_defconfig @@ -1,9 +1,11 @@ CONFIG_ARM=y CONFIG_ARCH_KEYSTONE=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_TEXT_BASE=0xC000060 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_TARGET_K2HK_EVM=y CONFIG_DEFAULT_DEVICE_TREE="keystone-k2hk-evm" +CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y

On Wednesday 14 February 2018 11:23 PM, Andrew F. Davis wrote:
These got removed in config re-syncs due to a Kconfig bug. Add these back here.
Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Thanks and regards, Lokesh
configs/k2e_hs_evm_defconfig | 2 ++ configs/k2g_hs_evm_defconfig | 2 ++ configs/k2hk_hs_evm_defconfig | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig index 266fb8abdc..44ed07e7f9 100644 --- a/configs/k2e_hs_evm_defconfig +++ b/configs/k2e_hs_evm_defconfig @@ -1,9 +1,11 @@ CONFIG_ARM=y CONFIG_ARCH_KEYSTONE=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_TEXT_BASE=0xC000060 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_TARGET_K2E_EVM=y CONFIG_DEFAULT_DEVICE_TREE="keystone-k2e-evm" +CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig index 5acc04be6f..ea1a61efa5 100644 --- a/configs/k2g_hs_evm_defconfig +++ b/configs/k2g_hs_evm_defconfig @@ -1,9 +1,11 @@ CONFIG_ARM=y CONFIG_ARCH_KEYSTONE=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_TEXT_BASE=0xC000060 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_TARGET_K2G_EVM=y CONFIG_DEFAULT_DEVICE_TREE="keystone-k2g-evm" +CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig index 931a20c8e7..0a39da55f5 100644 --- a/configs/k2hk_hs_evm_defconfig +++ b/configs/k2hk_hs_evm_defconfig @@ -1,9 +1,11 @@ CONFIG_ARM=y CONFIG_ARCH_KEYSTONE=y +CONFIG_TI_SECURE_DEVICE=y CONFIG_SYS_TEXT_BASE=0xC000060 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_TARGET_K2HK_EVM=y CONFIG_DEFAULT_DEVICE_TREE="keystone-k2hk-evm" +CONFIG_FIT_IMAGE_POST_PROCESS=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_VERSION_VARIABLE=y

On Wed, Feb 14, 2018 at 11:53:39AM -0600, Andrew F. Davis wrote:
These got removed in config re-syncs due to a Kconfig bug. Add these back here.
Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Applied to u-boot/master, thanks!

On Wednesday 14 February 2018 11:23 PM, Andrew F. Davis wrote:
TI_SECURE_DEVICE is used by both OMAP2+ and Keystone2 family devices, and so when ARCH_OMAP2PLUS was used to gate off the OMAP2+ Kconfig Keystone2 family devices lost this config option.
Move this option out of mach-omap2 Kconfig to a spot accessible by both families. We picked arch/arm/Kconfig over the TI specific board/ti/ location as this option is not specific to our boards but rather our architecture.
Plus at some point this option can be changed to just SECURE_DEVICE, as having secure parts is not exclusive to TI and so other vendors can interpret this option as needed by their device configurations.
Fixes: a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig") Signed-off-by: Andrew F. Davis afd@ti.com
Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Thanks and regards, Lokesh
arch/arm/Kconfig | 10 ++++++++++ arch/arm/mach-omap2/Kconfig | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7b618d6881..466c7502d5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1189,6 +1189,16 @@ config ARCH_ASPEED
endchoice
+config TI_SECURE_DEVICE
- bool "HS Device Type Support"
- depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS
- help
If a high secure (HS) device type is being used, this config
must be set. This option impacts various aspects of the
build system (to create signed boot images that can be
authenticated) and the code. See the doc/README.ti-secure
file for further details.
source "arch/arm/mach-aspeed/Kconfig"
source "arch/arm/mach-at91/Kconfig" diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index abd1aa7fe1..62c25c4044 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -133,16 +133,6 @@ config SYS_MPUCLK help Defines the MPU clock speed (in MHz).
-config TI_SECURE_DEVICE
- bool "HS Device Type Support"
- depends on OMAP54XX || AM43XX || AM33XX || ARCH_KEYSTONE
- help
If a high secure (HS) device type is being used, this config
must be set. This option impacts various aspects of the
build system (to create signed boot images that can be
authenticated) and the code. See the doc/README.ti-secure
file for further details.
config TI_SECURE_EMIF_REGION_START hex "Reserved EMIF region start address" depends on TI_SECURE_DEVICE

On Wed, Feb 14, 2018 at 11:53:37AM -0600, Andrew F. Davis wrote:
TI_SECURE_DEVICE is used by both OMAP2+ and Keystone2 family devices, and so when ARCH_OMAP2PLUS was used to gate off the OMAP2+ Kconfig Keystone2 family devices lost this config option.
Move this option out of mach-omap2 Kconfig to a spot accessible by both families. We picked arch/arm/Kconfig over the TI specific board/ti/ location as this option is not specific to our boards but rather our architecture.
Plus at some point this option can be changed to just SECURE_DEVICE, as having secure parts is not exclusive to TI and so other vendors can interpret this option as needed by their device configurations.
Fixes: a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig") Signed-off-by: Andrew F. Davis afd@ti.com Reviewed-by: Lokesh Vutla lokeshvutla@ti.com
Applied to u-boot/master, thanks!
participants (3)
-
Andrew F. Davis
-
Lokesh Vutla
-
Tom Rini