blob: 138a7f84832e05d90447e8feba34fe8112dee944 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Wills Wang1d3d0f12016-03-16 16:59:52 +08002/*
3 * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
Wills Wang1d3d0f12016-03-16 16:59:52 +08004 */
5
6#include <common.h>
7#include <linux/sizes.h>
8#include <asm/addrspace.h>
9#include <mach/ddr.h>
10
Simon Glass088454c2017-03-31 08:40:25 -060011DECLARE_GLOBAL_DATA_PTR;
12
Simon Glassf1683aa2017-04-06 12:47:05 -060013int dram_init(void)
Wills Wang1d3d0f12016-03-16 16:59:52 +080014{
15 ddr_tap_tuning();
Simon Glass088454c2017-03-31 08:40:25 -060016 gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
17
18 return 0;
Wills Wang1d3d0f12016-03-16 16:59:52 +080019}