diff options
author | Marek Vasut <marex@denx.de> | 2015-07-19 05:51:17 (GMT) |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-08-08 12:14:21 (GMT) |
commit | 7ce23bb6efc21ab3a041d0324f25a6e15492fb61 (patch) | |
tree | 17a4129fe9b1a35ae86b8d65a6cd9f7462ca4a1e /drivers/ddr/altera | |
parent | 3cb8bf3fc50ebea58be4fcd81f86d5323c9b3206 (diff) | |
download | u-boot-7ce23bb6efc21ab3a041d0324f25a6e15492fb61.tar.xz |
ddr: altera: Clean up rw_mgr_mem_calibrate_read_test() part 3
The C language has signed types, so make use of them. Fix this
obscene loop, which tries to do away with unsigned type, but
just makes the code more cryptic.
Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/ddr/altera')
-rw-r--r-- | drivers/ddr/altera/sequencer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c index 76d141a..c03fae1 100644 --- a/drivers/ddr/altera/sequencer.c +++ b/drivers/ddr/altera/sequencer.c @@ -1232,7 +1232,8 @@ rw_mgr_mem_calibrate_read_test(const u32 rank_bgn, const u32 group, &sdr_rw_load_jump_mgr_regs->load_jump_add3); tmp_bit_chk = 0; - for (vg = RW_MGR_MEM_VIRTUAL_GROUPS_PER_READ_DQS-1; ; vg--) { + for (vg = RW_MGR_MEM_VIRTUAL_GROUPS_PER_READ_DQS - 1; vg >= 0; + vg--) { /* reset the fifos to get pointers to known state */ writel(0, &phy_mgr_cmd->fifo_reset); writel(0, SDR_PHYGRP_RWMGRGRP_ADDRESS | @@ -1252,10 +1253,8 @@ rw_mgr_mem_calibrate_read_test(const u32 rank_bgn, const u32 group, base_rw_mgr = readl(SDR_PHYGRP_RWMGRGRP_ADDRESS); tmp_bit_chk = tmp_bit_chk | (correct_mask_vg & ~(base_rw_mgr)); - - if (vg == 0) - break; } + *bit_chk &= tmp_bit_chk; } |