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

Reinhard Meyer reinhard.meyer at emk-elektronik.de
Mon Jul 5 16:46:16 CEST 2004


Hello,

It DID appear on the list.

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? 

-----Ursprüngliche Nachricht-----
Von: u-boot-users-admin at lists.sourceforge.net [mailto:u-boot-users-admin at lists.sourceforge.net] Im Auftrag von Jonas Mark-r50740
Gesendet: Montag, 5. Juli 2004 16:39
An: u-boot-users at lists.sourceforge.net
Cc: Jonas Mark-r50740
Betreff: [U-Boot-Users] How to generalize SDRAM support for MPC5200 and MGT5100?

I sent the email below 01-July-2004 but it never appeared on the mailing list. So I give it another try.

--

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 themselves 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 parameter 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