summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/amd/amdmct/mct_ddr3/mct_d.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index 7b9fa6555a..f726345f00 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -256,11 +256,11 @@ static uint16_t fam15h_mhz_to_memclk_config(uint16_t freq)
/* Compute the index value for the given frequency */
for (iter = 0; iter <= 0x16; iter++) {
- if (fam15h_freq_tab[iter] == freq)
+ if (fam15h_freq_tab[iter] == freq) {
+ freq = iter;
break;
+ }
}
- if (fam15h_freq_tab[iter] == freq)
- freq = iter;
if (freq == 0)
freq = 0x4;
@@ -274,11 +274,11 @@ static uint16_t fam10h_mhz_to_memclk_config(uint16_t freq)
/* Compute the index value for the given frequency */
for (iter = 0; iter <= 0x6; iter++) {
- if (fam10h_freq_tab[iter] == freq)
+ if (fam10h_freq_tab[iter] == freq) {
+ freq = iter;
break;
+ }
}
- if (fam10h_freq_tab[iter] == freq)
- freq = iter;
if (freq == 0)
freq = 0x3;