1 #include <common.h> 2 #include <asm/arch/dram.h> 3 #include <linux/kconfig.h> 4 5 static struct dram_para dram_para = { 6 .clock = CONFIG_DRAM_CLK, 7 .type = 3, 8 .rank_num = 1, 9 .density = 0, 10 .io_width = 0, 11 .bus_width = 0, 12 .zq = CONFIG_DRAM_ZQ, 13 .odt_en = IS_ENABLED(CONFIG_DRAM_ODT_EN), 14 .size = 0, 15 #ifdef CONFIG_DRAM_TIMINGS_VENDOR_MAGIC 16 .cas = 6, 17 .tpr0 = 0x30926692, 18 .tpr1 = 0x1090, 19 .tpr2 = 0x1a0c8, 20 .emr2 = 0, 21 #else 22 # include "dram_timings_sun4i.h" 23 .active_windowing = 1, 24 #endif 25 .tpr3 = CONFIG_DRAM_TPR3, 26 .tpr4 = 0, 27 .tpr5 = 0, 28 .emr1 = CONFIG_DRAM_EMR1, 29 .emr3 = 0, 30 .dqs_gating_delay = CONFIG_DRAM_DQS_GATING_DELAY, 31 }; 32 33 unsigned long sunxi_dram_init(void) 34 { 35 return dramc_init(&dram_para); 36 } 37