summaryrefslogtreecommitdiff
path: root/drivers/ddr/altera/sequencer.h
Commit message (Collapse)AuthorAgeLines
* ddr: altera: sequencer: Zap SEQ_T(INIT|RESET)_CNTR._VALMarek Vasut2015-08-08-45/+0
| | | | | | | | | This is another macro used to obfuscate the real code. The T(INIT|RESET)_CNTR._VAL is always defined, so this indirection is unnecessary. Get rid of this. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* ddr: altera: sequencer: Zap VFIFO_SIZEMarek Vasut2015-08-08-3/+0
| | | | | | | Just use READ_VALID_FIFO_SIZE directly, no need for this macro obfuscation. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* ddr: altera: sequencer: Pluck out RW_MGR_* macros from codeMarek Vasut2015-08-08-8/+8
| | | | | | | | | Actually convert the sequencer code to use socfpga_sdram_rw_mgr_config instead of the RW_MGR_* macros. This is just an sed exercise here, no manual coding needed. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* ddr: altera: sequencer: Zap bogus redefinition of RW_MGR_MEM_NUMBER_OF_RANKSMarek Vasut2015-08-08-1/+0
| | | | | | | | This is defined in the QTS-generated headers, so it must not be re-defined in sequencer.h . Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* ddr: altera: sequencer: Zap unused params and macrosMarek Vasut2015-08-08-27/+4
| | | | | | | | These parameters are not used in the code, zap them and the macros which are used by them as well. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* ddr: altera: Clean up mem_config()Marek Vasut2015-08-08-4/+0
| | | | | | | | | | | Clean mem_config() function. First, reorder the math done in the function such that WLAT and RLAT computation is together. Then, scrap contradictory comments which do not match the result of the math at all. Next, extract the mem_precharge_and_activate() call from the end of the function as it is completely unrelated here. Finally, rename the function to mem_init_latency(). Signed-off-by: Marek Vasut <marex@denx.de>
* ddr: altera: Stop using SDR_CTRLGRP_ADDRESS directlyMarek Vasut2015-08-08-4/+0
| | | | | | | Use the proper structure which describes these registers, especially since this is already in place. Signed-off-by: Marek Vasut <marex@denx.de>
* ddr: altera: Wrap SOCFPGA_SDR_ADDRESS into SDR_PHYGRP.*ADDRESSMarek Vasut2015-08-08-5/+5
| | | | | | | Just trim down the constant SOCFPGA_SDR_ADDRESS + SDR_PHYGRP.*ADDRESS in the code. Signed-off-by: Marek Vasut <marex@denx.de>
* ddr: altera: Pluck out remaining sdr_get_addr() callsMarek Vasut2015-08-08-34/+19
| | | | | | | Remove the remaining invocations of sdr_get_addr() and the function itself. This makes the code a bit less cryptic. Signed-off-by: Marek Vasut <marex@denx.de>
* driver/ddr/altera: Add the sdram calibration portionDinh Nguyen2015-08-08-0/+322
This patch adds the DDR calibration portion of the Altera SDRAM driver. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>