configs: ls2080ardb: Make BOOT command access flash memory as per spi-mem
authorKuldeep Singh <kuldeep.singh@nxp.com>
Fri, 7 Feb 2020 16:45:18 +0000 (22:15 +0530)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 19 May 2020 03:52:06 +0000 (09:22 +0530)
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@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
include/configs/ls2080ardb.h

index 2bf890c26361bb5a4d10432430edc81f1d8f0ac5..006a4c97fb1b4de4321accb901c719e2b5a38033 100644 (file)
@@ -504,10 +504,13 @@ unsigned long get_board_sys_clk(void);
 
 #ifdef CONFIG_TFABOOT
 #define QSPI_NOR_BOOTCOMMAND                                           \
+                       "sf probe 0:0; "                                \
+                       "sf read 0x806c0000 0x6c0000 0x40000; "         \
                        "env exists mcinitcmd && env exists secureboot "\
-                       "&& esbc_validate 0x206C0000; "                 \
+                       "&& esbc_validate 0x806c0000; "                 \
+                       "sf read 0x80d00000 0xd00000 0x100000; "        \
                        "env exists mcinitcmd && "                      \
-                       "fsl_mc lazyapply dpl 0x20d00000; "             \
+                       "fsl_mc lazyapply dpl 0x80d00000; "             \
                        "run distro_bootcmd;run qspi_bootcmd; "         \
                        "env exists secureboot && esbc_halt;"
 
@@ -534,10 +537,13 @@ unsigned long get_board_sys_clk(void);
 #ifdef CONFIG_QSPI_BOOT
 /* Try to boot an on-QSPI kernel first, then do normal distro boot */
 #define CONFIG_BOOTCOMMAND                                             \
+                       "sf probe 0:0; "                                \
+                       "sf read 0x806c0000 0x6c0000 0x40000; "         \
                        "env exists mcinitcmd && env exists secureboot "\
-                       "&& esbc_validate 0x206C0000; "                 \
+                       "&& esbc_validate 0x806C0000; "                 \
+                       "sf read 0x80d00000 0xd00000 0x100000; "        \
                        "env exists mcinitcmd && "                      \
-                       "fsl_mc lazyapply dpl 0x20d00000; "             \
+                       "fsl_mc lazyapply dpl 0x80d00000; "             \
                        "run distro_bootcmd;run qspi_bootcmd; "         \
                        "env exists secureboot && esbc_halt;"
 #elif defined(CONFIG_SD_BOOT)