Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37996 )
Change subject: soc/mediatek/mt8183: do TX tracking for DRAM DVFS feature
......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37996/9/src/soc/mediatek/mt8183/dra...
File src/soc/mediatek/mt8183/dramc_pi_calibration_api.c:
https://review.coreboot.org/c/coreboot/+/37996/9/src/soc/mediatek/mt8183/dra...
PS9, Line 2139: while (!wait_us(10, read32(&ch[chn].nao.spcmdresp) & (0x1 << 10))) {
Sorry for the late replay. […]
Paul, wait_us() is a convenience wrapper around the stopwatch framework (see https://review.coreboot.org/cgit/coreboot.git/tree/src/include/timer.h#n200) that is designed specifically for situations like this. It is the preferred way of handling "wait for a state change or timeout" cases like this.
And, yes, it should just be
if (!wait_us(100, ...))
dramc_err(...);
There's no need to put another loop around it.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/37996
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idcf9213a488e795df3faf64b03588cfe55cb2f81
Gerrit-Change-Number: 37996
Gerrit-PatchSet: 10
Gerrit-Owner: huayang duan
huayangduan@gmail.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Duan huayang
huayang.duan@mediatek.com
Gerrit-Reviewer: Hung-Te Lin
hungte@chromium.org
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Yu-Ping Wu
yupingso@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Reviewer: huayang duan
huayangduan@gmail.com
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Wed, 04 Mar 2020 22:36:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Menzel
paulepanter@users.sourceforge.net
Comment-In-Reply-To: Yu-Ping Wu
yupingso@google.com
Comment-In-Reply-To: Duan huayang
huayang.duan@mediatek.com
Gerrit-MessageType: comment