[U-Boot-Users] [patch] MPC8266 March-C memory test

Wolfgang Denk wd at denx.de
Fri May 23 13:29:29 CEST 2003


Dear Rune,

in message <9F5558593173D21190EA0008C7B1769873138B at innsys1> you wrote:
> 
> Patch to do full March-C- memory test on the MPC8266ADS board.

I hesitate to include this.

First, as implemented now the  code,  while  being  generic  for  all
boards  using  860  class  processors,  is  limited to the MPC8266ADS
board. If we implement it, we should make it optional for  all  these
boards.

Second, the code duplicates existing functionality  (see  the  memory
test  code  in  post/memory.c). Instead of adding new versions of the
same stuff again and again (and having to clean it all up  later)  we
rather should get the post/ code working on your board, too.

Finally, there are some minor issues with your patch:
- there is no README documentation for the new CFG_ variables
- there are errors in the code; for example:

> +int testdram (void)
> +{
> +	DECLARE_GLOBAL_DATA_PTR;
> +	MEMDATATYPE *pstart = (MEMDATATYPE *) CFG_SDRAM_BASE;
> +	MEMDATATYPE *pend;
> +	MEMDATATYPE *p;
> +	uint size;
> +	uint erraddr;
> +	pend = (MEMDATATYPE*)gd->ram_size;

This should read:

	pend = pstart + (gd->ram_size / sizeof(MEMDATATYPE));


What do you suggest how to proceed?


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
If a train station is a place where a train stops,
                                           then what's a workstation?




More information about the U-Boot mailing list