diff options
author | Tom Rini <trini@konsulko.com> | 2019-01-01 09:56:41 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-01 10:01:00 -0500 |
commit | 522e035441ca04d99de2fc13b614ad896691e9c9 (patch) | |
tree | 875c0923d24447550db43f6f1b767dea82dccb06 /board/embest/mx6boards/mx6boards.c | |
parent | 08337cd64832ed7f8147da75013510b92bbcd188 (diff) | |
parent | 57d2beb91d705bccdfee5e9e5fd267f5e363a100 (diff) | |
download | u-boot-522e035441ca04d99de2fc13b614ad896691e9c9.zip u-boot-522e035441ca04d99de2fc13b614ad896691e9c9.tar.gz u-boot-522e035441ca04d99de2fc13b614ad896691e9c9.tar.bz2 |
Merge tag 'u-boot-imx-20190101' of git://www.denx.de/git/u-boot-imx
imx for 2019.01
- introduce support for i.MX8M
- fix size limit for Vhybrid / pico boards
- several board fixes
- w1 driver for MX2x / MX5x
Diffstat (limited to 'board/embest/mx6boards/mx6boards.c')
-rw-r--r-- | board/embest/mx6boards/mx6boards.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/board/embest/mx6boards/mx6boards.c b/board/embest/mx6boards/mx6boards.c index 8930c36..fed92aa 100644 --- a/board/embest/mx6boards/mx6boards.c +++ b/board/embest/mx6boards/mx6boards.c @@ -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 |