diff mbox series

[2/2] configs: ls2080ardb: Make BOOTCOMMAND access flash memory as per spi-mem

Message ID 1580709961-24830-2-git-send-email-kuldeep.singh@nxp.com
State New
Headers show
Series [1/2] configs: ls2080ardb: Make QSPI_MC_INIT access flash memory as per spi-mem | expand

Commit Message

Kuldeep Singh Feb. 3, 2020, 6:06 a.m. UTC
BOOT command currently access spi-nor flash memory directly. As per spi-mem
framework, flash memory access via absolute addresses is no more possible.
Use flash APIs to access memory instead of directly using it.

Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
---
 include/configs/ls2080ardb.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 6a74f62..87d2aeb 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -509,9 +509,11 @@  unsigned long get_board_sys_clk(void);
 #ifdef CONFIG_TFABOOT
 #define QSPI_NOR_BOOTCOMMAND						\
 			"env exists mcinitcmd && env exists secureboot "\
-			"&& esbc_validate 0x20780000; "			\
+			"&& sf read 0x80780000 0x780000 0x40000 "	\
+			"&& esbc_validate 0x80780000; "			\
 			"env exists mcinitcmd && "			\
-			"fsl_mc lazyapply dpl 0x20d00000; "		\
+			"sf read 0x80d00000 0xd00000 0x40000 && "	\
+			"fsl_mc lazyapply dpl 0x80d00000 ; "		\
 			"run distro_bootcmd;run qspi_bootcmd; "		\
 			"env exists secureboot && esbc_halt;"
 
@@ -539,9 +541,11 @@  unsigned long get_board_sys_clk(void);
 /* Try to boot an on-QSPI kernel first, then do normal distro boot */
 #define CONFIG_BOOTCOMMAND						\
 			"env exists mcinitcmd && env exists secureboot "\
-			"&& esbc_validate 0x20780000; "			\
+			"&& sf read 0x80780000 0x780000 0x40000 "	\
+			"&& esbc_validate 0x80780000; "			\
 			"env exists mcinitcmd && "			\
-			"fsl_mc lazyapply dpl 0x20d00000; "		\
+			"sf read 0x80d00000 0xd00000 0x40000 && "	\
+			"fsl_mc lazyapply dpl 0x80d00000; "		\
 			"run distro_bootcmd;run qspi_bootcmd; "		\
 			"env exists secureboot && esbc_halt;"
 #elif defined(CONFIG_SD_BOOT)