mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-24 16:11:33 +00:00
ddr: altera: Clean up of delay_for_n_mem_clocks() part 4
Simplify the loop code, optimizing compiler can deal with this. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
6a39be6ca9
commit
0c1b81bdf3
1 changed files with 5 additions and 12 deletions
|
@ -822,19 +822,12 @@ static void delay_for_n_mem_clocks(const u32 clocks)
|
||||||
writel(RW_MGR_IDLE_LOOP2,
|
writel(RW_MGR_IDLE_LOOP2,
|
||||||
&sdr_rw_load_jump_mgr_regs->load_jump_add1);
|
&sdr_rw_load_jump_mgr_regs->load_jump_add1);
|
||||||
|
|
||||||
/* hack to get around compiler not being smart enough */
|
|
||||||
if (afi_clocks <= 0x10000) {
|
|
||||||
/* only need to run once */
|
|
||||||
writel(RW_MGR_IDLE_LOOP2, SDR_PHYGRP_RWMGRGRP_ADDRESS |
|
|
||||||
RW_MGR_RUN_SINGLE_GROUP_OFFSET);
|
|
||||||
} else {
|
|
||||||
do {
|
do {
|
||||||
writel(RW_MGR_IDLE_LOOP2,
|
writel(RW_MGR_IDLE_LOOP2,
|
||||||
SDR_PHYGRP_RWMGRGRP_ADDRESS |
|
SDR_PHYGRP_RWMGRGRP_ADDRESS |
|
||||||
RW_MGR_RUN_SINGLE_GROUP_OFFSET);
|
RW_MGR_RUN_SINGLE_GROUP_OFFSET);
|
||||||
} while (c_loop-- != 0);
|
} while (c_loop-- != 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
debug("%s:%d clocks=%u ... end\n", __func__, __LINE__, clocks);
|
debug("%s:%d clocks=%u ... end\n", __func__, __LINE__, clocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue