[U-Boot] [PATCH V4][NEXT] Davinci: add support for the ea20 board

Ben Gardiner bengardiner at nanometrics.ca
Tue Nov 16 16:44:45 CET 2010


On Tue, Nov 16, 2010 at 5:06 AM, Stefano Babic <sbabic at denx.de> wrote:
> This board uses the OMAP-L138 SOM stacked on a
> custom baseboard. It supports SPI Flash, Ethernet
> with RMII.
>
> Signed-off-by: Stefano Babic <sbabic at denx.de>
> ---
> Changes since V2:
>  - Make clear that the code is taken from da850evm.c
>   and not da830evm.c (Ben Gardiner)
>  - factorize function to enable RMII (Ben Gardiner)

previous versions were based on Sugosh's and my patches. Is that still true?

>
>  MAINTAINERS                                      |    1 +
>  arch/arm/include/asm/arch-davinci/davinci_misc.h |    2 +-
>  board/davinci/common/misc.c                      |   15 ++
>  board/davinci/ea20/Makefile                      |   53 +++++
>  board/davinci/ea20/ea20.c                        |  230 ++++++++++++++++++++++
>  boards.cfg                                       |    1 +
>  include/configs/da850evm.h                       |    2 +-
>  include/configs/ea20.h                           |  192 ++++++++++++++++++
>  8 files changed, 494 insertions(+), 2 deletions(-)
>  create mode 100644 board/davinci/ea20/Makefile
>  create mode 100644 board/davinci/ea20/ea20.c
>  create mode 100644 include/configs/ea20.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9258cb1..386a7b9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -551,6 +551,7 @@ Rowel Atienza <rowel at diwalabs.com>
>
>  Stefano Babic <sbabic at denx.de>
>
> +       ea20            davinci
>        polaris         xscale
>        trizepsiv       xscale
>        mx51evk         i.MX51
> diff --git a/arch/arm/include/asm/arch-davinci/davinci_misc.h b/arch/arm/include/asm/arch-davinci/davinci_misc.h
> index a6ac3b9..80b366c 100644
> --- a/arch/arm/include/asm/arch-davinci/davinci_misc.h
> +++ b/arch/arm/include/asm/arch-davinci/davinci_misc.h
> @@ -50,5 +50,5 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr);
>  int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins);
>  int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
>                                    int n_items);
> -
> +void davinci_emac_mii_mode_sel(int mode_sel);
I'm sorry I didn't mention this before -- I was just reviewing my
pending RMII patch and noticed the following:

If this patch is based on the da850evm RMII support as previous
version indicated then could this function prototype and the
implementation below be wrapped in #if defined(CONFIG_DRIVER_TI_EMAC)
and the corresponding declaration and implementations added to
board/davinci/da8xxevm/common.{h,c} in the RMII patch be removed to
minimize duplicate code?

>  #endif /* __MISC_H */
> diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c
> index a30047b..d6698c0 100644
> --- a/board/davinci/common/misc.c
> +++ b/board/davinci/common/misc.c
> @@ -170,3 +170,18 @@ int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
>
>        return 0;
>  }
> +
> +/*
> + * Set the mii mode as MII or RMII
> + */
> +void davinci_emac_mii_mode_sel(int mode_sel)
> +{
> +       int val;
> +
> +       val = readl(&davinci_syscfg_regs->cfgchip3);
> +       if (mode_sel == 0)
> +               val &= ~(1 << 8);
> +       else
> +               val |= (1 << 8);
> +       writel(val, &davinci_syscfg_regs->cfgchip3);
> +}

(this one)

> [...]
> diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
> new file mode 100644
> index 0000000..c1e1be2
> --- /dev/null
> +++ b/board/davinci/ea20/ea20.c
> [...]
> +#ifdef CONFIG_NAND_DAVINCI
> +       /*
> +        * NAND CS setup - cycle counts based on da850evm NAND timings in the
> +        * Linux kernel @ 25MHz EMIFA
> +        */
> +       writel((DAVINCI_ABCR_WSETUP(0) |
> +               DAVINCI_ABCR_WSTROBE(0) |
> +               DAVINCI_ABCR_WHOLD(0) |
> +               DAVINCI_ABCR_RSETUP(0) |
> +               DAVINCI_ABCR_RSTROBE(1) |
> +               DAVINCI_ABCR_RHOLD(0) |
> +               DAVINCI_ABCR_TA(0) |
> +               DAVINCI_ABCR_ASIZE_8BIT),
> +              &davinci_emif_regs->ab2cr); /* CS3 */
> +#endif

You said you were going to remove this NAND stuff. It sounds like the
ea20 will support NAND, so I've no qualms about keeping it around;
just wondering if you forgot to remove it or forgot to mention that
you weren't going to remove it?

> diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
> index e4ae6f3..00d946e 100644
> --- a/include/configs/da850evm.h
> +++ b/include/configs/da850evm.h

I think some da850evm.h changes creeped in by accident.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca


More information about the U-Boot mailing list