[U-Boot] [PATCH] cmd_mem: Decode the mtest start and end values from fdt

Wolfgang Denk wd at denx.de
Mon Mar 4 10:44:49 CET 2013


Dear Jagannadha Sutradharudu Teki,

In message <51f05678-4118-4be8-bb94-ad295c407602 at DB3EHSMHS015.ehs.local> you wrote:
>
> I think the entire logic to add mtest address support through devicetree with the
> help of environment variables is a mess as there are some side effects (as you mentioned already).

Agreed.

> The main intention to add these address on devicetree is to make memory address configured at
> runtime instead of CONFIG_ macros.

Then just use command line arguments!

The defaults set in the CONFIG_ veriables are intended as safe
margins; they should be set such that they exclude just the exception
vector area (supposed to be located at the lower end of memory) and
the U-Boot code and data (supposed to be located at the upper end of
memory) from testing, but exclude nearly all otherwise available RAM.

> As in most of the boards CONFIG_SYS_MEMTEST_START  is depends on CONFIG_SYS_SDRAM_BASE.
> I am trying to remove the dependency instead use the devicetree nodes.

This makes no sense to me.

If CONFIG_SYS_SDRAM_BASE and the device tree settings don;t agree, you
have a serious problem anyway, and need to fix this first.

> Ok, maybe I will add my logic for decoding these address from devicetree on to common/cmd_mem.c
> instead of common/main.c, does it make sense? Help me I f am wrong.

I have to admit that I don't see a use case where this might be
needed, or even beneficial.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Time is a drug. Too much of it kills you.
                                      - Terry Pratchett, _Small Gods_


More information about the U-Boot mailing list