summaryrefslogtreecommitdiff
path: root/board/altera
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-08-02 19:18:47 +0200
committerMarek Vasut <marex@denx.de>2015-08-08 14:14:29 +0200
commit042ff2d0facaa520f1bc02b0695eb6a4e1d30b7a (patch)
tree1d5651fb1f7588087c1ea95487de020a3069a986 /board/altera
parent160695d88612d1e1c094fef33d279c297796b881 (diff)
downloadu-boot-imx-042ff2d0facaa520f1bc02b0695eb6a4e1d30b7a.zip
u-boot-imx-042ff2d0facaa520f1bc02b0695eb6a4e1d30b7a.tar.gz
u-boot-imx-042ff2d0facaa520f1bc02b0695eb6a4e1d30b7a.tar.bz2
ddr: altera: sequencer: Wrap misc remaining macros
Introduce structure socfpga_sdram_misc_config to wrap the remaining misc configuration values in board file. Again, introduce a function, socfpga_get_sdram_misc_config(), which returns this the structure. This is almost the final step toward wrapping the nasty QTS generated macros in board files and reducing the pollution of the namespace. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Diffstat (limited to 'board/altera')
-rw-r--r--board/altera/socfpga/wrap_sdram_config.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/board/altera/socfpga/wrap_sdram_config.c b/board/altera/socfpga/wrap_sdram_config.c
index 2697867..cd97cc5 100644
--- a/board/altera/socfpga/wrap_sdram_config.c
+++ b/board/altera/socfpga/wrap_sdram_config.c
@@ -267,6 +267,22 @@ struct socfpga_sdram_io_config io_config = {
.shift_dqs_en_when_shift_dqs = IO_SHIFT_DQS_EN_WHEN_SHIFT_DQS,
};
+struct socfpga_sdram_misc_config misc_config = {
+ .afi_rate_ratio = AFI_RATE_RATIO,
+ .calib_lfifo_offset = CALIB_LFIFO_OFFSET,
+ .calib_vfifo_offset = CALIB_VFIFO_OFFSET,
+ .enable_super_quick_calibration = ENABLE_SUPER_QUICK_CALIBRATION,
+ .max_latency_count_width = MAX_LATENCY_COUNT_WIDTH,
+ .read_valid_fifo_size = READ_VALID_FIFO_SIZE,
+ .reg_file_init_seq_signature = REG_FILE_INIT_SEQ_SIGNATURE,
+ .tinit_cntr0_val = TINIT_CNTR0_VAL,
+ .tinit_cntr1_val = TINIT_CNTR1_VAL,
+ .tinit_cntr2_val = TINIT_CNTR2_VAL,
+ .treset_cntr0_val = TRESET_CNTR0_VAL,
+ .treset_cntr1_val = TRESET_CNTR1_VAL,
+ .treset_cntr2_val = TRESET_CNTR2_VAL,
+};
+
const struct socfpga_sdram_config *socfpga_get_sdram_config(void)
{
return &sdram_config;
@@ -293,3 +309,8 @@ const struct socfpga_sdram_io_config *socfpga_get_sdram_io_config(void)
{
return &io_config;
}
+
+const struct socfpga_sdram_misc_config *socfpga_get_sdram_misc_config(void)
+{
+ return &misc_config;
+}