u-boot/arch
Icenowy Zheng a5ff6f5c72 sunxi: enable dual rank memory on R40
Previously we do not have proper dual rank memory detection on R40
(because we omitted PIR_QSGATE, which does not work on R40 with our
configuration), and dual rank memory is just simply disabled as early
R40 boards available (Banana Pi M2 Ultra and Berry) have single rank
memory.

As a board with dual rank memory (Forlinx OKA40i-C) is now known to us,
we need to have a way to do memory rank detection to support that board.

Add some routine to detect memory rank by trying to access the memory
in rank 1 and check for error status of the memory controller, and then
enable dual rank memory on R40.

Similar routine can be used to detect half DQ width (which is also
detected by PIR_QSGATE on other SoCs), but it's left unimplemented
because there's no known R40 board with half DQ width now.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
[Andre: Move R40 detect code call into sunxi_dram_init()]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2021-04-16 01:12:58 +01:00
..
arc reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
arm sunxi: enable dual rank memory on R40 2021-04-16 01:12:58 +01:00
m68k Merge branch '2021-02-02-drop-asm_global_data-when-unused' 2021-02-15 10:16:45 -05:00
microblaze common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
mips common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
nds32 reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
nios2 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
powerpc powerpc: dts: t1042d4rdb: add FMan v3 nodes 2021-04-15 14:27:29 +05:30
riscv riscv: dts: mpfs-icicle-kit: Drop 'clock-frequency' in the uart nodes 2021-04-08 15:37:30 +08:00
sandbox test: dm: Add a case to test ofnode_phy_is_fixed_link() 2021-04-15 14:22:17 +05:30
sh reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
x86 x86: mtrr: Fix function descriptions 2021-04-15 10:43:17 +08:00
xtensa common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
.gitignore
Kconfig sandbox: Add a DSA sandbox driver and unit test 2021-04-15 14:22:17 +05:30
u-boot-elf.lds arch: Add explicit linker script for u-boot-elf 2020-04-03 11:52:55 -04:00