X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fmotionpro%2Fmotionpro.c;h=3b340622266f5f2df8caf57e1cc2fdf69b114292;hb=ab4860b255239dbaecccdd002c8d11f4ef54dd75;hp=6eb5fe9cfc9950a914e9ebfad3d274a9cc701e6a;hpb=83b75ef3a6d87b540368d6721728332c919e51bb;p=u-boot diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c index 6eb5fe9cfc..3b34062226 100644 --- a/board/motionpro/motionpro.c +++ b/board/motionpro/motionpro.c @@ -29,9 +29,7 @@ #include #include #include -#if defined(CONFIG_OF_FLAT_TREE) -#include -#endif +#include #if defined(CONFIG_STATUS_LED) #include @@ -134,12 +132,18 @@ static void sdram_start(int hi_addr) /* * Initalize SDRAM - configure SDRAM controller, detect memory size. */ -long int initdram(int board_type) +phys_size_t initdram(int board_type) { ulong dramsize = 0; #ifndef CFG_RAMBOOT ulong test1, test2; + /* According to AN3221 (MPC5200B SDRAM Initialization and + * Configuration), the SDelay register must be written a value of + * 0x00000004 as the first step of the SDRAM contorller configuration. + */ + *(vu_long *)MPC5XXX_SDRAM_SDELAY = 0x04; + /* configure SDRAM start/end for detection */ *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x0000001e; /* 2G at 0x0 */ *(vu_long *)MPC5XXX_SDRAM_CS1CFG = 0x80000000; /* disabled */ @@ -196,12 +200,12 @@ int checkboard(void) } -#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); } -#endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */ +#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ #if defined(CONFIG_STATUS_LED)