浏览代码

ddr: altera: Fix DRAM end value in protection rule

The hi address bitfield in the protection rule must be set to
the last address in the region which the rule represents. The
behavior is now in-line with code generated by Quartus 15.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
Marek Vasut 9 年之前
父节点
当前提交
164eb23f49
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/ddr/altera/sdram.c

+ 1 - 1
drivers/ddr/altera/sdram.c

@@ -118,7 +118,7 @@ static void sdram_set_rule(struct sdram_prot_rule *prule)
 
 	/* Obtain the address bits */
 	lo_addr_bits = prule->sdram_start >> 20ULL;
-	hi_addr_bits = prule->sdram_end >> 20ULL;
+	hi_addr_bits = (prule->sdram_end - 1) >> 20ULL;
 
 	debug("sdram set rule start %x, %d\n", lo_addr_bits,
 	      prule->sdram_start);