Hans de Goede | 56333be | 2015-01-21 16:14:00 +0100 | [diff] [blame] | 1 | /* DRAM parameters for auto dram configuration on sun5i and sun7i */ |
Hans de Goede | 6c46c8e | 2015-01-17 22:31:30 +0100 | [diff] [blame] | 2 | |
| 3 | #include <common.h> |
| 4 | #include <asm/arch/dram.h> |
| 5 | |
| 6 | static struct dram_para dram_para = { |
| 7 | .clock = CONFIG_DRAM_CLK, |
| 8 | .type = 3, |
| 9 | .rank_num = 1, |
| 10 | .density = 0, |
| 11 | .io_width = 0, |
| 12 | .bus_width = 0, |
Hans de Goede | 6c46c8e | 2015-01-17 22:31:30 +0100 | [diff] [blame] | 13 | .zq = CONFIG_DRAM_ZQ, |
| 14 | .odt_en = 0, |
| 15 | .size = 0, |
Siarhei Siamashka | d133647 | 2015-02-01 00:27:05 +0200 | [diff] [blame^] | 16 | #ifdef CONFIG_DRAM_TIMINGS_VENDOR_MAGIC |
| 17 | .cas = 9, |
Hans de Goede | 6c46c8e | 2015-01-17 22:31:30 +0100 | [diff] [blame] | 18 | .tpr0 = 0x42d899b7, |
| 19 | .tpr1 = 0xa090, |
| 20 | .tpr2 = 0x22a00, |
Siarhei Siamashka | d133647 | 2015-02-01 00:27:05 +0200 | [diff] [blame^] | 21 | .emr2 = 0x10, |
| 22 | #else |
| 23 | # include "dram_timings_sun4i.h" |
| 24 | #endif |
Hans de Goede | 6c46c8e | 2015-01-17 22:31:30 +0100 | [diff] [blame] | 25 | .tpr3 = 0, |
| 26 | .tpr4 = 0, |
| 27 | .tpr5 = 0, |
| 28 | .emr1 = CONFIG_DRAM_EMR1, |
Hans de Goede | 6c46c8e | 2015-01-17 22:31:30 +0100 | [diff] [blame] | 29 | .emr3 = 0, |
| 30 | }; |
| 31 | |
| 32 | unsigned long sunxi_dram_init(void) |
| 33 | { |
| 34 | return dramc_init(&dram_para); |
| 35 | } |