
Dear "V, Aneesh",
In message FF55437E1F14DA4BAEB721A458B6701706FCA3B7C0@dbde02.ent.ti.com you wrote:
I think you are referring to SDRAM initialization. Yes, it is assumed that SDRAM initialization(at least the DMM part of it) is done before the call to sdram_size(). The right location for this seems to be the initial part of sdram_init().
If you have to deal with boards which may come with different memory sizes, these may need different initializations. I don't know your hardware - you may or may not be able to read the needed configuration from the hardware. Eventually you need to try out different configurations, in which case the SDRAM initialization has to be part of the RAM initialization code (as it has to be retried for each possible configuration).
Best regards,
Wolfgang Denk