u-boot-brain/arch
Stephen Warren a5fc3d0b35 ARM: tegra: query_sdram_size() cleanup
The return value of query_sdram_size() is assigned directly to
gd->ram_size in dram_init(). Adjust the return type to match the field
it's assigned to. This has the beneficial effect that on 64-bit systems,
the return value can correctly represent large RAM sizes over 4GB.

For similar reasons, change the type of variable size_bytes in the same
way.

query_sdram_size() would previously clip the detected RAM size to at most
just under 4GB in all cases, since on 32-bit systems, larger values could
not be represented. Disable this feature on 64-bit systems since the
representation restriction does not exist.

On 64-bit systems, never call get_ram_size() to validate the detected/
calculated RAM size. On any system with a secure OS/... carve-out, RAM
may not have a single contiguous usable area, and this can confuse
get_ram_size(). Ideally, we'd make this call conditional upon some other
flag that indicates specifically that a carve-out is actually in use. At
present, building for a 64-bit system is the best indication we have of
this fact. In fact, the call to get_ram_size() is not useful by the time
U-Boot runs on any system, since U-Boot (and potentially much other early
boot software) always runs from RAM on Tegra, so any mistakes in memory
controller register programming will already have manifested themselves
and prevented U-Boot from running to this point. In the future, we may
simply delete the call to get_ram_size() in all cases.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-08-13 13:06:04 -07:00
..
arc arc: significant cache rework 2015-07-01 17:17:27 +03:00
arm ARM: tegra: query_sdram_size() cleanup 2015-08-13 13:06:04 -07:00
avr32 avr32: delete ancient board.c 2015-06-10 14:03:26 +02:00
blackfin arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
m68k m68k: cache: add an empty stub functions for invalidate/flush dcache 2015-08-12 20:47:46 -04:00
microblaze arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
mips MIPS: change 'extern inline' to 'static inline' 2015-07-02 11:29:33 +02:00
nds32 arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
nios2 arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
openrisc arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
powerpc Correct License and Copyright information on few files 2015-08-12 20:47:46 -04:00
sandbox dm: test: Add a size to each reg property 2015-07-21 17:39:33 -06:00
sh Move default y configs out of arch/board Kconfig 2015-06-25 22:17:55 -04:00
sparc arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
x86 x86: Enable debug UART for Minnowmax 2015-08-06 07:44:30 -06:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig kbuild: create symbolic link only for ARM, AVR32, SPARC, PowerPC, x86 2015-07-27 15:02:00 -04:00