From: Sebastien Bourdeauducq Date: Mon, 21 May 2012 20:55:45 +0000 (+0200) Subject: bios/ddrinit: use new padding scheme for address register X-Git-Tag: 24jan2021_ls180~3182 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e33399de822999fb863be093439902b8b6bf1b29;p=litex.git bios/ddrinit: use new padding scheme for address register --- diff --git a/software/bios/ddrinit.c b/software/bios/ddrinit.c index 010efb74..5c2a040c 100644 --- a/software/bios/ddrinit.c +++ b/software/bios/ddrinit.c @@ -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)