]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
ddr: altera: sdram: Make sdram_start and sdram_end into u32
authorMarek Vasut <marex@denx.de>
Sat, 1 Aug 2015 21:12:11 +0000 (23:12 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:17:37 +0000 (08:17 +0200)
commit8ecf7f21941579028c9565f6a2212bb1c098bd4e
tree346bfc2ca2bba46707e76737d92ce87529ed1a1d
parentc7f0bf38630e2c6b4d0d6e1f9cd3de18f75e1060
ddr: altera: sdram: Make sdram_start and sdram_end into u32

Originally, both sdram_start and sdram_end were 64b values. The
sdram_start had no reason for being so, since our address space
is only 32b, so switching sdram_start to u32 is simple.

The sdram_end is a bit more complex, since it can actually be
set to (1 << 32) if someone really wanted to use an SoCFPGA with
4 GiB of DRAM and fixed the code around a little. But, the code
handling the protection rules internally decrements the sdram_end
variable anyway. Thus, instead of calling the code and passing in
the address of the SDRAM end, pass in the address already decremented
by one. This lets the sdram_end be 32b as well.

Signed-off-by: Marek Vasut <marex@denx.de>
drivers/ddr/altera/sdram.c