]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/ddr/altera/sequencer.c
ddr: altera: Clean up rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase() part 3
[people/ms/u-boot.git] / drivers / ddr / altera / sequencer.c
index a9f31d423bf8fdb80644f4351cc05f43af2f890a..3d975f99fb76ce0ddf5e5bd082e7a2d837235f42 100644 (file)
@@ -1630,21 +1630,10 @@ static uint32_t rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase(u32 grp)
 
                debug_cond(DLEVEL == 2, "%s:%d p: ptap=%u\n",
                           __func__, __LINE__, p);
-       } else {
-               /*
-                * Step 3-5b: Find the right edge of the window
-                *            using delay taps.
-                */
-               debug_cond(DLEVEL == 2,
-                          "%s:%d ptap=%u dtap=%u bgn=%u\n",
-                          __func__, __LINE__, p, d, work_bgn);
-
-               work_end = work_bgn;
        }
 
        /* The dtap increment to find the failing edge is done here. */
-       for (; d <= IO_DQS_EN_DELAY_MAX;
-            d++, work_end += IO_DELAY_PER_DQS_EN_DCHAIN_TAP) {
+       for (; d <= IO_DQS_EN_DELAY_MAX; d++) {
                debug_cond(DLEVEL == 2, "%s:%d end-2: dtap=%u\n",
                           __func__, __LINE__, d);
 
@@ -1655,6 +1644,8 @@ static uint32_t rw_mgr_mem_calibrate_vfifo_find_dqs_en_phase(u32 grp)
                                                              &bit_chk, 0)) {
                        break;
                }
+
+               work_end += IO_DELAY_PER_DQS_EN_DCHAIN_TAP;
        }
 
        /* Go back to working dtap */