From: Michael Tretter <m.tretter@pengutronix.de> To: Michael Graichen <michael.graichen@hotmail.com> Cc: barebox@lists.infradead.org, m.tretter@pengutronix.de Subject: [PATCH 1/2] mci: arasan: wait for data available only on read Date: Wed, 19 May 2021 09:38:54 +0200 Message-ID: <20210519073855.2748231-1-m.tretter@pengutronix.de> (raw) In-Reply-To: <AM9P192MB0870DC1573A4088BB839A208AB2C9@AM9P192MB0870.EURP192.PROD.OUTLOOK.COM> Only READ data transfers actually send a data available interrupt. Therefore, check if the transfer is a read and wait for the data only in this case. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> --- Hi Michael, On Tue, 18 May 2021 08:09:47 +0000, Michael Graichen wrote: > > This looks familiar. I have a similar patch that sets SDHCI_INT_DATA_AVAIL > > only if the command is a READ, but I didn't yet have time to verify, that this > > is the correct fix. > > Can you please send it to me? Here you are. I am not sure, if the fix is correct. I also added another patch to handle situations where data is NULL, but I am not entirely sure about that one either. Michael --- drivers/mci/arasan-sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c index 520bf30ff952..399966e8cf10 100644 --- a/drivers/mci/arasan-sdhci.c +++ b/drivers/mci/arasan-sdhci.c @@ -277,7 +277,7 @@ static int arasan_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 (data) + if (data && data->flags == MMC_DATA_READ) mask |= SDHCI_INT_DATA_AVAIL; sdhci_set_cmd_xfer_mode(&host->sdhci, cmd, data, false, &command, &xfer); -- 2.29.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-05-19 7:40 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-03 10:07 [PATCH 1/1] Zynq: add support to chainload another barebox Michael Graichen 2021-05-05 8:15 ` Lucas Stach 2021-05-05 8:27 ` Ahmad Fatoum 2021-05-05 9:40 ` AW: " Michael Graichen 2021-05-17 8:23 ` Michael Tretter 2021-05-18 8:09 ` AW: " Michael Graichen 2021-05-19 7:38 ` Michael Tretter [this message] 2021-05-19 7:38 ` [PATCH 2/2] mci: arasan: configure data transfer only if we actually have data Michael Tretter 2021-05-25 7:17 ` Sascha Hauer 2021-05-25 7:16 ` [PATCH 1/2] mci: arasan: wait for data available only on read Sascha Hauer
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=20210519073855.2748231-1-m.tretter@pengutronix.de \ --to=m.tretter@pengutronix.de \ --cc=barebox@lists.infradead.org \ --cc=michael.graichen@hotmail.com \ /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
mail archive of the barebox mailing list This inbox may be cloned and mirrored by anyone: git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \ barebox@lists.infradead.org barebox@lists.infradead.org public-inbox-index barebox Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git