[U-Boot-Users] How to generalize SDRAM support for MPC5200 and MGT5100?

Mark Jonas mark.jonas at freescale.com
Thu Jul 1 17:55:18 CEST 2004


Hello,

while porting U-Boot to Total5200 I thought that it would be nice if all 
MPC5200 and MGT5100 platforms could share their SDRAM initialization 
code. In fact this is already done but by means of code duplication. So 
far most people (everybody?) simply copied the board/icecube/icecube.c 
and took it SDRAM init code unchanged. And if the SDRAM chips themself 
were matching the appropriate mt4*-75.h file was copied as well. So how 
can we move the SDRAM init functions from the board directory to the 
drivers or the cpu/mpc5xxx directory? (I think cpu/mpc5xxx would be the 
better match)

In the Total5200 port I already went half way but taking the SDRAM init 
functions out from board/total/total5200.c to board/total5200/sdram.*. I 
did not put it into cpu/mpc5xxx because if I did so I wanted to have a 
smart solution in regards to coupling that with the SDRAM paramter 
includes (mt48lc16m16a2-75.h, mt46v16m16-75.h and mt48lc32m16a2-75.h).

Does anybody have an idea how we can make this generic for all MPC5200 
and MGT5100 boards?

Regards
Mark




More information about the U-Boot mailing list