mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] i.MX53 sdhc
@ 2011-12-05  8:57 Sascha Hauer
  2011-12-05  8:57 ` [PATCH 1/3] mci imx esdhc: enable i.MX53 fix for i.MX51 aswell Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-12-05  8:57 UTC (permalink / raw)
  To: barebox

Some patches for improving i.MX53 sdhc support.

Sascha Hauer (3):
      mci imx esdhc: enable i.MX53 fix for i.MX51 aswell
      ARM i.MX53: Adjust MMC clock frequencies to 200MHz
      mci imx-esdhc: do not overwrite probed host caps

 arch/arm/mach-imx/imx53.c |    9 +++++++++
 drivers/mci/imx-esdhc.c   |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] mci imx esdhc: enable i.MX53 fix for i.MX51 aswell
  2011-12-05  8:57 [PATCH] i.MX53 sdhc Sascha Hauer
@ 2011-12-05  8:57 ` Sascha Hauer
  2011-12-05  8:57 ` [PATCH 2/3] ARM i.MX53: Adjust MMC clock frequencies to 200MHz Sascha Hauer
  2011-12-05  8:57 ` [PATCH 3/3] mci imx-esdhc: do not overwrite probed host caps Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-12-05  8:57 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mci/imx-esdhc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index a0e61f0..94b2738 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -107,7 +107,8 @@ u32 esdhc_xfertyp(struct mci_cmd *cmd, struct mci_data *data)
 		xfertyp |= XFERTYP_RSPTYP_48_BUSY;
 	else if (cmd->resp_type & MMC_RSP_PRESENT)
 		xfertyp |= XFERTYP_RSPTYP_48;
-	if (cpu_is_mx53() && cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
+	if ((cpu_is_mx51() || cpu_is_mx53()) &&
+			cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
 		xfertyp |= SDHCI_CMD_ABORTCMD;
 
 	return XFERTYP_CMD(cmd->cmdidx) | xfertyp;
-- 
1.7.7.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ARM i.MX53: Adjust MMC clock frequencies to 200MHz
  2011-12-05  8:57 [PATCH] i.MX53 sdhc Sascha Hauer
  2011-12-05  8:57 ` [PATCH 1/3] mci imx esdhc: enable i.MX53 fix for i.MX51 aswell Sascha Hauer
@ 2011-12-05  8:57 ` Sascha Hauer
  2011-12-05  8:57 ` [PATCH 3/3] mci imx-esdhc: do not overwrite probed host caps Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-12-05  8:57 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/imx53.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/imx53.c b/arch/arm/mach-imx/imx53.c
index 7f3c5ba..64bec86 100644
--- a/arch/arm/mach-imx/imx53.c
+++ b/arch/arm/mach-imx/imx53.c
@@ -173,6 +173,15 @@ int mx53_init_lowlevel(void)
 	r = readl(ccm + MX5_CCM_CSCDR1);
 	r &= ~0x3f;
 	r |= 0x0a;
+
+	r &= ~MX5_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK;
+	r &= ~MX5_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK;
+	r |= 1 << MX5_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET;
+
+	r &= ~MX5_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_MASK;
+	r &= ~MX5_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_MASK;
+	r |= 1 << MX5_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_OFFSET;
+
 	writel(r, ccm + MX5_CCM_CSCDR1);
 
 	/* Restore the default values in the Gate registers */
-- 
1.7.7.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] mci imx-esdhc: do not overwrite probed host caps
  2011-12-05  8:57 [PATCH] i.MX53 sdhc Sascha Hauer
  2011-12-05  8:57 ` [PATCH 1/3] mci imx esdhc: enable i.MX53 fix for i.MX51 aswell Sascha Hauer
  2011-12-05  8:57 ` [PATCH 2/3] ARM i.MX53: Adjust MMC clock frequencies to 200MHz Sascha Hauer
@ 2011-12-05  8:57 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-12-05  8:57 UTC (permalink / raw)
  To: barebox

The caps are read from the hardware but overwritten afterwards.
Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mci/imx-esdhc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 94b2738..d19b6da 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -485,7 +485,6 @@ static int fsl_esdhc_probe(struct device_d *dev)
 	host->mci.send_cmd = esdhc_send_cmd;
 	host->mci.set_ios = esdhc_set_ios;
 	host->mci.init = esdhc_init;
-	host->mci.host_caps = MMC_MODE_4BIT;
 	host->mci.hw_dev = dev;
 
 	host->mci.voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
-- 
1.7.7.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-05  8:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05  8:57 [PATCH] i.MX53 sdhc Sascha Hauer
2011-12-05  8:57 ` [PATCH 1/3] mci imx esdhc: enable i.MX53 fix for i.MX51 aswell Sascha Hauer
2011-12-05  8:57 ` [PATCH 2/3] ARM i.MX53: Adjust MMC clock frequencies to 200MHz Sascha Hauer
2011-12-05  8:57 ` [PATCH 3/3] mci imx-esdhc: do not overwrite probed host caps Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox