[U-Boot-Users] Re: Some puzzles on dram_size()

chris at nanometrics.ca chris at nanometrics.ca
Wed Jan 7 22:39:16 CET 2004


Hi Sam,

Sam you wrote:
> 3.When I changed two lined code as Chris gave and set
> SDRAM_MAX_SIZE = 0x8000000(128MB),it worked badly.
Did you remember to change the AM bits in the OR?
If you want to test 128MB the memory controller must
be given 128MB for the SDRAM chip select.

You must have changed it before for 64MB to work,
since the default value for CFG_PRELIM_OR_AM for
the RPX Lite is 0xfe000000 (32MB).

Most board specific files include/configs/<board>.h
have a line like:
#define CFG_OR1_PRELIM   (CFG_PRELIM_OR_AM | CFG_OR_TIMING_SDRAM )

Maybe it should be changed to
#define CFG_OR_AM_SDRAM  (- (SDRAM_MAX_SIZE & 0xffff8000))
#define CFG_OR1_PRELIM   (CFG_OR_AM_SDRAM | CFG_OR_TIMING_SDRAM )

Then the only problem will be if the banks overlap,
which is much too complicated to automate or verify.


Thanks Wolfgang for such a quick patch.

Note that the remaining dram_size functions can usually be eliminated
and have the initdram function call get_ram_size directly after setting
the MxMR again.

Chris







More information about the U-Boot mailing list