diff options
author | Marek Vasut <marex@denx.de> | 2015-08-02 17:15:19 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-08-08 14:14:28 +0200 |
commit | 04955cf247cc75cc08c4667f785e74a2435f5061 (patch) | |
tree | 644209ad3c507ede8a0cf1e91b9d0307e686e2c3 /drivers/ddr | |
parent | 499b7a7c883519895232958bd068c4a2e714f6e0 (diff) | |
download | u-boot-imx-04955cf247cc75cc08c4667f785e74a2435f5061.zip u-boot-imx-04955cf247cc75cc08c4667f785e74a2435f5061.tar.gz u-boot-imx-04955cf247cc75cc08c4667f785e74a2435f5061.tar.bz2 |
ddr: altera: sequencer: Wrap ac_rom_init and inst_rom_init
Introduce two wrapper functions, socfpga_get_seq_ac_init() and
socfpga_get_seq_inst_init() to avoid direct inclusion of the
sequencer_auto_ac_init.h and sequencer_auto_inst_init.h QTS
generated files. This reduces namespace pollution again.
Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Diffstat (limited to 'drivers/ddr')
-rw-r--r-- | drivers/ddr/altera/sequencer.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c index 06a3bf6..31e339b 100644 --- a/drivers/ddr/altera/sequencer.c +++ b/drivers/ddr/altera/sequencer.c @@ -15,8 +15,6 @@ * a proper thorough cleanup. */ #include "../../../board/altera/socfpga/qts/sequencer_auto.h" -#include "../../../board/altera/socfpga/qts/sequencer_auto_ac_init.h" -#include "../../../board/altera/socfpga/qts/sequencer_auto_inst_init.h" #include "../../../board/altera/socfpga/qts/sequencer_defines.h" static struct socfpga_sdr_rw_load_manager *sdr_rw_load_mgr_regs = @@ -3561,15 +3559,19 @@ static void debug_mem_calibrate(int pass) */ static void hc_initialize_rom_data(void) { + unsigned int nelem = 0; + const u32 *rom_init; u32 i, addr; + socfpga_get_seq_inst_init(&rom_init, &nelem); addr = SDR_PHYGRP_RWMGRGRP_ADDRESS | RW_MGR_INST_ROM_WRITE_OFFSET; - for (i = 0; i < ARRAY_SIZE(inst_rom_init); i++) - writel(inst_rom_init[i], addr + (i << 2)); + for (i = 0; i < nelem; i++) + writel(rom_init[i], addr + (i << 2)); + socfpga_get_seq_ac_init(&rom_init, &nelem); addr = SDR_PHYGRP_RWMGRGRP_ADDRESS | RW_MGR_AC_ROM_WRITE_OFFSET; - for (i = 0; i < ARRAY_SIZE(ac_rom_init); i++) - writel(ac_rom_init[i], addr + (i << 2)); + for (i = 0; i < nelem; i++) + writel(rom_init[i], addr + (i << 2)); } /** |