diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-04-24 10:38:23 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-04-24 10:38:23 +0200 |
commit | ba361ee78f915aa9e26acbbdf6f57712c69506d2 (patch) | |
tree | 60fb18386ba11f4b8653133abbf630e98aa2f8f6 /drivers/mci/imx-esdhc.c | |
parent | b108afa01ac0ceb72db750fefd32a67c0247c9ca (diff) | |
parent | fd9c7d412ee7ff7b351be35afa01ccfc48404080 (diff) | |
download | barebox-ba361ee78f915aa9e26acbbdf6f57712c69506d2.tar.gz barebox-ba361ee78f915aa9e26acbbdf6f57712c69506d2.tar.xz |
Merge branch 'pu/mx6-v2' into next
Conflicts:
arch/arm/Makefile
arch/arm/mach-imx/Kconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/imx-esdhc.c')
-rw-r--r-- | drivers/mci/imx-esdhc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index 6d0883c68b..ae3c805997 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 */ |