From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/7] mmc i.MX esdhc: Add i.MX6 support
Date: Fri, 13 Apr 2012 15:54:30 +0200 [thread overview]
Message-ID: <1334325273-1701-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1334325273-1701-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mci/imx-esdhc.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c
index 6d0883c..ae3c805 100644
--- a/drivers/mci/imx-esdhc.c
+++ b/drivers/mci/imx-esdhc.c
@@ -24,7 +24,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
-
#include <config.h>
#include <common.h>
#include <driver.h>
@@ -60,7 +59,8 @@ struct fsl_esdhc {
u32 autoc12err;
u32 hostcapblt;
u32 wml;
- char reserved1[8];
+ u32 mixctrl;
+ char reserved1[4];
u32 fevt;
char reserved2[168];
u32 hostver;
@@ -234,7 +234,7 @@ static int esdhc_setup_data(struct mci_host *mci, struct mci_data *data)
static int
esdhc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
{
- u32 xfertyp;
+ u32 xfertyp, mixctrl;
u32 irqstat;
struct fsl_esdhc_host *host = to_fsl_esdhc(mci);
struct fsl_esdhc *regs = host->regs;
@@ -266,6 +266,15 @@ esdhc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data)
/* Send the command */
esdhc_write32(®s->cmdarg, cmd->cmdarg);
+
+ if (cpu_is_mx6()) {
+ /* write lower-half of xfertyp to mixctrl */
+ mixctrl = xfertyp & 0xFFFF;
+ /* Keep the bits 22-25 of the register as is */
+ mixctrl |= (esdhc_read32(®s->mixctrl) & (0xF << 22));
+ esdhc_write32(®s->mixctrl, mixctrl);
+ }
+
esdhc_write32(®s->xfertyp, xfertyp);
/* Wait for the command to complete */
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-04-13 13:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 13:54 initial " Sascha Hauer
2012-04-13 13:54 ` [PATCH 1/7] ARM: add " Sascha Hauer
2012-04-14 11:41 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 13:19 ` Sascha Hauer
[not found] ` <20120414161123.GB30672@game.jcrosoft.org>
2012-04-14 20:13 ` Sascha Hauer
2012-04-15 1:31 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-15 9:53 ` Sascha Hauer
2012-04-15 11:47 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-15 13:49 ` Sascha Hauer
2012-04-15 13:51 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-13 13:54 ` [PATCH 2/7] serial i.MX: " Sascha Hauer
2012-04-14 11:34 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 13:25 ` Sascha Hauer
2012-04-13 13:54 ` [PATCH 3/7] net fec: Add " Sascha Hauer
2012-04-13 13:54 ` Sascha Hauer [this message]
2012-04-13 13:54 ` [PATCH 5/7] net mii: Add mii_open/mii_close functions Sascha Hauer
2012-04-14 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 13:27 ` Sascha Hauer
2012-04-15 4:12 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-15 10:01 ` Sascha Hauer
2012-04-13 13:54 ` [PATCH 6/7] ARM: initial Freescale i.MX6q Armadillo2 support Sascha Hauer
2012-04-14 10:53 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 12:57 ` Sascha Hauer
2012-04-15 4:09 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-15 9:53 ` Sascha Hauer
2012-04-15 11:46 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-14 13:17 ` Eric Bénard
2012-04-14 13:20 ` Sascha Hauer
2012-04-13 13:54 ` [PATCH 7/7] ARM Freescale i.MX6 Armadillo2: Add defconfig 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=1334325273-1701-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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