embestmx6boards: Add SPL support
In order to boot faster with falcon mode, we need to add SPL support to riotboard. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
This commit is contained in:
parent
0b366cf2b0
commit
725019bebe
@ -182,6 +182,7 @@ config TARGET_DISPLAY5
|
||||
config TARGET_EMBESTMX6BOARDS
|
||||
bool "embestmx6boards"
|
||||
select BOARD_LATE_INIT
|
||||
select SUPPORT_SPL
|
||||
|
||||
config TARGET_GE_BX50V3
|
||||
bool "General Electric Bx50v3"
|
||||
|
@ -5,3 +5,4 @@ F: board/embest/mx6boards/
|
||||
F: include/configs/embestmx6boards.h
|
||||
F: configs/marsboard_defconfig
|
||||
F: configs/riotboard_defconfig
|
||||
F: configs/riotboard_spl_defconfig
|
||||
|
@ -608,3 +608,51 @@ int checkboard(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
#include <spl.h>
|
||||
|
||||
void board_init_f(ulong dummy)
|
||||
{
|
||||
u32 cputype = cpu_type(get_cpu_rev());
|
||||
|
||||
switch (cputype) {
|
||||
case MXC_CPU_MX6SOLO:
|
||||
board_type = BOARD_IS_RIOTBOARD;
|
||||
break;
|
||||
case MXC_CPU_MX6D:
|
||||
board_type = BOARD_IS_MARSBOARD;
|
||||
break;
|
||||
}
|
||||
arch_cpu_init();
|
||||
|
||||
/* setup GP timer */
|
||||
timer_init();
|
||||
|
||||
#ifdef CONFIG_SPL_SERIAL_SUPPORT
|
||||
setup_iomux_uart();
|
||||
preloader_console_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void board_boot_order(u32 *spl_boot_list)
|
||||
{
|
||||
spl_boot_list[0] = BOOT_DEVICE_MMC1;
|
||||
}
|
||||
|
||||
/*
|
||||
* In order to jump to standard u-boot shell, you have to connect pin 5 of J13
|
||||
* to pin 3 (ground).
|
||||
*/
|
||||
int spl_start_uboot(void)
|
||||
{
|
||||
int gpio_key = IMX_GPIO_NR(4, 16);
|
||||
|
||||
gpio_direction_input(gpio_key);
|
||||
if (gpio_get_value(gpio_key) == 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
48
configs/riotboard_spl_defconfig
Normal file
48
configs/riotboard_spl_defconfig
Normal file
@ -0,0 +1,48 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_MX6=y
|
||||
CONFIG_SYS_TEXT_BASE=0x17800000
|
||||
CONFIG_SPL_GPIO_SUPPORT=y
|
||||
CONFIG_SPL_LIBCOMMON_SUPPORT=y
|
||||
CONFIG_SPL_LIBGENERIC_SUPPORT=y
|
||||
CONFIG_TARGET_EMBESTMX6BOARDS=y
|
||||
CONFIG_SPL_MMC_SUPPORT=y
|
||||
CONFIG_SPL_SERIAL_SUPPORT=y
|
||||
CONFIG_SPL=y
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,SPL,MX6S,DDR_MB=1024"
|
||||
CONFIG_BOOTCOMMAND="run finduuid; run distro_bootcmd"
|
||||
# CONFIG_CONSOLE_MUX is not set
|
||||
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
|
||||
CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
|
||||
CONFIG_BOARD_EARLY_INIT_F=y
|
||||
CONFIG_SPL_RAW_IMAGE_SUPPORT=y
|
||||
CONFIG_SPL_EXT_SUPPORT=y
|
||||
CONFIG_SPL_OS_BOOT=y
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_SF=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_CACHE=y
|
||||
CONFIG_CMD_EXT4_WRITE=y
|
||||
CONFIG_ENV_IS_IN_MMC=y
|
||||
CONFIG_DM=y
|
||||
CONFIG_FSL_ESDHC=y
|
||||
CONFIG_SPI_FLASH=y
|
||||
CONFIG_SPI_FLASH_SST=y
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_MII=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_MXC_SPI=y
|
||||
CONFIG_DM_THERMAL=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_HOST_ETHER=y
|
||||
CONFIG_USB_ETHER_ASIX=y
|
||||
CONFIG_VIDEO=y
|
||||
# CONFIG_VIDEO_SW_CURSOR is not set
|
||||
CONFIG_OF_LIBFDT=y
|
||||
CONFIG_SPL_OF_LIBFDT=y
|
@ -109,6 +109,19 @@
|
||||
|
||||
#include "mx6_common.h"
|
||||
|
||||
#ifdef CONFIG_SPL
|
||||
#include "imx6_spl.h"
|
||||
/* RiOTboard */
|
||||
#define CONFIG_SYS_SPL_ARGS_ADDR 0x13000000
|
||||
#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage"
|
||||
#define CONFIG_SPL_FS_LOAD_ARGS_NAME "imx6dl-riotboard.dtb"
|
||||
|
||||
#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0 /* offset 69KB */
|
||||
#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0 /* offset 69KB */
|
||||
#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0 /* offset 69KB */
|
||||
|
||||
#endif
|
||||
|
||||
/* 256M RAM (minimum), 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
|
||||
* 1M script, 1M pxe and the ramdisk at the end */
|
||||
#define MEM_LAYOUT_ENV_SETTINGS \
|
||||
|
Loading…
Reference in New Issue
Block a user