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 <adrian.freihofer@siemens.com>
Signed-off-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Acked-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20260217103604.71029-3-hs@nabladev.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
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