]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: mvebu: dram.c: Rework dram_init() and dram_init_banksize()
authorStefan Roese <sr@denx.de>
Mon, 10 Aug 2015 13:11:27 +0000 (15:11 +0200)
committerLuka Perkov <luka.perkov@sartura.hr>
Mon, 17 Aug 2015 16:49:29 +0000 (18:49 +0200)
commita8b57a90ec65832ca069ed1b0900cf92e9efd6a0
tree187f7fc45ea99d80e5adf0b1a0db6e29c4ccadd2
parent2923c2d2febad412c1d7a955ca1b08c8bdd31cf4
arm: mvebu: dram.c: Rework dram_init() and dram_init_banksize()

Rework these functions so that dram_init_banksize() does not call
dram_init() again. It only needs to set the banksize values in the
bdinfo struct.

Make sure to also clip the size of the last bank if it exceeds the
maximum allowed value of 3 GiB (0xc000.0000). Otherwise other
address windows (e.g. PCIe) will overlap with this memory window.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
arch/arm/mach-mvebu/dram.c