* [PATCH] MMC: IMX: Reset MMC_BOOT register after controller reset.
@ 2015-01-17 12:54 Andrey Panov
2015-01-19 7:38 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Panov @ 2015-01-17 12:54 UTC (permalink / raw)
To: barebox
This helps with EMMC detection when booting from EMMC directly.
Taken from u-boot.
Signed-off-by: Andrey Panov <rockford@yandex.ru>
---
drivers/mci/imx-esdhc.c | 3 +++
drivers/mci/sdhci.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 239cd37..23bdc1f 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -471,6 +471,9 @@ static int esdhc_init(struct mci_host *mci, struct device_d *dev)
esdhc_write32(regs + SDHCI_CLOCK_CONTROL__TIMEOUT_CONTROL__SOFTWARE_RESET,
SYSCTL_HCKEN | SYSCTL_IPGEN);
+ /* RSTA doesn't reset MMC_BOOT register, so manually reset it */
+ esdhc_write32(regs + SDHCI_MMC_BOOT, 0);
+
/* Set the initial clock speed */
set_sysctl(mci, 400000);
diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h
index b678184..82a692e 100644
--- a/drivers/mci/sdhci.h
+++ b/drivers/mci/sdhci.h
@@ -18,6 +18,7 @@
#define SDHCI_SIGNAL_ENABLE 0x38
#define SDHCI_ACMD12_ERR__HOST_CONTROL2 0x3C
#define SDHCI_CAPABILITIES 0x40
+#define SDHCI_MMC_BOOT 0xC4
#define COMMAND_CMD(x) ((x & 0x3f) << 24)
#define COMMAND_CMDTYP_NORMAL 0x0
--
2.1.4
_______________________________________________
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] MMC: IMX: Reset MMC_BOOT register after controller reset.
2015-01-17 12:54 [PATCH] MMC: IMX: Reset MMC_BOOT register after controller reset Andrey Panov
@ 2015-01-19 7:38 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-01-19 7:38 UTC (permalink / raw)
To: Andrey Panov; +Cc: barebox
On Sat, Jan 17, 2015 at 03:54:35PM +0300, Andrey Panov wrote:
> This helps with EMMC detection when booting from EMMC directly.
> Taken from u-boot.
>
> Signed-off-by: Andrey Panov <rockford@yandex.ru>
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 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:[~2015-01-19 7:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-17 12:54 [PATCH] MMC: IMX: Reset MMC_BOOT register after controller reset Andrey Panov
2015-01-19 7:38 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox