diff mbox series

[U-Boot,v2,3/5] spl: nor: Provide falcon boot support for NOR memories

Message ID 20191015082847.30865-4-lukma@denx.de
State Accepted
Commit a4a16c9181a80d8473f71648b6d3a02fc57c9709
Delegated to: Stefano Babic
Headers show
Series imx: dm: Update mccmon6 board to only use DM/DTS in U-Boot proper | expand

Commit Message

Lukasz Majewski Oct. 15, 2019, 8:28 a.m. UTC
This commit adds falcon boot support (by also copying args necessary for
booting) to the SPL NOR memory driver.

After this change it is possible to use the falcon boot in the same way
as on NAND memories. The necessary configs (i.e. CONFIG_CMD_SPL_NOR_OFS)
are now defined in Kconfig.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 common/spl/spl_nor.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Tom Rini Oct. 17, 2019, 11:30 a.m. UTC | #1
On Tue, Oct 15, 2019 at 10:28:45AM +0200, Lukasz Majewski wrote:

> This commit adds falcon boot support (by also copying args necessary for
> booting) to the SPL NOR memory driver.
> 
> After this change it is possible to use the falcon boot in the same way
> as on NAND memories. The necessary configs (i.e. CONFIG_CMD_SPL_NOR_OFS)
> are now defined in Kconfig.
> 
> Signed-off-by: Lukasz Majewski <lukma@denx.de>

Reviewed-by: Tom Rini <trini@konsulko.com>
Stefano Babic Nov. 4, 2019, 8:54 a.m. UTC | #2
> This commit adds falcon boot support (by also copying args necessary for
> booting) to the SPL NOR memory driver.
> After this change it is possible to use the falcon boot in the same way
> as on NAND memories. The necessary configs (i.e. CONFIG_CMD_SPL_NOR_OFS)
> are now defined in Kconfig.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 7df708de9b0f..b1e79b9ded62 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -51,6 +51,11 @@  static int spl_nor_load_image(struct spl_image_info *spl_image,
 						  CONFIG_SYS_OS_BASE,
 						  (void *)header);
 
+#if defined CONFIG_SYS_SPL_ARGS_ADDR && defined CONFIG_CMD_SPL_NOR_OFS
+			memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR,
+			       (void *)CONFIG_CMD_SPL_NOR_OFS,
+			       CONFIG_CMD_SPL_WRITE_SIZE);
+#endif
 			return ret;
 		}
 #endif