[U-Boot] [PATCH] ddr: altera: Init the rule ID in debug code

Marek Vasut marex at denx.de
Tue Dec 29 09:38:52 CET 2015


Init the rule ID, otherwise the debug code will always dump the
protection settings entry 0.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Chin Liang See <clsee at altera.com>
Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux at gmail.com>
---
 drivers/ddr/altera/sdram.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ddr/altera/sdram.c b/drivers/ddr/altera/sdram.c
index 1ed2883..2996942 100644
--- a/drivers/ddr/altera/sdram.c
+++ b/drivers/ddr/altera/sdram.c
@@ -218,6 +218,7 @@ static void sdram_dump_protection_config(void)
 	      readl(&sdr_ctrl->protport_default));
 
 	for (rules = 0; rules < 20; rules++) {
+		rule.rule = rules;
 		sdram_get_rule(&rule);
 		debug("Rule %d, rules ...\n", rules);
 		debug("    sdram start %x\n", rule.sdram_start);
-- 
2.1.4



More information about the U-Boot mailing list