From: Lukasz Majewski <lukma@denx.de>
To: Teresa Remmet <t.remmet@phytec.de>,
Stefano Babic <sbabic@denx.de>,
Fabio Estevam <festevam@gmail.com>
Cc: uboot-imx@nxp.com, Cem Tenruh <c.tenruh@phytec.de>,
Tom Rini <trini@konsulko.com>,
u-boot@lists.denx.de, Yannic Moog <y.moog@phytec.de>,
Benjamin Hahn <B.Hahn@phytec.de>, Lukasz Majewski <lukma@denx.de>
Subject: [PATCH v2] config: imx: Define CFG_SYS_UBOOT_BASE for Phytec's imx8mm SoM QSPI boot
Date: Tue, 20 Aug 2024 16:59:44 +0200 [thread overview]
Message-ID: <20240820145944.3048128-1-lukma@denx.de> (raw)
The image offset when booting from SPI-NOR (QSPI, FSPI driver) is
different than one for SD card / eMMC as extra space (0x1000) is consumed
by FSPI configuration header (CONFIG_FSPI_CONF_HEADER).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
Changes for v2:
- Avoid line breaks with defines
---
include/configs/phycore_imx8mm.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index 0910ae2d87..a445d842ac 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -11,8 +11,15 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
+#define UBOOT_ITB_OFFSET 0x57C00
+#define FSPI_CONF_BLOCK_SIZE 0x1000
+#define UBOOT_ITB_OFFSET_FSPI (UBOOT_ITB_OFFSET + FSPI_CONF_BLOCK_SIZE)
+#ifdef CONFIG_FSPI_CONF_HEADER
+#define CFG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + UBOOT_ITB_OFFSET_FSPI)
+#else
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
+#endif
#ifdef CONFIG_SPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
--
2.39.2
next reply other threads:[~2024-08-20 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 14:59 Lukasz Majewski [this message]
2024-08-27 18:49 ` [PATCH v2] config: imx: Define CFG_SYS_UBOOT_BASE for Phytec's imx8mm SoM QSPI boot Fabio Estevam
2024-08-28 7:55 ` Lukasz Majewski
2024-08-30 13:23 ` Benjamin Hahn
2024-08-30 15:19 ` Lukasz Majewski
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=20240820145944.3048128-1-lukma@denx.de \
--to=lukma@denx.de \
--cc=B.Hahn@phytec.de \
--cc=c.tenruh@phytec.de \
--cc=festevam@gmail.com \
--cc=sbabic@denx.de \
--cc=t.remmet@phytec.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=y.moog@phytec.de \
/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 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.