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

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

Hi,Chris,
Chris you wrote:
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.
Sorry for neglecting the key point.When I added it,u-boot worked fine.Thanks for your hints.
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 )
Yeah,I tested it.It did work well when I set SDRAM_MAX_SIZE bigger than or same as actual RAM size.
Thanks for your notes again!
Best regards,
Sam
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
chris@nanometrics.ca
-
SAM SONG