Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Wills Wang | 833a1a8 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com> |
Wills Wang | 833a1a8 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <linux/sizes.h> |
| 8 | #include <asm/addrspace.h> |
| 9 | #include <mach/ddr.h> |
| 10 | |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 11 | DECLARE_GLOBAL_DATA_PTR; |
| 12 | |
Simon Glass | d35f338 | 2017-04-06 12:47:05 -0600 | [diff] [blame] | 13 | int dram_init(void) |
Wills Wang | 833a1a8 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 14 | { |
| 15 | ddr_tap_tuning(); |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 16 | gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M); |
| 17 | |
| 18 | return 0; |
Wills Wang | 833a1a8 | 2016-03-16 16:59:52 +0800 | [diff] [blame] | 19 | } |