bios/ddrinit: use new padding scheme for address register
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 21 May 2012 20:55:45 +0000 (22:55 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 21 May 2012 20:55:45 +0000 (22:55 +0200)
software/bios/ddrinit.c

index 010efb74595f44e983caeeebdb507e2b5dbcd326..5c2a040c5f4d7ba23cbefef5e3144670bee4b43e 100644 (file)
@@ -33,10 +33,10 @@ static void cdelay(int i)
 
 static void setaddr(int a)
 {
-       CSR_DFII_AH_P0 = (a & 0x1fe0) >> 5;
-       CSR_DFII_AL_P0 = a & 0x001f;
-       CSR_DFII_AH_P1 = (a & 0x1fe0) >> 5;
-       CSR_DFII_AL_P1 = a & 0x001f;
+       CSR_DFII_AH_P0 = (a & 0xff00) >> 8;
+       CSR_DFII_AL_P0 = a & 0x00ff;
+       CSR_DFII_AH_P1 = (a & 0xff00) >> 8;
+       CSR_DFII_AL_P1 = a & 0x00ff;
 }
 
 static void init_sequence(void)