From patchwork Mon Apr 20 14:05:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 238108 List-Id: U-Boot discussion From: jagan at amarulasolutions.com (Jagan Teki) Date: Mon, 20 Apr 2020 19:35:11 +0530 Subject: [PATCH 2/5] env: Enable SPI flash env for SiFive FU540 In-Reply-To: <20200420140514.25847-1-jagan@amarulasolutions.com> References: <20200420140514.25847-1-jagan@amarulasolutions.com> Message-ID: <20200420140514.25847-3-jagan@amarulasolutions.com> SPI flash device on HiFive Unleashed has 32MiB Size. This patch add SPI flash environment after U-Boot proper partition with a size of 128KiB. SPI flash partition layout(32MiB): 0 - 34 : reserved for GPT header 35 - 39 : unused 40 - 2087 : loader1 (SPL, FSBL) 2088 - 10279 : loader2 (U-Boot proper, U-Boot) 10280 - 10535 : environment 10536 - 65494 : rootfs 65528 - 65536 : distro script Signed-off-by: Jagan Teki --- env/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 0d6f559b39..67c88fd40b 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -500,6 +500,7 @@ config ENV_OFFSET default 0 if ARC default 0x140000 if ARCH_AT91 default 0x260000 if ARCH_OMAP2PLUS + default 0x505000 if TARGET_SIFIVE_FU540 help Offset from the start of the device (or partition) @@ -519,6 +520,7 @@ config ENV_SIZE default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x4000 if ARC + default 0x20000 if TARGET_SIFIVE_FU540 default 0x1f000 help Size of the environment storage area @@ -529,6 +531,7 @@ config ENV_SECT_SIZE default 0x2000 if ARCH_ROCKCHIP default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91 + default 0x10000 if TARGET_SIFIVE_FU540 help Size of the sector containing the environment.