[U-Boot] [PATCH 05/10] board: altera: Stratix10: Add board_get_usable_ram_top()

Marek Vasut marex at denx.de
Tue Mar 12 10:46:22 UTC 2019


On 3/12/19 9:31 AM, Ley Foon Tan wrote:
> Add board_get_usable_ram_top() function. Limit maximum usable
> ram top to 2GB.

Why ? There are ARM64 platforms which can access the entire DRAM range
just fine, what's the problem ?

> Signed-off-by: Dalon Westergreen <dalon.westergreen at intel.com>
> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
> ---
>  board/altera/stratix10-socdk/socfpga.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/board/altera/stratix10-socdk/socfpga.c b/board/altera/stratix10-socdk/socfpga.c
> index 043fc543f1..99c10d313c 100644
> --- a/board/altera/stratix10-socdk/socfpga.c
> +++ b/board/altera/stratix10-socdk/socfpga.c
> @@ -5,3 +5,15 @@
>   */
>  
>  #include <common.h>
> +#include <asm/arch/sdram.h>
> +#include <linux/sizes.h>
> +
> +#ifdef CONFIG_ALTERA_SDRAM
> +ulong board_get_usable_ram_top(ulong total_size)
> +{
> +	if (sdram_calculate_size() > SZ_2G)
> +		return SZ_2G;
> +	else
> +		return sdram_calculate_size();
> +}
> +#endif
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list