mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
3cb8bf3fc5
commit
7ce23bb6ef
1 changed files with 3 additions and 4 deletions
|
@ -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);
|
&sdr_rw_load_jump_mgr_regs->load_jump_add3);
|
||||||
|
|
||||||
tmp_bit_chk = 0;
|
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 */
|
/* reset the fifos to get pointers to known state */
|
||||||
writel(0, &phy_mgr_cmd->fifo_reset);
|
writel(0, &phy_mgr_cmd->fifo_reset);
|
||||||
writel(0, SDR_PHYGRP_RWMGRGRP_ADDRESS |
|
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);
|
base_rw_mgr = readl(SDR_PHYGRP_RWMGRGRP_ADDRESS);
|
||||||
tmp_bit_chk = tmp_bit_chk | (correct_mask_vg & ~(base_rw_mgr));
|
tmp_bit_chk = tmp_bit_chk | (correct_mask_vg & ~(base_rw_mgr));
|
||||||
|
|
||||||
if (vg == 0)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*bit_chk &= tmp_bit_chk;
|
*bit_chk &= tmp_bit_chk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue