mirror of
https://github.com/apache/nuttx.git
synced 2026-08-08 22:17:18 +00:00
arch/risc-v/src/mpfs/mpfs_ddr.c: Don't auto-determine the write latency
It doesn't make sense to try to auto-determine write latency, it may pass with too low value. Keep the existing implementation if the write latency has been set to minimum value, otherwise just set it. Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
parent
8fb2e41994
commit
d38eebc0e9
1 changed files with 11 additions and 3 deletions
|
|
@ -3725,14 +3725,22 @@ static int mpfs_training_write_calibration(struct mpfs_ddr_priv_s *priv)
|
|||
|
||||
#endif
|
||||
|
||||
/* Find the proper write latency by using mtc test */
|
||||
if (LIBERO_SETTING_CFG_WRITE_LATENCY_SET == 0)
|
||||
{
|
||||
/* Find the proper write latency by using mtc test */
|
||||
|
||||
do
|
||||
do
|
||||
{
|
||||
putreg32(write_latency, MPFS_DDR_CSR_APB_CFG_DFI_T_PHY_WRLAT);
|
||||
error = mpfs_write_calibration_using_mtc(priv);
|
||||
}
|
||||
while (error && ++write_latency <= WR_LATENCY_MAX);
|
||||
}
|
||||
else
|
||||
{
|
||||
putreg32(write_latency, MPFS_DDR_CSR_APB_CFG_DFI_T_PHY_WRLAT);
|
||||
error = mpfs_write_calibration_using_mtc(priv);
|
||||
}
|
||||
while (error && ++write_latency <= WR_LATENCY_MAX);
|
||||
|
||||
/* Return error if mtc test failed on all allowed latency values */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue