diff options
author | Marek Vasut <marex@denx.de> | 2015-07-20 07:33:33 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-08-08 14:14:15 +0200 |
commit | 4b0ac26a15a74664e51b49f1698fc42776edd3bc (patch) | |
tree | bfe81a0435e6addaab1b5de902a06b79609eb1db | |
parent | 16502a0b2bcea3e2aa8736871f350196cab262fe (diff) |
ddr: altera: Clean up mem_precharge_and_activate()
Perform minor cleanup of this function, fix datatype and add kerneldoc.
Signed-off-by: Marek Vasut <marex@denx.de>
-rw-r--r-- | drivers/ddr/altera/sequencer.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c index a215c20d0d..b0105432bf 100644 --- a/drivers/ddr/altera/sequencer.c +++ b/drivers/ddr/altera/sequencer.c @@ -3091,21 +3091,24 @@ static uint32_t rw_mgr_mem_calibrate_writes(uint32_t rank_bgn, uint32_t g, return 1; } -/* precharge all banks and activate row 0 in bank "000..." and bank "111..." */ +/** + * mem_precharge_and_activate() - Precharge all banks and activate + * + * Precharge all banks and activate row 0 in bank "000..." and bank "111...". + */ static void mem_precharge_and_activate(void) { - uint32_t r; + int r; for (r = 0; r < RW_MGR_MEM_NUMBER_OF_RANKS; r++) { - if (param->skip_ranks[r]) { - /* request to skip the rank */ + /* Test if the rank should be skipped. */ + if (param->skip_ranks[r]) continue; - } - /* set rank */ + /* Set rank. */ set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_OFF); - /* precharge all banks ... */ + /* Precharge all banks. */ writel(RW_MGR_PRECHARGE_ALL, SDR_PHYGRP_RWMGRGRP_ADDRESS | RW_MGR_RUN_SINGLE_GROUP_OFFSET); @@ -3117,7 +3120,7 @@ static void mem_precharge_and_activate(void) writel(RW_MGR_ACTIVATE_0_AND_1_WAIT2, &sdr_rw_load_jump_mgr_regs->load_jump_add1); - /* activate rows */ + /* Activate rows. */ writel(RW_MGR_ACTIVATE_0_AND_1, SDR_PHYGRP_RWMGRGRP_ADDRESS | RW_MGR_RUN_SINGLE_GROUP_OFFSET); } |