Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig
authorAlex Kiernan <alex.kiernan@gmail.com>
Tue, 8 May 2018 04:43:31 +0000 (04:43 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 23 May 2018 21:30:02 +0000 (17:30 -0400)
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 <alex.kiernan@gmail.com>
README
cmd/Kconfig
cmd/mmc.c
configs/gwventana_emmc_defconfig
configs/gwventana_gw5904_defconfig
configs/gwventana_nand_defconfig
configs/vining_2000_defconfig
drivers/mmc/Kconfig
include/configs/gw_ventana.h
include/configs/vining_2000.h
scripts/config_whitelist.txt

diff --git a/README b/README
index a62aee16197aa9303a02a70b4f694371eae69132..48ed3e06ecf056485221e1a7016360b4b5d1f4a7 100644 (file)
--- a/README
+++ b/README
@@ -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
index 38406fcfdacf06fe278f7bb468231d5b5fcdfc77..036bad8a36a5eb7a713289449b03f3dedaadcfed 100644 (file)
@@ -816,6 +816,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
index 68bbf1f51353e6ffa496e75e8ff2d96aea031252..a3357eff8faa632ed817df9313e68b8696111a61 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -128,7 +128,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"
@@ -886,7 +886,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, "", ""),
@@ -953,7 +953,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"
index c77de886da630f91a1b17a7652691a6f7b45787d..d4de3b408e94245a96b4e053177a38be5e732a9f 100644 (file)
@@ -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
index 007b49abc8074145c42f54815eb4fccc3b366387..fdad5ee4ee5ea00d187653e1abb91f6f87d481b5 100644 (file)
@@ -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
index 1de70818eff5ea63559229429a13cb57867a8554..e6ccfef7aacd2c767193e84cce7ee41cb35c8401 100644 (file)
@@ -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
index 1d28b2f1dbd66392cfe5e93635ea4b0602410ad2..8cc030bd3c3a9b045359fefe25a510d615698a03 100644 (file)
@@ -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
index 3f15f85efdaa57160efdc5b4b6d76c502d5f65c7..693b3ceaf007bc83dc35a5393f9c8d51f6f22ca8 100644 (file)
@@ -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
index b8eefe3b1185f34d48c490b5b5c9d409869dae83..1b7e29ca5e76f5c83d774e2452551102a569d520 100644 (file)
@@ -89,7 +89,6 @@
 
 /* eMMC Configs */
 #define CONFIG_SUPPORT_EMMC_BOOT
-#define CONFIG_SUPPORT_EMMC_RPMB
 
 /*
  * SATA Configs
index 0b5f9403412b1f1f10d14b4458cd8ead556beb9a..43f986342dec193c0ba61af6cf7ecae79911e8bf 100644 (file)
@@ -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 */
index 832779817928def4d905fd72a24997a4dc1b9b9a..7481f322ab99a3fe57b6549e83c0caeab05547d9 100644 (file)
@@ -2033,7 +2033,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