[U-Boot-Users] How to generalize SDRAM support for MPC5200 an d MGT5100?
Jonas Mark-r50740
Mark.Jonas at freescale.com
Mon Jul 5 17:18:43 CEST 2004
Reinhard,
> It DID appear on the list.
Good. My mistake was assuming I would still get a copy of the post although I put myself on CC.
> However what is the benefit of putting not even a dozen
> statements for the standard case into an extra file? Not to
> mention the extra work to be done if there are two banks of
> SDRAM/DDRAM present?
I am not able to follow you here.
Do you want to say here that the existing code is to simple to be generalized? In that case I disagree. And that people copy it 1:1 proofs that in regards that they do not write their own version.
Or do you want to say that if the code would be specific for each board it could be much shorter? Here I agree but I think having generic code which makes porting U-Boot to a new platform is also worth something. If you want to be quick, take the generic code and if you are using an already support SDRAM you do not even need to calculate the timing parameters. If you want to squeeze out the very last byte in regards of code size you can take it as a guide and delete the constant parts.
Looking at how Wolfgang wrote the original IceCube/Lite5x00 code I guess he prefers generic, bank and size detecting code over a specialized version.
But I guess I haven't understood at all what you wanted to say because your Top5200.h states that you want to read the SDRAM configuration from VPD (EEPROM?) later. So your code would also benefit from a generic piece of initialization code fed with this data. Please detail your comments.
Regards
Mark
More information about the U-Boot
mailing list