* [PATCH] mci: bcm2835: Don't send MMC_CMD_GO_IDLE_STATE at the end of .init()
@ 2021-11-30 20:30 Uwe Kleine-König
2021-12-07 9:08 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2021-11-30 20:30 UTC (permalink / raw)
To: barebox
The core sends this command anyhow shortly after calling .init(). So
doing it in bcm2835_mci_reset() is only overhead if it succeeds and
if there is a problem it is noticed a tad earlier which has little
benefit compared to the timeout in bcm2835_mci_wait_command_done().
So simplify and drop the transfer.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/mci/mci-bcm2835.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
index 4913dc27f8a3..10f588930cda 100644
--- a/drivers/mci/mci-bcm2835.c
+++ b/drivers/mci/mci-bcm2835.c
@@ -352,10 +352,7 @@ static int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev)
sdhci_write32(&host->sdhci, SDHCI_INT_STATUS,
0xFFFFFFFF);
- /*Now write command 0 and see if we get response*/
- sdhci_write32(&host->sdhci, SDHCI_ARGUMENT, 0x0);
- sdhci_write32(&host->sdhci, SDHCI_TRANSFER_MODE__COMMAND, 0x0);
- return bcm2835_mci_wait_command_done(host);
+ return 0;
}
static int bcm2835_mci_probe(struct device_d *hw_dev)
base-commit: f2dd8896846757829fb3033f41b89be3fc037d78
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mci: bcm2835: Don't send MMC_CMD_GO_IDLE_STATE at the end of .init()
2021-11-30 20:30 [PATCH] mci: bcm2835: Don't send MMC_CMD_GO_IDLE_STATE at the end of .init() Uwe Kleine-König
@ 2021-12-07 9:08 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-12-07 9:08 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Tue, Nov 30, 2021 at 09:30:26PM +0100, Uwe Kleine-König wrote:
> The core sends this command anyhow shortly after calling .init(). So
> doing it in bcm2835_mci_reset() is only overhead if it succeeds and
> if there is a problem it is noticed a tad earlier which has little
> benefit compared to the timeout in bcm2835_mci_wait_command_done().
>
> So simplify and drop the transfer.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/mci/mci-bcm2835.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c
> index 4913dc27f8a3..10f588930cda 100644
> --- a/drivers/mci/mci-bcm2835.c
> +++ b/drivers/mci/mci-bcm2835.c
> @@ -352,10 +352,7 @@ static int bcm2835_mci_reset(struct mci_host *mci, struct device_d *mci_dev)
> sdhci_write32(&host->sdhci, SDHCI_INT_STATUS,
> 0xFFFFFFFF);
>
> - /*Now write command 0 and see if we get response*/
> - sdhci_write32(&host->sdhci, SDHCI_ARGUMENT, 0x0);
> - sdhci_write32(&host->sdhci, SDHCI_TRANSFER_MODE__COMMAND, 0x0);
> - return bcm2835_mci_wait_command_done(host);
> + return 0;
> }
>
> static int bcm2835_mci_probe(struct device_d *hw_dev)
>
> base-commit: f2dd8896846757829fb3033f41b89be3fc037d78
> --
> 2.30.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-07 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 20:30 [PATCH] mci: bcm2835: Don't send MMC_CMD_GO_IDLE_STATE at the end of .init() Uwe Kleine-König
2021-12-07 9:08 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox