Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig
PATCH 1/1 Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig
Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig. Split the command handling from the underlying support and expose this through CMD_MMC_RPMB.
Signed-off-by Alex Kiernan <[email protected]>
---
README | 4 ---- cmd/Kconfig | 7 +++++++ cmd/mmc.c | 6 +++--- configs/gwventana_emmc_defconfig | 1 + configs/gwventana_gw5904_defconfig | 1 + configs/gwventana_nand_defconfig | 1 + configs/vining_2000_defconfig | 1 + drivers/mmc/Kconfig | 7 +++++++ include/configs/gw_ventana.h | 1 - include/configs/vining_2000.h | 1 - scripts/config_whitelist.txt | 1 - 11 files changed, 21 insertions(+), 10 deletions(-)
README +0 -4
@@ -1172,10 +1172,6 @@ The following options need to be configured: CONFIG_SUPPORT_EMMC_BOOT Enable some additional features of the eMMC boot partitions. - CONFIG_SUPPORT_EMMC_RPMB - Enable the commands for reading, writing and programming the - key for the Replay Protection Memory Block partition in eMMC. - - USB Device Firmware Update (DFU) class support: CONFIG_DFU_OVER_USB This enables the USB portion of the DFU USB class
cmd/Kconfig +7 -0
@@ -808,6 +808,13 @@ config CMD_MMC help MMC memory mapped support. +config CMD_MMC_RPMB + bool "Enable support for RPMB in the mmc command" + depends on CMD_MMC + help + Enable the commands for reading, writing and programming the + key for the Replay Protection Memory Block partition in eMMC. + config CMD_NAND bool "nand" default y if NAND_SUNXI
cmd/mmc.c +3 -3
@@ -126,7 +126,7 @@ static int do_mmcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])return CMD_RET_SUCCESS ; } -#ifdef CONFIG_SUPPORT_EMMC_RPMB +#if CONFIG_IS_ENABLED (CMD_MMC_RPMB )static int confirm_key_prog (void ) { puts("Warning: Programming authentication key can be done only once !\n"
@@ -816,7 +816,7 @@ static cmd_tbl_t cmd_mmc[] = {U_BOOT_CMD_MKENT (partconf,5 ,0 , do_mmc_partconf,"" ,"" ),U_BOOT_CMD_MKENT (rst-function,3 ,0 , do_mmc_rst_func,"" ,"" ), #endif -#ifdef CONFIG_SUPPORT_EMMC_RPMB +#if CONFIG_IS_ENABLED(CMD_MMC_RPMB)U_BOOT_CMD_MKENT (rpmb,CONFIG_SYS_MAXARGS ,1 , do_mmcrpmb,"" ,"" ), #endif U_BOOT_CMD_MKENT(setdsr, 2, 0, do_mmc_setdsr, "", ""),
@@ -880,7 +880,7 @@ U_BOOT_CMD(" - Change the RST_n_FUNCTION field of the specified device\n" " WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.\n"#endif -#ifdef CONFIG_SUPPORT_EMMC_RPMB +#if CONFIG_IS_ENABLED (CMD_MMC_RPMB )"mmc rpmb read addr blk# cnt [address of auth-key] - block size is 256 bytes\n" "mmc rpmb write addr blk# cnt <address of auth-key> - block size is 256 bytes\n" "mmc rpmb key <address of auth-key> - program the RPMB authentication key.\n"
configs/gwventana_emmc_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_CMD_UBI=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y +CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_FSL_ESDHC=y CONFIG_PHYLIB=y CONFIG_NETDEVICES=y
configs/gwventana_gw5904_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_CMD_UBI=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_DWC_AHSATA=y +CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_FSL_ESDHC=y CONFIG_PHYLIB=y CONFIG_MV88E61XX_SWITCH=y
configs/gwventana_nand_defconfig +1 -0
@@ -58,6 +58,7 @@ CONFIG_CMD_UBI=y CONFIG_ENV_IS_IN_NAND=y CONFIG_DM=y CONFIG_DWC_AHSATA=y +CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_FSL_ESDHC=y CONFIG_NAND=y CONFIG_NAND_MXS=y
configs/vining_2000_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_EFI_PARTITION=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_SUPPORT_EMMC_RPMB=y CONFIG_FSL_ESDHC=y CONFIG_PHYLIB=y CONFIG_PCI=y
drivers/mmc/Kconfig +7 -0
@@ -71,6 +71,13 @@ config MMC_HW_PARTITIONING This adds a command and an API to do hardware partitioning on eMMC devices. +config SUPPORT_EMMC_RPMB + bool "Support eMMC replay protected memory block (RPMB)" + imply CMD_MMC_RPMB + help + Enable support for reading, writing and programming the + key for the Replay Protection Memory Block partition in eMMC. + config MMC_IO_VOLTAGE bool "Support IO voltage configuration" help
include/configs/gw_ventana.h +0 -1
@@ -89,7 +89,6 @@/* eMMC Configs */ #define CONFIG_SUPPORT_EMMC_BOOT -#define CONFIG_SUPPORT_EMMC_RPMB /* * SATA Configs
include/configs/vining_2000.h +0 -1
@@ -98,7 +98,6 @@#ifdef CONFIG_ENV_IS_IN_MMC #define CONFIG_SUPPORT_EMMC_BOOT -#define CONFIG_SUPPORT_EMMC_RPMB #define CONFIG_SYS_MMC_ENV_DEV 0/* USDHC4 eMMC */ /* 0=user, 1=boot0, 2=boot1, * 4..7=general0..3. */ #define CONFIG_SYS_MMC_ENV_PART 1/* boot0 */
scripts/config_whitelist.txt +0 -1
@@ -2035,7 +2035,6 @@ CONFIG_SUNXI_MAX_FB_SIZE CONFIG_SUNXI_USB_PHYS CONFIG_SUPERH_ON_CHIP_R8A66597 CONFIG_SUPPORT_EMMC_BOOT -CONFIG_SUPPORT_EMMC_RPMB CONFIG_SUVD3 CONFIG_SXNI855T CONFIG_SYSFLAGS_ADDR
Signature · 1 line
2.7.4
Quoted 4 lines · Alex Kiernan
Convert
CONFIG_SUPPORT_EMMC_RPMBtoKconfig. Split the command handling from the underlying support and expose this throughCMD_MMC_RPMB.Signed-off-by Alex Kiernan <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180524/a128c8ea/attachment.sig>