All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 5/6] i.mx: fsl_esdhc: add the i.mx6q support
Date: Thu, 24 Nov 2011 17:23:05 +0100	[thread overview]
Message-ID: <4ECE6F69.5000807@denx.de> (raw)
In-Reply-To: <1321600267-8514-6-git-send-email-jason.hui@linaro.org>

On 18/11/2011 08:11, Jason Liu wrote:
> The mmc host controller on the i.mx6q is called usdhc which
> is redesigned based on the freescale esdhc controller.
> 
> The usdhc controller is almost compatible with esdhc except
> it adds one mix register to support debug/SD3.0 and move
> the low bit 0-6 of XFERTYP register to the mix control reg
> low bit 0-6. Thus on i.mx6q, we have the following compared
> with the previous soc: (can refer to RM of chapter 56.3.3)
> 
> i.mx6q:
> mix control:
> bit 31 - bit 7: Added for debug/SD3.0 support
> bit 6  - bit 0: move in the XFERTYP register bit 6-0 on previous soc
> XFERTYP register:
> bit 31 - bit 7: the same as before,
> bit 6  - bit 0: no-use
> 
> previous soc
> mix control: no
> XFERTYP register:
> bit 31 - bit 0: xfertype information
> 
> Signed-off-by: Jason Liu <jason.hui@linaro.org>
> CC:Stefano Babic <sbabic@denx.de>
> Acked-by: Stefano Babic <sbabic@denx.de>
> ---
> v2: extend the commit message by adding mix/xtertype register change
>     remove one #ifdef as Marek suggested
>     change the print of USDHC/ESDHC to SDHC
> ---
>  drivers/mmc/fsl_esdhc.c |   12 +++++++++---
>  1 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index ec953f0..ddd1b4c 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -58,7 +58,8 @@ struct fsl_esdhc {
>  	uint	autoc12err;
>  	uint	hostcapblt;
>  	uint	wml;
> -	char	reserved1[8];
> +	uint    mixctrl;
> +	char    reserved1[4];
>  	uint	fevt;
>  	char	reserved2[168];
>  	uint	hostver;
> @@ -298,8 +299,13 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
>  
>  	/* Send the command */
>  	esdhc_write32(&regs->cmdarg, cmd->cmdarg);
> +#if defined(CONFIG_FSL_USDHC)
> +	esdhc_write32(&regs->mixctrl,
> +	(esdhc_read32(&regs->mixctrl) & 0xFFFFFF80) | (xfertyp & 0x7F));
> +	esdhc_write32(&regs->xfertyp, xfertyp & 0xFFFF0000);
> +#else
>  	esdhc_write32(&regs->xfertyp, xfertyp);
> -
> +#endif
>  	/* Wait for the command to complete */
>  	while (!(esdhc_read32(&regs->irqstat) & IRQSTAT_CC))
>  		;
> @@ -482,7 +488,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
>  
>  	mmc = malloc(sizeof(struct mmc));
>  
> -	sprintf(mmc->name, "FSL_ESDHC");
> +	sprintf(mmc->name, "FSL_SDHC");
>  	regs = (struct fsl_esdhc *)cfg->esdhc_base;

Jason,

I have no issues about this patch, but it was not forwarded to Andy (MMC
Maintainer).

  reply	other threads:[~2011-11-24 16:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18  7:11 [U-Boot] [PATCH V2 0/6] i.mx: add the initial i.mx6q core/board support Jason Liu
2011-11-18  7:11 ` [U-Boot] [PATCH V2 1/6] i.mx: introduce the armv7/imx-common folder Jason Liu
2011-11-21 13:40   ` Stefano Babic
2011-11-18  7:11 ` [U-Boot] [PATCH V2 2/6] i.mx: add the initial support for freescale i.MX6Q processor Jason Liu
2011-11-21 14:44   ` Stefano Babic
2011-11-22 13:13     ` Jason Hui
2011-11-18  7:11 ` [U-Boot] [PATCH V2 3/6] i.mx: mxc_gpio: add the i.mx6q support Jason Liu
     [not found]   ` <2EDAD32A5B0B85468ED77279EBEE99682586FB@039-SN1MPN1-001.039d.mgd.msft.net>
2011-11-18  7:30     ` Jason Hui
2011-11-18 10:18       ` Marek Vasut
2011-11-18 12:26         ` Jason Hui
2011-11-18 20:01           ` Mike Frysinger
2011-11-18 22:59             ` Marek Vasut
2011-11-18 23:50               ` Mike Frysinger
2011-11-18 20:00   ` Mike Frysinger
2011-11-18  7:11 ` [U-Boot] [PATCH V2 4/6] i.mx: serial_mxc: " Jason Liu
2011-11-21 14:51   ` Stefano Babic
2011-11-22 13:15     ` Jason Hui
2011-11-18  7:11 ` [U-Boot] [PATCH V2 5/6] i.mx: fsl_esdhc: " Jason Liu
2011-11-24 16:23   ` Stefano Babic [this message]
2011-11-18  7:11 ` [U-Boot] [PATCH V2 6/6] i.mx: i.mx6q: add the initial support for i.mx6q ARM2 board Jason Liu

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=4ECE6F69.5000807@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.