Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Wills Wang | 1d3d0f1 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 2 | /* |
3 | * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com> | ||||
Wills Wang | 1d3d0f1 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 4 | */ |
5 | |||||
6 | #include <common.h> | ||||
Simon Glass | 9b4a205 | 2019-12-28 10:45:05 -0700 | [diff] [blame] | 7 | #include <init.h> |
Simon Glass | 401d1c4 | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 8 | #include <asm/global_data.h> |
Wills Wang | 1d3d0f1 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 9 | #include <linux/sizes.h> |
10 | #include <asm/addrspace.h> | ||||
11 | #include <mach/ddr.h> | ||||
12 | |||||
Simon Glass | 088454c | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 13 | DECLARE_GLOBAL_DATA_PTR; |
14 | |||||
Simon Glass | f1683aa | 2017-04-06 12:47:05 -0600 | [diff] [blame] | 15 | int dram_init(void) |
Wills Wang | 1d3d0f1 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 16 | { |
17 | ddr_tap_tuning(); | ||||
Simon Glass | 088454c | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 18 | gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M); |
19 | |||||
20 | return 0; | ||||
Wills Wang | 1d3d0f1 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 21 | } |