From patchwork Fri Apr 10 18:26:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 237666 List-Id: U-Boot discussion From: jagan at amarulasolutions.com (Jagan Teki) Date: Fri, 10 Apr 2020 23:56:31 +0530 Subject: [PATCH v2 3/3] rockchip: Enable SF distro bootcmd In-Reply-To: <20200410182631.11951-1-jagan@amarulasolutions.com> References: <20200410182631.11951-1-jagan@amarulasolutions.com> Message-ID: <20200410182631.11951-4-jagan@amarulasolutions.com> Enable SPI flash(SF) distro boot command in Rockchip. This distro boot will read the boot script at specific location at the flash and start sourcing the same. Included the SF device at the last of the target devices list since all the rest of the devices on the list have more possibility to boot the distribution due to the size of the SPI flash is concern. Cc: Tom Rini Signed-off-by: Jagan Teki --- Changes for v2: - update BOOT_TARGET_SF include/configs/rk3399_common.h | 1 + include/configs/rockchip-common.h | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 01a9174bd2..f0ae6e67a7 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -60,6 +60,7 @@ #endif #include +#include #define CONFIG_EXTRA_ENV_SETTINGS \ ENV_MEM_LAYOUT_SETTINGS \ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index b55e09a9ca..d97395db90 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -41,11 +41,18 @@ #define BOOT_TARGET_DHCP(func) #endif +#if CONFIG_IS_ENABLED(CMD_SF) + #define BOOT_TARGET_SF(func) func(SF, sf, 0) +#else + #define BOOT_TARGET_SF(func) +#endif + #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_MMC(func) \ BOOT_TARGET_USB(func) \ BOOT_TARGET_PXE(func) \ - BOOT_TARGET_DHCP(func) + BOOT_TARGET_DHCP(func) \ + BOOT_TARGET_SF(func) #ifdef CONFIG_ARM64 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"