summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@google.com>2019-08-29 10:54:14 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-09-02 06:42:08 +0000
commita39cd99b2674f772ba919b972cbbc1f8e604e69a (patch)
treecdd3a1401c67101151b6535b916f84de55cd4316 /src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
parent4822630c0cdbb868e1780a17c824887c2f72a211 (diff)
downloadcoreboot-a39cd99b2674f772ba919b972cbbc1f8e604e69a.tar.xz
mediatek/mt8183: Remove unnecessary parentheses
Parentheses are unnecessary for conditions like '(a == b) || (c == d)'. Change-Id: I0c554bf1577b40286f7a51a8fc5804bdbb7c8bd1 Signed-off-by: Yu-Ping Wu <yupingso@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35142 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Huayang Duan <huayang.duan@mediatek.corp-partner.google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8183/dramc_pi_calibration_api.c')
-rw-r--r--src/soc/mediatek/mt8183/dramc_pi_calibration_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
index 05f793ec4b..e8ee818f6b 100644
--- a/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
+++ b/src/soc/mediatek/mt8183/dramc_pi_calibration_api.c
@@ -1378,7 +1378,7 @@ static bool dramc_calc_best_dly(u8 bit,
static void dramc_set_dqdqs_dly(u8 chn, u8 rank, enum CAL_TYPE type, s32 dly)
{
- if ((type == RX_WIN_RD_DQC) || (type == RX_WIN_TEST_ENG))
+ if (type == RX_WIN_RD_DQC || type == RX_WIN_TEST_ENG)
dramc_set_rx_dly(chn, rank, dly);
else
dramc_set_tx_dly_factor(chn, rank, type, dly);
@@ -1553,7 +1553,7 @@ static u8 dramc_window_perbit_cal(u8 chn, u8 rank,
dramc_dbg("[channel %d] [rank %d] type:%d, vref_enable:%d\n",
chn, rank, type, vref_scan_enable);
- if ((type == TX_WIN_DQ_ONLY) || (type == TX_WIN_DQ_DQM)) {
+ if (type == TX_WIN_DQ_ONLY || type == TX_WIN_DQ_DQM) {
for (size_t i = 0; i < 2; i++) {
write32(&ch[chn].phy.shu[0].rk[rank].b[i].dq[0], 0);
clrbits_le32(&ch[chn].phy.shu[0].rk[rank].b[i].dq[1],
@@ -1592,7 +1592,7 @@ static u8 dramc_window_perbit_cal(u8 chn, u8 rank,
if (vref_scan_enable)
dramc_set_vref(chn, rank, type, vref_dly.vref);
- if ((type == RX_WIN_RD_DQC) || (type == RX_WIN_TEST_ENG)) {
+ if (type == RX_WIN_RD_DQC || type == RX_WIN_TEST_ENG) {
dramc_set_rx_dly_factor(chn, rank,
RX_DQM, FIRST_DQ_DELAY);
dramc_set_rx_dly_factor(chn, rank,
@@ -1666,7 +1666,7 @@ static u8 dramc_window_perbit_cal(u8 chn, u8 rank,
if (vref_scan_enable)
dramc_set_vref(chn, rank, type, vref_dly.vref);
- if ((type == RX_WIN_RD_DQC) || (type == RX_WIN_TEST_ENG))
+ if (type == RX_WIN_RD_DQC || type == RX_WIN_TEST_ENG)
dramc_set_rx_best_dly(chn, rank, vref_dly.perbit_dly);
else
dramc_set_tx_best_dly(chn, rank, vref_dly.perbit_dly,