blob: 545b1199e1063d4ac1ee7ea3f3cbe14eff06e1e6 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Wills Wang833a1a82016-03-16 16:59:52 +08002/*
3 * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
Wills Wang833a1a82016-03-16 16:59:52 +08004 */
5
6#include <common.h>
Simon Glass8e16b1e2019-12-28 10:45:05 -07007#include <init.h>
Simon Glass3ba929a2020-10-30 21:38:53 -06008#include <asm/global_data.h>
Wills Wang833a1a82016-03-16 16:59:52 +08009#include <linux/sizes.h>
10#include <asm/addrspace.h>
11#include <mach/ddr.h>
12
Simon Glass39f90ba2017-03-31 08:40:25 -060013DECLARE_GLOBAL_DATA_PTR;
14
Simon Glassd35f3382017-04-06 12:47:05 -060015int dram_init(void)
Wills Wang833a1a82016-03-16 16:59:52 +080016{
17 ddr_tap_tuning();
Simon Glass39f90ba2017-03-31 08:40:25 -060018 gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
19
20 return 0;
Wills Wang833a1a82016-03-16 16:59:52 +080021}