summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-06-11 12:45:51 -0600
committerPatrick Georgi <pgeorgi@google.com>2019-07-19 09:57:32 +0000
commit78107939de6e2c4b66de6bd1370607f7d3a600f0 (patch)
tree01e08649910d70b4c04690e1e3e3da291416b5b1 /src/northbridge/intel
parent589eff7e476f452773bb3cc2ca1469446e2097f4 (diff)
downloadcoreboot-78107939de6e2c4b66de6bd1370607f7d3a600f0.tar.xz
nb/intel/pineview: Remove dead code in switch
This switch was likely copy-pasted from the one right above it. However, the MEM_CLOCK_800MHz case isn't needed, since that is explicitly checked and avoided before the while loop. With that gone, only the 667MHz/default case is left, which we don't need to switch over anymore. Change-Id: Idfb9cc27dd8718f627d15ba92a9c74c51c2c1c2d Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Found-by: Coverity CID 1347372 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33407 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/pineview/raminit.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/northbridge/intel/pineview/raminit.c b/src/northbridge/intel/pineview/raminit.c
index 1d24ea2217..5cece4147f 100644
--- a/src/northbridge/intel/pineview/raminit.c
+++ b/src/northbridge/intel/pineview/raminit.c
@@ -498,28 +498,12 @@ static void sdram_detect_ram_speed(struct sysinfo *s)
lowcas = lsbp;
while (cas == 0 && highcas >= lowcas) {
FOR_EACH_POPULATED_DIMM(s->dimms, i) {
- switch (freq) {
- case MEM_CLOCK_800MHz:
- if ((s->dimms[i].spd_data[9] > 0x25) ||
- (s->dimms[i].spd_data[10] > 0x40)) {
- // CAS too fast, lower it
- highcas--;
- break;
- } else {
- cas = highcas;
- }
- break;
- case MEM_CLOCK_667MHz:
- default:
- if ((s->dimms[i].spd_data[9] > 0x30) ||
- (s->dimms[i].spd_data[10] > 0x45)) {
- // CAS too fast, lower it
- highcas--;
- break;
- } else {
- cas = highcas;
- }
- break;
+ if ((s->dimms[i].spd_data[9] > 0x30) ||
+ (s->dimms[i].spd_data[10] > 0x45)) {
+ // CAS too fast, lower it
+ highcas--;
+ } else {
+ cas = highcas;
}
}
}