summaryrefslogtreecommitdiff
path: root/board/altera
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-08-02 19:00:23 +0200
committerMarek Vasut <marex@denx.de>2015-08-08 14:14:29 +0200
commit10c14261f3c0644d2ae21785701f5aa3898d98e9 (patch)
treeeb9b939cfeecbfc8ca007c891db3e246b5cf9e4f /board/altera
parent1fa0c8c4e30c4aae67b79263c749a66a67d42e5e (diff)
downloadu-boot-10c14261f3c0644d2ae21785701f5aa3898d98e9.tar.gz
u-boot-10c14261f3c0644d2ae21785701f5aa3898d98e9.tar.bz2
u-boot-10c14261f3c0644d2ae21785701f5aa3898d98e9.zip
ddr: altera: sequencer: Wrap IO_* macros
Introduce structure socfpga_sdram_io_config to wrap the IO configuration values in board file. Introduce socfpga_get_sdram_io_config() function, which returns this the structure. This is another 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.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/altera/socfpga/wrap_sdram_config.c b/board/altera/socfpga/wrap_sdram_config.c
index 5fe15718d8..2697867cd9 100644
--- a/board/altera/socfpga/wrap_sdram_config.c
+++ b/board/altera/socfpga/wrap_sdram_config.c
@@ -249,6 +249,24 @@ static const struct socfpga_sdram_rw_mgr_config rw_mgr_config = {
RW_MGR_MEM_VIRTUAL_GROUPS_PER_WRITE_DQS,
};
+struct socfpga_sdram_io_config io_config = {
+ .delay_per_dchain_tap = IO_DELAY_PER_DCHAIN_TAP,
+ .delay_per_dqs_en_dchain_tap = IO_DELAY_PER_DQS_EN_DCHAIN_TAP,
+ .delay_per_opa_tap = IO_DELAY_PER_OPA_TAP,
+ .dll_chain_length = IO_DLL_CHAIN_LENGTH,
+ .dqdqs_out_phase_max = IO_DQDQS_OUT_PHASE_MAX,
+ .dqs_en_delay_max = IO_DQS_EN_DELAY_MAX,
+ .dqs_en_delay_offset = IO_DQS_EN_DELAY_OFFSET,
+ .dqs_en_phase_max = IO_DQS_EN_PHASE_MAX,
+ .dqs_in_delay_max = IO_DQS_IN_DELAY_MAX,
+ .dqs_in_reserve = IO_DQS_IN_RESERVE,
+ .dqs_out_reserve = IO_DQS_OUT_RESERVE,
+ .io_in_delay_max = IO_IO_IN_DELAY_MAX,
+ .io_out1_delay_max = IO_IO_OUT1_DELAY_MAX,
+ .io_out2_delay_max = IO_IO_OUT2_DELAY_MAX,
+ .shift_dqs_en_when_shift_dqs = IO_SHIFT_DQS_EN_WHEN_SHIFT_DQS,
+};
+
const struct socfpga_sdram_config *socfpga_get_sdram_config(void)
{
return &sdram_config;
@@ -270,3 +288,8 @@ const struct socfpga_sdram_rw_mgr_config *socfpga_get_sdram_rwmgr_config(void)
{
return &rw_mgr_config;
}
+
+const struct socfpga_sdram_io_config *socfpga_get_sdram_io_config(void)
+{
+ return &io_config;
+}