diff options
author | Tom Rini <trini@konsulko.com> | 2019-07-18 11:30:30 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-07-18 11:30:30 -0400 |
commit | 9a06eb800c1bdc68aa81fcad6d4f404e12dfff33 (patch) | |
tree | fb0618eb0d200c227b27aa79dbbbb13d08d1a158 /arch/arm/mach-k3/am6_init.c | |
parent | 07a5f76602f48e2258627134ec13e6a8ea7569e9 (diff) | |
parent | 7c66eb49c53ef5047a77051dd6af5b0299d3010e (diff) |
Merge branch '2019-07-17-ti-imports'
- Bring in the first three series that we need in order to enhance the
TI AM65x series support and then later introduce J721E support.
Diffstat (limited to 'arch/arm/mach-k3/am6_init.c')
-rw-r--r-- | arch/arm/mach-k3/am6_init.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c index 60a580305d..cb96581bfb 100644 --- a/arch/arm/mach-k3/am6_init.c +++ b/arch/arm/mach-k3/am6_init.c @@ -10,8 +10,12 @@ #include <asm/io.h> #include <spl.h> #include <asm/arch/hardware.h> +#include <asm/arch/sysfw-loader.h> +#include <asm/arch/sys_proto.h> #include "common.h" #include <dm.h> +#include <dm/uclass-internal.h> +#include <dm/pinctrl.h> #ifdef CONFIG_SPL_BUILD static void mmr_unlock(u32 base, u32 partition) @@ -63,7 +67,7 @@ static void store_boot_index_from_rom(void) void board_init_f(ulong dummy) { -#if defined(CONFIG_K3_AM654_DDRSS) +#if defined(CONFIG_K3_LOAD_SYSFW) || defined(CONFIG_K3_AM654_DDRSS) struct udevice *dev; int ret; #endif @@ -83,8 +87,33 @@ void board_init_f(ulong dummy) /* Init DM early in-order to invoke system controller */ spl_early_init(); +#ifdef CONFIG_K3_LOAD_SYSFW + /* + * Process pinctrl for the serial0 a.k.a. WKUP_UART0 module and continue + * regardless of the result of pinctrl. Do this without probing the + * device, but instead by searching the device that would request the + * given sequence number if probed. The UART will be used by the system + * firmware (SYSFW) image for various purposes and SYSFW depends on us + * to initialize its pin settings. + */ + ret = uclass_find_device_by_seq(UCLASS_SERIAL, 0, true, &dev); + if (!ret) + pinctrl_select_state(dev, "default"); + + /* + * Load, start up, and configure system controller firmware. Provide + * the U-Boot console init function to the SYSFW post-PM configuration + * callback hook, effectively switching on (or over) the console + * output. + */ + k3_sysfw_loader(preloader_console_init); +#else /* Prepare console output */ preloader_console_init(); +#endif + + /* Perform EEPROM-based board detection */ + do_board_detect(); #ifdef CONFIG_K3_AM654_DDRSS ret = uclass_get_device(UCLASS_RAM, 0, &dev); |