mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 3/6] mci: sdhci: rockchip: Wait for transfer complete interrupt with MMC_RSP_BUSY cmd
Date: Thu, 7 May 2026 10:11:55 +0200	[thread overview]
Message-ID: <18ab93be-5095-49fa-befa-d6110dd9302b@pengutronix.de> (raw)
In-Reply-To: <20260507-rockchip-emmc-v1-3-5e8109e8059d@pengutronix.de>



On 5/7/26 9:02 AM, Sascha Hauer wrote:
> The MMC_RSP_BUSY flag indicates that we have to wait for the transfer
> completion interrupt. Other SDHCI drivers do this, but the rockchip driver
> missed it.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/mci/rockchip-dwcmshc-sdhci.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mci/rockchip-dwcmshc-sdhci.c b/drivers/mci/rockchip-dwcmshc-sdhci.c
> index 398c258fb9..2605a1368f 100644
> --- a/drivers/mci/rockchip-dwcmshc-sdhci.c
> +++ b/drivers/mci/rockchip-dwcmshc-sdhci.c
> @@ -251,7 +251,7 @@ static int rk_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd)
>  {
>  	struct rk_sdhci_host *host = to_rk_sdhci_host(mci);
>  	struct mci_data *data = cmd->data;
> -	u32 command, xfer;
> +	u32 mask, command, xfer;
>  	int ret;
>  	dma_addr_t dma;
>  
> @@ -261,6 +261,10 @@ static int rk_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd)
>  
>  	sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, ~0);
>  
> +	mask = SDHCI_INT_CMD_COMPLETE;
> +	if (cmd->resp_type & MMC_RSP_BUSY)
> +		mask |= SDHCI_INT_XFER_COMPLETE;
> +
>  	sdhci_write8(&host->sdhci, SDHCI_TIMEOUT_CONTROL, 0xe);
>  
>  	sdhci_setup_data_dma(&host->sdhci, data, &dma);
> @@ -274,7 +278,7 @@ static int rk_sdhci_send_cmd(struct mci_host *mci, struct mci_cmd *cmd)
>  	sdhci_write32(&host->sdhci, SDHCI_ARGUMENT, cmd->cmdarg);
>  	sdhci_write16(&host->sdhci, SDHCI_COMMAND, command);
>  
> -	ret = sdhci_wait_for_done(&host->sdhci, SDHCI_INT_CMD_COMPLETE);
> +	ret = sdhci_wait_for_done(&host->sdhci, mask);
>  	if (ret) {
>  		sdhci_teardown_data(&host->sdhci, data, dma);
>  		goto error;
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2026-05-07  8:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  7:02 [PATCH 0/6] mci: rockchip-dwcmshc: add HS200 support Sascha Hauer
2026-05-07  7:02 ` [PATCH 1/6] mci: sdhci: rockchip: set hidspd before re-enabling the clock Sascha Hauer
2026-05-07  8:05   ` Ahmad Fatoum
2026-05-07  7:02 ` [PATCH 2/6] mci: sdhci: rockchip: disable clock while setting DLL Sascha Hauer
2026-05-07  8:10   ` Ahmad Fatoum
2026-05-07  7:02 ` [PATCH 3/6] mci: sdhci: rockchip: Wait for transfer complete interrupt with MMC_RSP_BUSY cmd Sascha Hauer
2026-05-07  8:11   ` Ahmad Fatoum [this message]
2026-05-07  7:02 ` [PATCH 4/6] mci: sdhci: rockchip: Update pre-change delay for rockchip platform Sascha Hauer
2026-05-07  8:12   ` Ahmad Fatoum
2026-05-07  7:02 ` [PATCH 5/6] clk: composite: pick best parent for round_rate / set_rate Sascha Hauer
2026-05-07  7:02 ` [PATCH 6/6] mci: sdhci: rockchip: officially support HS200 Sascha Hauer
2026-05-07  8:15   ` Ahmad Fatoum
2026-05-07  8:36     ` Sascha Hauer
2026-05-07  7:47 ` [PATCH 0/6] mci: rockchip-dwcmshc: add HS200 support Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18ab93be-5095-49fa-befa-d6110dd9302b@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox