summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2017-04-17 10:14:32 +0200
committerArthur Heymans <arthur@aheymans.xyz>2017-04-22 08:34:26 +0200
commit097d75398081093f2a95abee0994362ddb838d18 (patch)
treeb15d3f3ae6ff5e6edd443c7554a72d9826634126 /src/northbridge/intel
parent8795feb644c38f4cdae882e3cea934c7ec996661 (diff)
downloadcoreboot-097d75398081093f2a95abee0994362ddb838d18.tar.xz
nb/intel/pineview/raminit: Fix CONFIG_DEBUG_RAM_SETUP=y not compiling
The function decode_spd uses undeclared variables and an incorrectly initialized array. Change-Id: Ib45a8b2946c04c270e29524675b1f09d491d282b Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/19336 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/pineview/raminit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/northbridge/intel/pineview/raminit.c b/src/northbridge/intel/pineview/raminit.c
index e1d23a5679..a45b4da081 100644
--- a/src/northbridge/intel/pineview/raminit.c
+++ b/src/northbridge/intel/pineview/raminit.c
@@ -109,7 +109,7 @@ static inline int spd_read_byte(unsigned device, unsigned address)
return smbus_read_byte(device, address);
}
-static int decode_spd(struct dimminfo *d)
+static int decode_spd(struct dimminfo *d, int i)
{
d->type = 0;
if (d->spd_data[20] == 0x2) {
@@ -136,7 +136,7 @@ static int decode_spd(struct dimminfo *d)
d->tWR = d->spd_data[36];
d->ranks = d->sides; // XXX
#if CONFIG_DEBUG_RAM_SETUP
- const char *ubso[] = { {"UB"}, {"SO"} };
+ const char *ubso[2] = { "UB", "SO" };
#endif
PRINTK_DEBUG("%s-DIMM %d\n", &ubso[d->type][0], i);
PRINTK_DEBUG(" Sides : %d\n", d->sides);
@@ -305,7 +305,7 @@ static void sdram_read_spds(struct sysinfo *s)
int err = 1;
FOR_EACH_POPULATED_DIMM(s->dimms, i) {
- err = decode_spd(&s->dimms[i]);
+ err = decode_spd(&s->dimms[i], i);
s->dt0mode |= (s->dimms[i].spd_data[49] & 0x2) >> 1;
}
if (err) {