1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
4  */
5 
6 #include <common.h>
7 #include <init.h>
8 #include <asm/global_data.h>
9 #include <linux/sizes.h>
10 #include <asm/addrspace.h>
11 #include <mach/ddr.h>
12 
13 DECLARE_GLOBAL_DATA_PTR;
14 
dram_init(void)15 int dram_init(void)
16 {
17 	ddr_tap_tuning();
18 	gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
19 
20 	return 0;
21 }
22