From fa12b67771f73f0e7acf2308a13cf33b8c619884 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Thu, 30 Apr 2009 22:45:41 +0000 Subject: Remove warnings from compilation of the s2892 with and without CBFS. I didn't try to remove "defined but not used" warnings because there are too many ifdefs to be sure I wouldn't break something. For shadowed variable declarations I renamed the inner-most variable. The one in src/pc80/keyboard.c might need help. I didn't change the functionality but it looks like a bug. I boot tested it on s2892 and abuild tested it. Signed-off-by: Myles Watson Acked-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4240 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/amd/amdk8/raminit.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/northbridge/amd/amdk8/raminit.c') diff --git a/src/northbridge/amd/amdk8/raminit.c b/src/northbridge/amd/amdk8/raminit.c index ea706b8e05..70c05f3560 100644 --- a/src/northbridge/amd/amdk8/raminit.c +++ b/src/northbridge/amd/amdk8/raminit.c @@ -805,7 +805,6 @@ static void set_dimm_map(const struct mem_controller *ctrl, struct dimm_size sz, }; uint32_t map; - uint32_t dch; map = pci_read_config32(ctrl->f2, DRAM_BANK_ADDR_MAP); map &= ~(0xf << (index * 4)); @@ -1491,19 +1490,19 @@ static struct spd_set_memclk_result spd_set_memclk(const struct mem_controller * /* Loop through and find a fast clock with a low latency */ for(index = 0; index < 3; index++, latency++) { - int value; + int spd_value; if ((latency < 2) || (latency > 4) || (!(latencies & (1 << latency)))) { continue; } - value = spd_read_byte(ctrl->channel0[i], latency_indicies[index]); - if (value < 0) { + spd_value = spd_read_byte(ctrl->channel0[i], latency_indicies[index]); + if (spd_value < 0) { goto hw_error; } /* Only increase the latency if we decreas the clock */ - if ((value >= min_cycle_time) && (value < new_cycle_time)) { - new_cycle_time = value; + if ((spd_value >= min_cycle_time) && (spd_value < new_cycle_time)) { + new_cycle_time = spd_value; new_latency = latency; } } @@ -1527,7 +1526,7 @@ static struct spd_set_memclk_result spd_set_memclk(const struct mem_controller * int latencies; int latency; int index; - int value; + int spd_value; if (!(dimm_mask & (1 << i))) { continue; } @@ -1554,13 +1553,13 @@ static struct spd_set_memclk_result spd_set_memclk(const struct mem_controller * } /* Read the min_cycle_time for this latency */ - value = spd_read_byte(ctrl->channel0[i], latency_indicies[index]); - if (value < 0) goto hw_error; + spd_value = spd_read_byte(ctrl->channel0[i], latency_indicies[index]); + if (spd_value < 0) goto hw_error; /* All is good if the selected clock speed * is what I need or slower. */ - if (value <= min_cycle_time) { + if (spd_value <= min_cycle_time) { continue; } /* Otherwise I have an error, disable the dimm */ -- cgit v1.2.3