From 8efc24374176be3047f1585304fd33d5afca4dcb Mon Sep 17 00:00:00 2001 From: Vitaly Andrianov Date: Fri, 4 Mar 2016 10:36:43 -0600 Subject: 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 Signed-off-by: Nishanth Menon Reviewed-by: Tom Rini --- board/ti/ks2_evm/board.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'board/ti') diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index 7d1709c880a..ca668a7c690 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -146,9 +146,7 @@ int ft_board_setup(void *blob, bd_t *bd) ddr3a_size = 0; if (lpae) { - env = getenv("ddr3a_size"); - if (env) - ddr3a_size = simple_strtol(env, NULL, 10); + ddr3a_size = ddr3_get_size(); if ((ddr3a_size != 8) && (ddr3a_size != 4)) ddr3a_size = 0; } -- cgit v1.2.3