The reason of the crash was because I put get_ram_size() before the sdram
controller was initialized. I don't know how it works in sbc8240 but this
is what I get in tqm8260:
/* We must be able to test a location outsize the maximum legal size
* to find out THAT we are outside; but this address still has to be
* mapped by the controller. That means, that the initial mapping has
* to be (at least) twice as large as the maximum expected size.
Now it works.
Wolfgang Denk <wd@... on 04/28/2005 01:55:16 PM
Sent by: wd@...
To: "KokHow Teh" <KokHow.Teh@...>
Subject: Re: [U-Boot-Users] PPC: How to access RAM location 0x0
In message <OF5DF9F216.6A5D85BA-ON48256FF1.0012D4AD@...>
> board/sbc8240.c initdram() calls get_ram_size() with CFG_SDRAM_BASE
> = 0. Put it into board/mpc8260ads/mpc8260ads.c. and it crashes....
Then either don't do that, or fix it. There are many, many PPC boards
using get_ram_size() with CFG_SDRAM_BASE==0 which just work fine.
There is no reason why this should be any problem.
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@...
That was the thing about deserts. They had their own gravity. They
sucked you into the centre. - Terry Pratchett, _Small Gods_