summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/include
diff options
context:
space:
mode:
authorChin Liang See <clsee@altera.com>2016-09-21 10:25:56 +0800
committerMarek Vasut <marex@denx.de>2016-10-27 08:03:07 +0200
commit89a54abf1bd1a8a9ebbea9808199ec8ee3d902bd (patch)
tree35830c1c2691e0a2058793a03ee78fc932d92229 /arch/arm/mach-socfpga/include
parent5ac5861c4ba851b473e6a24940b412b397627d8d (diff)
ddr: altera: Configuring SDRAM extra cycles timing parameters
To enable configuration of sdr.ctrlcfg.extratime1 register which enable extra clocks for read to write command timing. This is critical to ensure successful LPDDR2 interface Signed-off-by: Chin Liang See <clsee@altera.com> Cc: Marek Vasut <marex@denx.de> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Diffstat (limited to 'arch/arm/mach-socfpga/include')
-rw-r--r--arch/arm/mach-socfpga/include/mach/sdram.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/sdram.h b/arch/arm/mach-socfpga/include/mach/sdram.h
index f12bb84661..b11228fd99 100644
--- a/arch/arm/mach-socfpga/include/mach/sdram.h
+++ b/arch/arm/mach-socfpga/include/mach/sdram.h
@@ -30,7 +30,8 @@ struct socfpga_sdr_ctrl {
u32 dram_timing4; /* 0x10 */
u32 lowpwr_timing;
u32 dram_odt;
- u32 __padding0[4];
+ u32 extratime1;
+ u32 __padding0[3];
u32 dram_addrw; /* 0x2c */
u32 dram_if_width; /* 0x30 */
u32 dram_dev_width;
@@ -88,6 +89,7 @@ struct socfpga_sdram_config {
u32 dram_timing4;
u32 lowpwr_timing;
u32 dram_odt;
+ u32 extratime1;
u32 dram_addrw;
u32 dram_if_width;
u32 dram_dev_width;
@@ -427,6 +429,10 @@ SDR_CTRLGRP_MPTHRESHOLDRST_2_THRESHOLDRSTCYCLES_79_64_MASK \
/* Field instance: sdr::ctrlgrp::dramsts */
#define SDR_CTRLGRP_DRAMSTS_DBEERR_MASK 0x00000008
#define SDR_CTRLGRP_DRAMSTS_SBEERR_MASK 0x00000004
+/* Register template: sdr::ctrlgrp::extratime1 */
+#define SDR_CTRLGRP_EXTRATIME1_RD_TO_WR_LSB 20
+#define SDR_CTRLGRP_EXTRATIME1_RD_TO_WR_BC_LSB 24
+#define SDR_CTRLGRP_EXTRATIME1_RD_TO_WR_DIFF_LSB 28
/* SDRAM width macro for configuration with ECC */
#define SDRAM_WIDTH_32BIT_WITH_ECC 40