1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
9 #include <asm/global_data.h>
10 #include <linux/sizes.h>
12 DECLARE_GLOBAL_DATA_PTR;
16 return fdtdec_setup_mem_size_base();
19 int dram_init_banksize(void)
21 return fdtdec_setup_memory_banksize();
24 ulong board_get_usable_ram_top(ulong total_size)
27 * Ensure that we run from first 4GB so that all
28 * addresses used by U-Boot are 32bit addresses.
30 * This in-turn ensures that 32bit DMA capable
31 * devices work fine because DMA mapping APIs will
32 * provide 32bit DMA addresses only.
34 if (gd->ram_top >= SZ_4G)