MLK-18141-2 env: Kconfig: Add ENV_IS_IN_SATA config
authorYe Li <ye.li@nxp.com>
Fri, 23 Mar 2018 06:23:44 +0000 (23:23 -0700)
committerYe Li <ye.li@nxp.com>
Wed, 28 Apr 2021 20:49:33 +0000 (13:49 -0700)
The ENV_IS_IN_SATA config is missed, add it into env/Kconfig, that
we can enable it for SATA boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 75b6d78fbb2ed29039852f9e652f9acd80bf7eaa)
(cherry picked from commit 338f20a1804a21ae11b70b83bd820e0e7e399a1d)
(cherry picked from commit 051d3f53a92f89cc09884ead8cbb1454512bf464)

env/Kconfig

index b473d7c..a989a59 100644 (file)
@@ -19,7 +19,7 @@ config ENV_IS_NOWHERE
                     !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
                     !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
                     !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
-                    !ENV_IS_IN_UBI
+                    !ENV_IS_IN_UBI && !ENV_IS_IN_SATA
        help
          Define this if you don't want to or can't have an environment stored
          on a storage medium. In this case the environment will still exist
@@ -291,6 +291,20 @@ config ENV_IS_IN_REMOTE
          local device can get the environment from remote memory
          space by SRIO or PCIE links.
 
+config ENV_IS_IN_SATA
+    bool "Environment is in SATA disk"
+    depends on !CHAIN_OF_TRUST
+    help
+      Define this if you have a SATA disk device which you
+      want to use for the environment.
+
+      - CONFIG_ENV_OFFSET:
+      - CONFIG_ENV_SIZE:
+
+      These two #defines specify the offset and size of the
+      environment area within the SATA disk. CONFIG_ENV_OFFSET must be
+      aligned to an disk sector boundary.
+
 config ENV_IS_IN_SPI_FLASH
        bool "Environment is in SPI flash"
        depends on !CHAIN_OF_TRUST && SPI
@@ -516,7 +530,7 @@ config ENV_ADDR_REDUND
 config ENV_OFFSET
        hex "Environment offset"
        depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
-                   ENV_IS_IN_SPI_FLASH
+                   ENV_IS_IN_SPI_FLASH || ENV_IS_IN_SATA
        default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
        default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
        default 0x88000 if ARCH_SUNXI