[U-Boot] [PATCH] post: new parallel nor flash test

Wolfgang Denk wd at denx.de
Tue May 10 22:17:00 CEST 2011


Dear Mike Frysinger,

In message <1305058102-26936-1-git-send-email-vapier at gentoo.org> you wrote:
> This adds a simple parallel nor flash test to automatically verify
> erasing/writing/reading of sectors.  The code is based on existing
> Blackfin tests but generalized for everyone to use.

What exactly does the "parallel" in "parallel nor flash test" mean?

> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
>  include/post.h        |    1 +
>  post/drivers/Makefile |    2 +-
>  post/drivers/flash.c  |   96 +++++++++++++++++++++++++++++++++++++++++++++++++
>  post/tests.c          |   15 +++++++-
>  4 files changed, 112 insertions(+), 2 deletions(-)
>  create mode 100644 post/drivers/flash.c
...
> -COBJS-$(CONFIG_HAS_POST)	+= i2c.o memory.o rtc.o
> +COBJS-$(CONFIG_HAS_POST)	+= flash.o i2c.o memory.o rtc.o

This has always been a thorn in my side.  can we not change this such
that for example flash.o gets only built when CONFIG_SYS_POST_FLASH is
set in CONFIG_POST ?

...
> +static void *seed_src_data(ulong *old_len, ulong new_len)
> +{
> +	unsigned char *ret = (void *)CONFIG_SYS_SDRAM_BASE;

This will not work on many systems.  For example, on PPC you will
overwrite the exception vectors in low memory, thus crashing the
system.

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
To be sure of hitting the target, shoot first and, whatever you  hit,
call it the target.


More information about the U-Boot mailing list