summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Freihofer <[email protected]>2026-02-17 11:36:04 +0100
committerMattijs Korpershoek <[email protected]>2026-02-19 11:27:51 +0100
commit94b7c3b2622ae1e43aae0d92005ac8ca4dd9f134 (patch)
treed910f8d13941f707e81e44cd94264cb711263d0f
parent24526162338114a8ac6c51280fa672ee1ca72241 (diff)
arch: imx8qxp: Override weak fb_mmc_get_boot_offset function
Add IMX8QXP SoCs specific implementation of fb_mmc_get_boot_offset() This is needed as bootloader offset is different dependent on SoC revision! For revision B0 the bootloader starts at 32k offset. On offset 0x0 the bootloaders environment is stored. On C0 revisions of the SoC bootloader image starts at offset 0x0 Signed-off-by: Adrian Freihofer <[email protected]> Signed-off-by: Heiko Schocher <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Acked-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
-rw-r--r--arch/arm/mach-imx/imx8/cpu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 0e112af661c..f4738e3fda8 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -899,3 +899,24 @@ bool m4_parts_booted(void)
return false;
}
+
+#ifdef CONFIG_IMX8QXP
+#include <blk.h>
+
+/*
+ * On B0 revision SoCs the bootloader is on 32k offset
+ * and at offset 0x0 is the U-Boot Environment stored
+ *
+ * So we cannot flash bootloader images to offset 0x0
+ *
+ * On C0 revisions of the SoC bootloader image starts
+ * at offset 0x0 ...
+ */
+lbaint_t fb_mmc_get_boot_offset(void)
+{
+ if ((get_cpu_rev() & 0xF) < CHIP_REV_C)
+ return 0x40;
+
+ return 0;
+}
+#endif