From ca7b4f5c494377fee2f885a65752f7b92d5ac2d6 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Mon, 21 May 2007 18:38:29 +0000 Subject: fix some typos, clarify comments and drop dead code (trivial) Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2682 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/northbridge/amd/amdk8/raminit.c | 60 +++++++++-------------------------- src/northbridge/amd/amdk8/raminit_f.c | 2 +- 2 files changed, 16 insertions(+), 46 deletions(-) (limited to 'src/northbridge') diff --git a/src/northbridge/amd/amdk8/raminit.c b/src/northbridge/amd/amdk8/raminit.c index e093146642..6840420552 100644 --- a/src/northbridge/amd/amdk8/raminit.c +++ b/src/northbridge/amd/amdk8/raminit.c @@ -614,10 +614,10 @@ static int is_dual_channel(const struct mem_controller *ctrl) static int is_opteron(const struct mem_controller *ctrl) { /* Test to see if I am an Opteron. - * FIXME Testing dual channel capability is correct for now - * but a beter test is probably required. + * FIXME Socket 939 based Athlon64 have dual channel capability, + * too, so we need a better test for Opterons */ -#warning "FIXME implement a better test for opterons" +#warning "FIXME: Implement a better test for Opterons" uint32_t nbcap; nbcap = pci_read_config32(ctrl->f3, NORTHBRIDGE_CAP); return !!(nbcap & NBCAP_128Bit); @@ -1202,7 +1202,7 @@ static long spd_handle_unbuffered_dimms(const struct mem_controller *ctrl, long die("Mixed buffered and registered dimms not supported"); } #if 1 - //By yhlu for debug Athlon64 939 can do dual channel, but it use unbuffer DIMM + // yhlu debug: Athlon64 939 can do dual channel, but it uses unbuffered DIMMs if (unbuffered && is_opteron(ctrl)) { die("Unbuffered Dimms not supported on Opteron"); } @@ -2264,7 +2264,10 @@ static void set_hw_mem_hole(int controllers, const struct mem_controller *ctrl) hole_startk = 4*1024*1024 - HW_MEM_HOLE_SIZEK; #if HW_MEM_HOLE_SIZE_AUTO_INC == 1 - //We need to double check if the hole_startk is valid, if it is equal to basek, we need to decrease it some + /* We need to double check if hole_startk is valid. + * If it is equal to the dram base address in K (base_k), + * we need to decrease it. + */ uint32_t basek_pri; for(i=0; i> 2; if(base_k == hole_startk) { - hole_startk -= (base_k - basek_pri)>>1; // decrease mem hole startk to make sure it is on middle of privous node - break; //only one hole + /* decrease memory hole startk to make sure it is + * in the middle of the previous node + */ + hole_startk -= (base_k - basek_pri)>>1; + break; /* only one hole */ } basek_pri = base_k; } #endif - //find node index that need do set hole + /* Find node number that needs the memory hole configured */ for(i=0; i