summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2025-08-20 11:48:01 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2025-08-20 18:41:31 +0200
commit5d0702dc9c2f6700140b7366dd9ec6c78cde3aa1 (patch)
tree62a815f50ba82d105ea9e7d70aaa47b75b93ab67 /drivers/mmc
parentdd7ddd082206f675e967c205df2a35b9c4e64949 (diff)
mmc: renesas_sdhi: Replace magic number '0xff' in renesas_sdhi_set_clock()
Replace the magic number '0xff' with CLK_CTL_DIV_MASK macro for finding actual clock in renesas_sdhi_set_clock(). Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20250820104808.94562-1-biju.das.jz@bp.renesas.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/renesas_sdhi_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index a41291a28e9b..f56fa2cd208d 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -223,7 +223,7 @@ static void renesas_sdhi_set_clock(struct tmio_mmc_host *host,
}
clock = clk & CLK_CTL_DIV_MASK;
- if (clock != 0xff)
+ if (clock != CLK_CTL_DIV_MASK)
host->mmc->actual_clock /= (1 << (ffs(clock) + 1));
sd_ctrl_write16(host, CTL_SD_CARD_CLK_CTL, clock);