2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2016-03-16 08:59:52 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-12-28 17:45:05 +00:00
|
|
|
#include <init.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2016-03-16 08:59:52 +00:00
|
|
|
#include <linux/sizes.h>
|
|
|
|
#include <asm/addrspace.h>
|
|
|
|
#include <mach/ddr.h>
|
|
|
|
|
2017-03-31 14:40:25 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2017-04-06 18:47:05 +00:00
|
|
|
int dram_init(void)
|
2016-03-16 08:59:52 +00:00
|
|
|
{
|
|
|
|
ddr_tap_tuning();
|
2017-03-31 14:40:25 +00:00
|
|
|
gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
|
|
|
|
|
|
|
|
return 0;
|
2016-03-16 08:59:52 +00:00
|
|
|
}
|