Skip to content
Snippets Groups Projects
Commit 341f548e authored by Heiko Schocher's avatar Heiko Schocher Committed by Tom Rini
Browse files

arm, at91, mpddrc: fix typo in ddr2_init()


use the configure value for computing the ba_off value
not the value from the cr register. This leaded in a
wrong ram configuration on the upcoming corvus spl board
support.

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
Reviewed-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
parent 50921cdc
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ int ddr2_init(const unsigned int ram_address, ...@@ -26,7 +26,7 @@ int ddr2_init(const unsigned int ram_address,
/* Compute bank offset according to NC in configuration register */ /* Compute bank offset according to NC in configuration register */
ba_off = (mpddr_value->cr & ATMEL_MPDDRC_CR_NC_MASK) + 9; ba_off = (mpddr_value->cr & ATMEL_MPDDRC_CR_NC_MASK) + 9;
if (!(mpddr_value->cr & ATMEL_MPDDRC_CR_DECOD_INTERLEAVED)) if (!(mpddr_value->cr & ATMEL_MPDDRC_CR_DECOD_INTERLEAVED))
ba_off += ((mpddr->cr & ATMEL_MPDDRC_CR_NR_MASK) >> 2) + 11; ba_off += ((mpddr_value->cr & ATMEL_MPDDRC_CR_NR_MASK) >> 2) + 11;
ba_off += (mpddr_value->md & ATMEL_MPDDRC_MD_DBW_MASK) ? 1 : 2; ba_off += (mpddr_value->md & ATMEL_MPDDRC_MD_DBW_MASK) ? 1 : 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment