From: Mario Kicherer <dev@kicherer.org>
To: u-boot@lists.denx.de
Cc: sbabic@denx.de, festevam@gmail.com, uboot-imx@nxp.com,
daniel.schwierzeck@gmail.com, weijie.gao@mediatek.com,
GSS_MTK_Uboot_upstream@mediatek.com, rick@andestech.com,
ycliang@andestech.com, Mario Kicherer <dev@kicherer.org>
Subject: [PATCH v2 1/2] spl: spl_nor: add BOOT_DEVICE_NOR2 as alternative SPL_LOAD_IMAGE_METHOD
Date: Thu, 19 Jan 2023 16:28:21 +0100 [thread overview]
Message-ID: <20230119152822.1214202-2-dev@kicherer.org> (raw)
In-Reply-To: <20230119152822.1214202-1-dev@kicherer.org>
Add BOOT_DEVICE_NOR2 as a second SPL_LOAD_IMAGE_METHOD to enable a
board-specific spl_nor_get_uboot_base() function to return an alternative
address in the NOR flash in case booting from BOOT_DEVICE_NOR fails.
Signed-off-by: Mario Kicherer <dev@kicherer.org>
---
arch/arm/include/asm/spl.h | 1 +
arch/mips/include/asm/spl.h | 1 +
arch/riscv/include/asm/spl.h | 1 +
common/spl/spl_nor.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/spl.h b/arch/arm/include/asm/spl.h
index 0ece4b0906..3ca4b95713 100644
--- a/arch/arm/include/asm/spl.h
+++ b/arch/arm/include/asm/spl.h
@@ -20,6 +20,7 @@ enum {
BOOT_DEVICE_NAND,
BOOT_DEVICE_ONENAND,
BOOT_DEVICE_NOR,
+ BOOT_DEVICE_NOR2,
BOOT_DEVICE_UART,
BOOT_DEVICE_SPI,
BOOT_DEVICE_USB,
diff --git a/arch/mips/include/asm/spl.h b/arch/mips/include/asm/spl.h
index 0a847edec8..a3b20ac98f 100644
--- a/arch/mips/include/asm/spl.h
+++ b/arch/mips/include/asm/spl.h
@@ -14,6 +14,7 @@ enum {
BOOT_DEVICE_NAND,
BOOT_DEVICE_ONENAND,
BOOT_DEVICE_NOR,
+ BOOT_DEVICE_NOR2,
BOOT_DEVICE_UART,
BOOT_DEVICE_SPI,
BOOT_DEVICE_USB,
diff --git a/arch/riscv/include/asm/spl.h b/arch/riscv/include/asm/spl.h
index 2898a770ee..8d7a25be33 100644
--- a/arch/riscv/include/asm/spl.h
+++ b/arch/riscv/include/asm/spl.h
@@ -16,6 +16,7 @@ enum {
BOOT_DEVICE_NAND,
BOOT_DEVICE_ONENAND,
BOOT_DEVICE_NOR,
+ BOOT_DEVICE_NOR2,
BOOT_DEVICE_UART,
BOOT_DEVICE_SPI,
BOOT_DEVICE_USB,
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 3ca44b06d6..5e8b3bf621 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -123,3 +123,4 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,
return 0;
}
SPL_LOAD_IMAGE_METHOD("NOR", 0, BOOT_DEVICE_NOR, spl_nor_load_image);
+SPL_LOAD_IMAGE_METHOD("NOR2", 0, BOOT_DEVICE_NOR2, spl_nor_load_image);
--
2.34.1
next prev parent reply other threads:[~2023-01-19 17:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 15:28 [PATCH v2 0/2] spl: spl_nor: add alternative SPL_LOAD_IMAGE_METHOD Mario Kicherer
2023-01-19 15:28 ` Mario Kicherer [this message]
2023-01-26 19:17 ` [PATCH v2 1/2] spl: spl_nor: add BOOT_DEVICE_NOR2 as " Tom Rini
2023-01-27 16:56 ` Mario Kicherer
2023-01-27 17:10 ` Tom Rini
2023-01-27 17:55 ` Mario Kicherer
2023-01-27 17:58 ` Tom Rini
2023-01-30 10:17 ` Mario Kicherer
2023-01-19 15:28 ` [PATCH v2 2/2] spl: spl_nor: add spl_boot_device parameter to spl_nor_get_uboot_base() Mario Kicherer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230119152822.1214202-2-dev@kicherer.org \
--to=dev@kicherer.org \
--cc=GSS_MTK_Uboot_upstream@mediatek.com \
--cc=daniel.schwierzeck@gmail.com \
--cc=festevam@gmail.com \
--cc=rick@andestech.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=weijie.gao@mediatek.com \
--cc=ycliang@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox