Commit 77ecf95f22dc5cb0a9709805dd22555007d60b34

Authored by Fabio Estevam
Committed by Stefano Babic
1 parent 953c2500bc

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>

Showing 2 changed files with 23 additions and 0 deletions Side-by-side Diff

board/technexion/pico-imx6/spl.c
... ... @@ -27,6 +27,17 @@
27 27 #define IMX6DQ_DRIVE_STRENGTH 0x30
28 28 #define IMX6SDL_DRIVE_STRENGTH 0x28
29 29  
  30 +#ifdef CONFIG_SPL_OS_BOOT
  31 +int spl_start_uboot(void)
  32 +{
  33 + /* Break into full U-Boot on 'c' */
  34 + if (serial_tstc() && serial_getc() == 'c')
  35 + return 1;
  36 +
  37 + return 0;
  38 +}
  39 +#endif
  40 +
30 41 /* configure MX6Q/DUAL mmdc DDR io registers */
31 42 static struct mx6dq_iomux_ddr_regs mx6dq_ddr_ioregs = {
32 43 .dram_sdclk_0 = IMX6DQ_DRIVE_STRENGTH,
include/configs/pico-imx6.h
... ... @@ -12,6 +12,18 @@
12 12  
13 13 #include "imx6_spl.h"
14 14  
  15 +#ifdef CONFIG_SPL_OS_BOOT
  16 +/* Falcon Mode */
  17 +#define CONFIG_SPL_FS_LOAD_ARGS_NAME "args"
  18 +#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage"
  19 +#define CONFIG_SYS_SPL_ARGS_ADDR 0x18000000
  20 +
  21 +/* Falcon Mode - MMC support: args@1MB kernel@2MB */
  22 +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800 /* 1MB */
  23 +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512)
  24 +#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000 /* 2MB */
  25 +#endif
  26 +
15 27 /* Size of malloc() pool */
16 28 #define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M) /* Increase due to DFU */
17 29