[U-Boot] [PATCH v2 04/10] arm, davinci: add support for new spl framework

Christian Riesch christian.riesch at omicron.at
Thu Oct 6 08:57:02 CEST 2011


Hello Heiko,

On Wed, Oct 5, 2011 at 4:28 PM, Heiko Schocher <hs at denx.de> wrote:
> Signed-off-by: Heiko Schocher <hs at denx.de>
> Cc: Albert ARIBAUD <albert.u.boot at aribaud.net>
> Cc: Sandeep Paulraj <s-paulraj at ti.com>
> ---
>  Makefile                                  |    8 +++-
>  arch/arm/cpu/arm926ejs/davinci/Makefile   |    8 ++++
>  arch/arm/cpu/arm926ejs/davinci/spl.c      |   63 +++++++++++++++++++++++++++++
>  arch/arm/cpu/arm926ejs/davinci/spl_nand.c |   57 ++++++++++++++++++++++++++
>  arch/arm/cpu/arm926ejs/start.S            |   25 +++++++++++-
>  5 files changed, 158 insertions(+), 3 deletions(-)
>  create mode 100644 arch/arm/cpu/arm926ejs/davinci/spl.c
>  create mode 100644 arch/arm/cpu/arm926ejs/davinci/spl_nand.c

[...]

> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
> new file mode 100644
> index 0000000..d9b9398
> --- /dev/null
> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c

[...]

> +void puts(const char *str)
> +{
> +       while (*str)
> +               putc(*str++);
> +}
> +
> +void putc(char c)
> +{
> +       if (c == '\n')
> +               NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), '\r');
> +
> +       NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), c);
> +}
> +

Are these functions really required? I am currently also working on an
SPL for davinci (the AM1808 SoC) and had a look at the code in
arch/arm/cpu/armv7/omap-common/spl.c:

        gd = &gdata;
        gd->bd = &bdata;
        gd->flags |= GD_FLG_RELOC;
        gd->baudrate = CONFIG_BAUDRATE;

        serial_init();          /* serial communications setup */

After that they use putc, printf... from common/console.c

However, I had to add a gd->have_console = true; to the code above
since this is required due to commit
e3e454cd72f319908355427b1a3ae54b3dd53356.

Regards, Christian


More information about the U-Boot mailing list