diff options
author | Marek Vasut <marex@denx.de> | 2014-03-19 02:21:36 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-04-01 10:25:11 +0200 |
commit | 9926eb31b707cd7e769ab855186aa96ff7d5b7ff (patch) | |
tree | afb8864442d77773325061249dd46a8add5ebcda /arch/arm/cpu | |
parent | 65ed5e85723e6e39312d287d9fc6c8f3cbd4f1af (diff) | |
download | u-boot-imx-9926eb31b707cd7e769ab855186aa96ff7d5b7ff.zip u-boot-imx-9926eb31b707cd7e769ab855186aa96ff7d5b7ff.tar.gz u-boot-imx-9926eb31b707cd7e769ab855186aa96ff7d5b7ff.tar.bz2 |
arm: mxs: Add serial console support into SPL
Add support for serial console into the i.MX23/i.MX28 SPL. A full,
uncrippled serial console support comes very helpful when debugging
various spectacular hardware bringup issues early in the process.
Because we do not use SPL framework, but have our own minimalistic
SPL, which is compatible with the i.MX23/i.MX28 BootROM, we do not
use preloader_console_init(), but instead use a similar function to
start the console. Nonetheless, to avoid blowing up the size of the
SPL binary, this support is enabled only if CONFIG_SPL_SERIAL_SUPPORT
is defined, which is disabled by default.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index b647e8a..e643ead 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -18,7 +18,8 @@ #include "mxs_init.h" DECLARE_GLOBAL_DATA_PTR; -gd_t gdata __section(".data"); +static gd_t gdata __section(".data"); +static bd_t bdata __section(".data"); /* * This delay function is intended to be used only in early stage of boot, where @@ -118,6 +119,16 @@ static void mxs_spl_fixup_vectors(void) memcpy(0x0, &_start, 0x60); } +static void mxs_spl_console_init(void) +{ +#ifdef CONFIG_SPL_SERIAL_SUPPORT + gd->bd = &bdata; + gd->baudrate = CONFIG_BAUDRATE; + serial_init(); + gd->have_console = 1; +#endif +} + void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr, const iomux_cfg_t *iomux_setup, const unsigned int iomux_size) @@ -131,6 +142,8 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr, mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size); + mxs_spl_console_init(); + mxs_power_init(); mxs_mem_init(); |