[coreboot-gerrit] Patch set updated for coreboot: nb/intel/sandybridge/raminit: Reduce log level

Patrick Rudolph (siro@das-labor.org) gerrit at coreboot.org
Tue Nov 29 18:17:36 CET 2016


Patrick Rudolph (siro at das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17611

-gerrit

commit 0d5ef0ed05808b95d7058f7ddb9057a7830116ef
Author: Patrick Rudolph <siro at das-labor.org>
Date:   Fri Nov 25 16:36:52 2016 +0100

    nb/intel/sandybridge/raminit: Reduce log level
    
    Remove verbose logging from loops.
    Print detailed summary at end of loop instead.
    Use the same scheme already present in some functions.
    
    Change-Id: I412d81592436ac0d2422caf396c64e0c34acc2d1
    Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
 src/northbridge/intel/sandybridge/raminit_common.c | 32 ++++++----------------
 1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/src/northbridge/intel/sandybridge/raminit_common.c b/src/northbridge/intel/sandybridge/raminit_common.c
index ab5c839..aa2e9e2 100644
--- a/src/northbridge/intel/sandybridge/raminit_common.c
+++ b/src/northbridge/intel/sandybridge/raminit_common.c
@@ -1223,9 +1223,6 @@ static void discover_timA_coarse(ramctr_timing * ctrl, int channel,
 		FOR_ALL_LANES {
 			statistics[lane][timA] =
 			    !does_lane_work(ctrl, channel, slotrank, lane);
-			printram("Astat: %d, %d, %d: %x, %x\n",
-			       channel, slotrank, lane, timA,
-			       statistics[lane][timA]);
 		}
 	}
 	FOR_ALL_LANES {
@@ -1234,10 +1231,8 @@ static void discover_timA_coarse(ramctr_timing * ctrl, int channel,
 		upperA[lane] = rn.end;
 		if (upperA[lane] < rn.middle)
 			upperA[lane] += 128;
-		printram("Aval: %d, %d, %d: %x\n", channel, slotrank,
-		       lane, ctrl->timings[channel][slotrank].lanes[lane].timA);
-		printram("Aend: %d, %d, %d: %x\n", channel, slotrank,
-		       lane, upperA[lane]);
+		printram("timA: %d, %d, %d: 0x%02x-0x%02x-0x%02x\n",
+				 channel, slotrank, lane, rn.start, rn.middle, rn.end);
 	}
 }
 
@@ -1614,9 +1609,6 @@ static int discover_timC(ramctr_timing *ctrl, int channel, int slotrank)
 			statistics[lane][timC] =
 			    read32(DEFAULT_MCHBAR + 0x4340 + 4 * lane +
 				   0x400 * channel);
-			printram("Cstat: %d, %d, %d, %x, %x\n",
-			       channel, slotrank, lane, timC,
-			       statistics[lane][timC]);
 		}
 	}
 	FOR_ALL_LANES {
@@ -1628,8 +1620,8 @@ static int discover_timC(ramctr_timing *ctrl, int channel, int slotrank)
 			       channel, slotrank, lane);
 			return MAKE_ERR;
 		}
-		printram("Cval: %d, %d, %d: %x\n", channel, slotrank,
-		       lane, ctrl->timings[channel][slotrank].lanes[lane].timC);
+		printram("timC: %d, %d, %d: 0x%02x-0x%02x-0x%02x\n",
+				 channel, slotrank, lane, rn.start, rn.middle, rn.end);
 	}
 	return 0;
 }
@@ -1847,9 +1839,6 @@ static int discover_timB(ramctr_timing *ctrl, int channel, int slotrank)
 			       (DEFAULT_MCHBAR + lane_registers[lane] +
 				channel * 0x100 + 4 + ((timB / 32) & 1) * 4)
 			       >> (timB % 32)) & 1);
-			printram("Bstat: %d, %d, %d: %x, %x\n",
-			       channel, slotrank, lane, timB,
-			       statistics[lane][timB]);
 		}
 	}
 	FOR_ALL_LANES {
@@ -1873,8 +1862,8 @@ static int discover_timB(ramctr_timing *ctrl, int channel, int slotrank)
 			       channel, slotrank, lane);
 			return MAKE_ERR;
 		}
-		printram("Bval: %d, %d, %d: %x\n", channel, slotrank,
-		       lane, ctrl->timings[channel][slotrank].lanes[lane].timB);
+		printram("timB: %d, %d, %d: 0x%02x-0x%02x-0x%02x\n",
+				 channel, slotrank, lane, rn.start, rn.middle, rn.end);
 	}
 	return 0;
 }
@@ -2218,7 +2207,6 @@ static int test_320c(ramctr_timing * ctrl, int channel, int slotrank)
 
 	ctrl->timings[channel][slotrank] = saved_rt;
 
-	printram("3lanes: %x\n", lanes_ok);
 	return lanes_ok != ((1 << NUM_LANES) - 1);
 }
 
@@ -2355,9 +2343,6 @@ static int try_cmd_stretch(ramctr_timing *ctrl, int channel, int cmd_stretch)
 		FOR_ALL_POPULATED_RANKS {
 			stat[slotrank][c320c + 127] =
 					test_320c(ctrl, channel, slotrank);
-			printram("3stat: %d, %d, %d: %x\n",
-					 channel, slotrank, c320c,
-					 stat[slotrank][c320c + 127]);
 		}
 	}
 	FOR_ALL_POPULATED_RANKS {
@@ -2365,9 +2350,8 @@ static int try_cmd_stretch(ramctr_timing *ctrl, int channel, int cmd_stretch)
 			get_longest_zero_run(stat[slotrank], 255);
 		ctrl->timings[channel][slotrank].val_320c =
 			rn.middle - 127;
-		printram("3val %d, %d: %d\n", channel,
-				 slotrank,
-				 ctrl->timings[channel][slotrank].val_320c);
+		printram("cmd_stretch: %d, %d: 0x%02x-0x%02x-0x%02x\n",
+				 channel, slotrank, rn.start, rn.middle, rn.end);
 		if (rn.all || rn.length < MIN_C320C_LEN) {
 			FOR_ALL_POPULATED_RANKS {
 				ctrl->timings[channel][slotrank] =



More information about the coreboot-gerrit mailing list