Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: meson-mx-sdhc: Remove .card_hw_reset callback

Commit 32f18e596141 ("mmc: improve API to make clear hw_reset callback
is for cards") made it clear that the hw_reset callback is intended for
resetting the card. Remove the .card_hw_reset callback from the
meson-mx-sdhc-mmc driver because it's purpose is to reset the SDHC
controller (FIFOs, PHY, DMA interface, ...).

While here also rename and change the argument of meson_mx_sdhc_hw_reset
so it cannot be called by accident as a replacement for card_hw_reset in
the future.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20240217100200.1494980-3-martin.blumenstingl@googlemail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Martin Blumenstingl and committed by
Ulf Hansson
c0200efa 4c5e3efa

+5 -8
+5 -8
drivers/mmc/host/meson-mx-sdhc-mmc.c
··· 65 65 .max_register = MESON_SDHC_CLK2, 66 66 }; 67 67 68 - static void meson_mx_sdhc_hw_reset(struct mmc_host *mmc) 68 + static void meson_mx_sdhc_reset(struct meson_mx_sdhc_host *host) 69 69 { 70 - struct meson_mx_sdhc_host *host = mmc_priv(mmc); 71 - 72 70 regmap_write(host->regmap, MESON_SDHC_SRST, MESON_SDHC_SRST_MAIN_CTRL | 73 71 MESON_SDHC_SRST_RXFIFO | MESON_SDHC_SRST_TXFIFO | 74 72 MESON_SDHC_SRST_DPHY_RX | MESON_SDHC_SRST_DPHY_TX | ··· 114 116 dev_warn(mmc_dev(mmc), 115 117 "Failed to poll for CMD_BUSY while processing CMD%d\n", 116 118 host->cmd->opcode); 117 - meson_mx_sdhc_hw_reset(mmc); 119 + meson_mx_sdhc_reset(host); 118 120 } 119 121 120 122 ret = regmap_read_poll_timeout(host->regmap, MESON_SDHC_ESTA, esta, ··· 125 127 dev_warn(mmc_dev(mmc), 126 128 "Failed to poll for ESTA[13:11] while processing CMD%d\n", 127 129 host->cmd->opcode); 128 - meson_mx_sdhc_hw_reset(mmc); 130 + meson_mx_sdhc_reset(host); 129 131 } 130 132 } 131 133 ··· 493 495 } 494 496 495 497 static const struct mmc_host_ops meson_mx_sdhc_ops = { 496 - .card_hw_reset = meson_mx_sdhc_hw_reset, 497 498 .request = meson_mx_sdhc_request, 498 499 .set_ios = meson_mx_sdhc_set_ios, 499 500 .card_busy = meson_mx_sdhc_card_busy, ··· 615 618 } 616 619 617 620 if (cmd->error == -EIO || cmd->error == -ETIMEDOUT) 618 - meson_mx_sdhc_hw_reset(host->mmc); 621 + meson_mx_sdhc_reset(host); 619 622 else if (cmd->data) 620 623 /* 621 624 * Clear the FIFOs after completing data transfers to prevent ··· 725 728 { 726 729 struct meson_mx_sdhc_host *host = mmc_priv(mmc); 727 730 728 - meson_mx_sdhc_hw_reset(mmc); 731 + meson_mx_sdhc_reset(host); 729 732 730 733 regmap_write(host->regmap, MESON_SDHC_CTRL, 731 734 FIELD_PREP(MESON_SDHC_CTRL_RX_PERIOD, 0xf) |