* [PATCH 1/2] configs: ls2080ardb: Make QSPI_MC_INIT access flash memory as per spi-mem
@ 2020-02-03 6:06 Kuldeep Singh
2020-02-03 6:06 ` [PATCH 2/2] configs: ls2080ardb: Make BOOTCOMMAND " Kuldeep Singh
0 siblings, 1 reply; 2+ messages in thread
From: Kuldeep Singh @ 2020-02-03 6:06 UTC (permalink / raw)
To: u-boot
MC_INIT 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>
---
include/configs/ls2080ardb.h | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index de14fb4..6a74f62 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -322,10 +322,14 @@ unsigned long get_board_sys_clk(void);
#ifdef CONFIG_TFABOOT
#define QSPI_MC_INIT_CMD \
+ "sf probe 0:0; sf read 0x80A00000 0xA00000 0x100000; " \
+ "sf read 0x80E00000 0xE00000 0x100000; " \
"env exists secureboot && " \
- "esbc_validate 0x20700000 && " \
- "esbc_validate 0x20740000;" \
- "fsl_mc start mc 0x20a00000 0x20e00000 \0"
+ "sf read 0x80700000 0x700000 0x40000 && " \
+ "sf read 0x80740000 0x740000 0x40000 && " \
+ "esbc_validate 0x80700000 && " \
+ "esbc_validate 0x80740000; " \
+ "fsl_mc start mc 0x80A00000 0x80E00000 \0"
#define SD_MC_INIT_CMD \
"mmcinfo;mmc read 0x80a00000 0x5000 0x1200;" \
"mmc read 0x80e00000 0x7000 0x800;" \
@@ -343,10 +347,14 @@ unsigned long get_board_sys_clk(void);
#else
#ifdef CONFIG_QSPI_BOOT
#define MC_INIT_CMD \
- "mcinitcmd=env exists secureboot && " \
- "esbc_validate 0x20700000 && " \
- "esbc_validate 0x20740000;" \
- "fsl_mc start mc 0x20a00000 0x20e00000 \0"
+ "mcinitcmd=sf probe 0:0;sf read 0x80A00000 0xA00000 0x100000; " \
+ " sf read 0x80E00000 0xE00000 0x100000; " \
+ "env exists secureboot && " \
+ "sf read 0x80700000 0x700000 0x40000 && " \
+ "sf read 0x80740000 0x740000 0x40000 && " \
+ "esbc_validate 0x80700000 && " \
+ "esbc_validate 0x80740000; " \
+ "fsl_mc start mc 0x80A00000 0x80E00000 \0"
#elif defined(CONFIG_SD_BOOT)
#define MC_INIT_CMD \
"mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;" \
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] configs: ls2080ardb: Make BOOTCOMMAND access flash memory as per spi-mem
2020-02-03 6:06 [PATCH 1/2] configs: ls2080ardb: Make QSPI_MC_INIT access flash memory as per spi-mem Kuldeep Singh
@ 2020-02-03 6:06 ` Kuldeep Singh
0 siblings, 0 replies; 2+ messages in thread
From: Kuldeep Singh @ 2020-02-03 6:06 UTC (permalink / raw)
To: u-boot
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>
---
include/configs/ls2080ardb.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
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)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-03 6:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 6:06 [PATCH 1/2] configs: ls2080ardb: Make QSPI_MC_INIT access flash memory as per spi-mem Kuldeep Singh
2020-02-03 6:06 ` [PATCH 2/2] configs: ls2080ardb: Make BOOTCOMMAND " Kuldeep Singh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.