summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2019-09-17 22:04:57 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2019-09-20 11:45:46 -0300
commit2dd8f58da73d4292870f486ecd798ea464f8cb23 (patch)
treebfbf6cbcd55cb4b9da97b00061f146635cd7c59a
parent01ddcf4cd21ce8019b5ebf11a4fda66bbf3e793e (diff)
downloadu-boot-2dd8f58da73d4292870f486ecd798ea464f8cb23.tar.gz
pico-imx6: Add Falcon mode
Add Falcon mode support, which allows the SPL to load and jump to the Linux kernel directly, without the need of loading U-Boot proper. CONFIG_SPL_OS_BOOT=y needs to be passed in the defconfig in order to use Falcon mode. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--board/technexion/pico-imx6/spl.c11
-rw-r--r--include/configs/pico-imx6.h12
2 files changed, 23 insertions, 0 deletions
diff --git a/board/technexion/pico-imx6/spl.c b/board/technexion/pico-imx6/spl.c
index 5bf87023ac..06ad0a8c32 100644
--- a/board/technexion/pico-imx6/spl.c
+++ b/board/technexion/pico-imx6/spl.c
@@ -27,6 +27,17 @@
#define IMX6DQ_DRIVE_STRENGTH 0x30
#define IMX6SDL_DRIVE_STRENGTH 0x28
+#ifdef CONFIG_SPL_OS_BOOT
+int spl_start_uboot(void)
+{
+ /* Break into full U-Boot on 'c' */
+ if (serial_tstc() && serial_getc() == 'c')
+ return 1;
+
+ return 0;
+}
+#endif
+
/* configure MX6Q/DUAL mmdc DDR io registers */
static struct mx6dq_iomux_ddr_regs mx6dq_ddr_ioregs = {
.dram_sdclk_0 = IMX6DQ_DRIVE_STRENGTH,
diff --git a/include/configs/pico-imx6.h b/include/configs/pico-imx6.h
index 467d5ff4f5..5bbb9ea8f7 100644
--- a/include/configs/pico-imx6.h
+++ b/include/configs/pico-imx6.h
@@ -12,6 +12,18 @@
#include "imx6_spl.h"
+#ifdef CONFIG_SPL_OS_BOOT
+/* Falcon Mode */
+#define CONFIG_SPL_FS_LOAD_ARGS_NAME "args"
+#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage"
+#define CONFIG_SYS_SPL_ARGS_ADDR 0x18000000
+
+/* Falcon Mode - MMC support: args@1MB kernel@2MB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800 /* 1MB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512)
+#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000 /* 2MB */
+#endif
+
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M) /* Increase due to DFU */