]> git.sur5r.net Git - u-boot/commitdiff
ddr: altera: Init the rule ID in debug code
authorMarek Vasut <marex@denx.de>
Tue, 29 Dec 2015 08:38:52 +0000 (09:38 +0100)
committerMarek Vasut <marex@denx.de>
Sat, 16 Jan 2016 06:07:22 +0000 (07:07 +0100)
Init the rule ID, otherwise the debug code will always dump the
protection settings entry 0.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
drivers/ddr/altera/sdram.c

index 1ed2883d1b8460795117a1d21ff0a3e2188f906f..299694217279b1cc9aa51ec3947f7e3c10867ae9 100644 (file)
@@ -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);