[U-Boot-Users] question about sdram size autodetection in sdram_init()

Wolfgang Denk wd at denx.de
Thu Jul 15 09:41:01 CEST 2004


In message <20040715110453.40f5e6450007c87b0053c837.192 at empal.com> you wrote:
> 
> In cpu/ppc4xx/sdram.c, in sdram_init(), the following seems to be wrong.
...
> I think the following conditional expression must be inserted at if statement:
> (*(volatile ulong *)ADDR_64MB == MAGIC4)

I think you are right. Please submit a patch.

> The above case is also applied to 64MB and 32MB detection.

The whole code could be rewritten and simplified using a loop or even
existing code. See get_ram_size() in "common/memsize.c"

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
The explanation requiring the fewest assumptions is the  most  likely
to be correct.                                    -- William of Occam




More information about the U-Boot mailing list