]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pico-imx6: Add Falcon mode
authorFabio Estevam <festevam@gmail.com>
Wed, 18 Sep 2019 01:04:57 +0000 (22:04 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:35:59 +0000 (16:35 +0200)
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>
board/technexion/pico-imx6/spl.c
include/configs/pico-imx6.h

index 5bf87023acb6a25458053ca53d718e4436f3533d..06ad0a8c32209e87c178ab0ebce74db38e4d0d60 100644 (file)
 #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,
index 467d5ff4f59b10e174a2f83ad1ada3c3490c8c92..5bbb9ea8f70185b55a7c469d2f977f9111910a3a 100644 (file)
 
 #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 */