summaryrefslogtreecommitdiff
path: root/arch/arm/mach-keystone/include/mach/hardware-k2l.h
diff options
context:
space:
mode:
authorVitaly Andrianov <vitalya@ti.com>2016-03-04 10:36:43 -0600
committerTom Rini <trini@konsulko.com>2016-03-14 19:18:45 -0400
commit8efc24374176be3047f1585304fd33d5afca4dcb (patch)
treee5d37421dfaaee824a092c8da1a71b70e015b5ca /arch/arm/mach-keystone/include/mach/hardware-k2l.h
parentd9a76e77c8c99dc6da98aef94e0a241581d1cbe7 (diff)
downloadu-boot-8efc24374176be3047f1585304fd33d5afca4dcb.tar.gz
ARM: keystone2: use detected ddr3a size
Because KS2 u-boot works in 32 bit address space the existing ram_size global data field cannot be used. The maximum, which the get_ram_size() can detect is 2GB only. The ft_board_setup() needs the actual ddr3 size to fix up dtb. This commit introduces the ddr3_get_size() which uses SPD data to calculate the ddr3 size. This function replaces the "ddr3_size" environment variable, which was used to get the SODIMM size. For platforms, which don't have SODIMM with SPD and ddr3 is populated to a board a simple ddr3_get_size function that returns ddr3 size has to be implemented. See hardware-k2l.h Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/mach-keystone/include/mach/hardware-k2l.h')
-rw-r--r--arch/arm/mach-keystone/include/mach/hardware-k2l.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-keystone/include/mach/hardware-k2l.h b/arch/arm/mach-keystone/include/mach/hardware-k2l.h
index 4f1197ea92..a59e071359 100644
--- a/arch/arm/mach-keystone/include/mach/hardware-k2l.h
+++ b/arch/arm/mach-keystone/include/mach/hardware-k2l.h
@@ -105,4 +105,11 @@
/* NETCP */
#define KS2_NETCP_BASE 0x26000000
+#ifndef __ASSEMBLY__
+static inline int ddr3_get_size(void)
+{
+ return 2;
+}
+#endif
+
#endif /* __ASM_ARCH_HARDWARE_K2L_H */