Yu-Ping Wu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35749 )
Change subject: mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/1
diff --git a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c index f8b1f09..794e4f0 100644 --- a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c +++ b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c @@ -607,9 +607,10 @@ return result; }
-static void dramc_engine2_end(u8 chn) +static void dramc_engine2_end(u8 chn, u32 dummy_rd) { clrbits_le32(&ch[chn].ao.test2_4, 0x1 << 17); + write32(&ch[chn].ao.dummy_rd, dummy_rd); }
static bool dramc_find_gating_window(u32 result_r, u32 result_f, u32 *debug_cnt, @@ -995,8 +996,7 @@ } }
- dramc_engine2_end(chn); - write32(&ch[chn].ao.dummy_rd, dummy_rd_backup); + dramc_engine2_end(chn, dummy_rd_backup);
for (dqs = 0; dqs < DQS_NUMBER; dqs++) { pass_count[dqs] = dqs_transition[dqs]; @@ -1811,12 +1811,10 @@ break; }
- if (type == RX_WIN_RD_DQC) { + if (type == RX_WIN_RD_DQC) dramc_rx_rd_dqc_end(chn); - } else { - dramc_engine2_end(chn); - write32(&ch[chn].ao.dummy_rd, dummy_rd_bak_engine2); - } + else + dramc_engine2_end(chn, dummy_rd_bak_engine2);
if (vref_scan_enable && type == RX_WIN_TEST_ENG) dramc_set_vref(chn, rank, type, vref_dly.best_vref); @@ -1895,8 +1893,7 @@ dramc_dbg("Datlat=%2d, err_value=0x%4x, sum=%d\n", datlat, err, sum); }
- dramc_engine2_end(chn); - write32(&ch[chn].ao.dummy_rd, dummy_rd_backup); + dramc_engine2_end(chn, dummy_rd_backup);
assert(sum != 0);
Hello Julius Werner, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#2).
Change subject: mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35749 )
Change subject: mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
Patch Set 3: Code-Review+2
Hello Julius Werner, huayang duan, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#4).
Change subject: mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/4
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35749 )
Change subject: mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35749/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35749/4//COMMIT_MSG@7 PS4, Line 7: mediatek/mt8183 nit: soc/mediatek/mt8183
Hello Julius Werner, huayang duan, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#5).
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
soc/mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/5
Hello Julius Werner, huayang duan, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#6).
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
soc/mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/6
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35749 )
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
Patch Set 6: Code-Review+2
Hello Julius Werner, huayang duan, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#8).
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
soc/mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/8
Hello Julius Werner, huayang duan, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#9).
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
soc/mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/9
Hello Julius Werner, huayang duan, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35749
to look at the new patch set (#10).
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
soc/mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/35749/10
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35749 )
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35749/11//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/35749/11//COMMIT_MSG@14 PS11, Line 14: none nit: BRANCH=kukui
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35749 )
Change subject: soc/mediatek/mt8183: Simplify usage of dramc_engine2_end ......................................................................
soc/mediatek/mt8183: Simplify usage of dramc_engine2_end
Since we always write to &ch[chn].ao.dummy_rd after calling dramc_engine2_end(), this write could be merged into dramc_engine2_end() to simplify code.
BUG=none BRANCH=none TEST=emerge-kukui coreboot
Change-Id: Ibb4bd5ed016118811ad2097098417c19f00f4263 Signed-off-by: Yu-Ping Wu yupingso@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/35749 Reviewed-by: Hung-Te Lin hungte@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/mt8183/dramc_pi_calibration_api.c 1 file changed, 7 insertions(+), 10 deletions(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c index f8b1f09..794e4f0 100644 --- a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c +++ b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c @@ -607,9 +607,10 @@ return result; }
-static void dramc_engine2_end(u8 chn) +static void dramc_engine2_end(u8 chn, u32 dummy_rd) { clrbits_le32(&ch[chn].ao.test2_4, 0x1 << 17); + write32(&ch[chn].ao.dummy_rd, dummy_rd); }
static bool dramc_find_gating_window(u32 result_r, u32 result_f, u32 *debug_cnt, @@ -995,8 +996,7 @@ } }
- dramc_engine2_end(chn); - write32(&ch[chn].ao.dummy_rd, dummy_rd_backup); + dramc_engine2_end(chn, dummy_rd_backup);
for (dqs = 0; dqs < DQS_NUMBER; dqs++) { pass_count[dqs] = dqs_transition[dqs]; @@ -1811,12 +1811,10 @@ break; }
- if (type == RX_WIN_RD_DQC) { + if (type == RX_WIN_RD_DQC) dramc_rx_rd_dqc_end(chn); - } else { - dramc_engine2_end(chn); - write32(&ch[chn].ao.dummy_rd, dummy_rd_bak_engine2); - } + else + dramc_engine2_end(chn, dummy_rd_bak_engine2);
if (vref_scan_enable && type == RX_WIN_TEST_ENG) dramc_set_vref(chn, rank, type, vref_dly.best_vref); @@ -1895,8 +1893,7 @@ dramc_dbg("Datlat=%2d, err_value=0x%4x, sum=%d\n", datlat, err, sum); }
- dramc_engine2_end(chn); - write32(&ch[chn].ao.dummy_rd, dummy_rd_backup); + dramc_engine2_end(chn, dummy_rd_backup);
assert(sum != 0);