diff options
author | Wolfgang Denk | 2007-02-27 14:26:04 +0100 |
---|---|---|
committer | Wolfgang Denk | 2007-02-27 14:26:04 +0100 |
commit | 743571145b37182757d4e688a77860b36ee77573 (patch) | |
tree | 3e2006c9f3a953532bb6a97d896390f03e58bd03 /board/motionpro | |
parent | 638dd1458bbdc2a55d4b9e25c5c4e1f838a5dc72 (diff) |
Minor code cleanup.
Diffstat (limited to 'board/motionpro')
-rw-r--r-- | board/motionpro/motionpro.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c index 95576ed56b8..d60d23332b1 100644 --- a/board/motionpro/motionpro.c +++ b/board/motionpro/motionpro.c @@ -141,11 +141,12 @@ long int initdram (int board_type) dramsize = 0; /* set SDRAM CS0 size according to the amount of RAM found */ - if (dramsize > 0) + if (dramsize > 0) { *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x13 + __builtin_ffs(dramsize >> 20) - 1; - else + } else { *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0; /* disabled */ + } /* let SDRAM CS1 start right after CS0 and disable it */ *(vu_long *) MPC5XXX_SDRAM_CS1CFG = dramsize; |