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