From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: add the i.mx6q support
Date: Sat, 12 Nov 2011 17:35:46 +0100 [thread overview]
Message-ID: <201111121735.46668.marek.vasut@gmail.com> (raw)
In-Reply-To: <1321094190-8108-6-git-send-email-jason.hui@linaro.org>
> 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 misc control register from user using experience.
>
> Signed-off-by: Jason Liu <jason.hui@linaro.org>
> ---
> drivers/mmc/fsl_esdhc.c | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index ec953f0..cd17ef2 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -58,7 +58,12 @@ struct fsl_esdhc {
> uint autoc12err;
> uint hostcapblt;
> uint wml;
> - char reserved1[8];
> +#if defined(CONFIG_FSL_USDHC)
> + uint mixctrl;
> + char reserved1[4];
> +#else
> + char reserved1[8];
> +#endif
Hi Jason,
can't we just drop this ifdef ?
> uint fevt;
> char reserved2[168];
> uint hostver;
> @@ -298,6 +303,9 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
> struct mmc_data *data)
>
> /* Send the command */
> esdhc_write32(®s->cmdarg, cmd->cmdarg);
> +#if defined(CONFIG_FSL_USDHC)
> + esdhc_write32(®s->mixctrl, xfertyp & 0xFFFF);
> +#endif
> esdhc_write32(®s->xfertyp, xfertyp);
Why is this duplicated? This seems like a huge user-experience nonsense to me :)
If you write to xfertyp register, you still have to write the same thing to
mixctrl? Or if you do it vice versa, won't it work ? Why did you add the
register?
>
> /* Wait for the command to complete */
> @@ -482,7 +490,11 @@ int fsl_esdhc_initialize(bd_t *bis, struct
> fsl_esdhc_cfg *cfg)
>
> mmc = malloc(sizeof(struct mmc));
>
> +#if defined(CONFIG_FSL_USDHC)
> + sprintf(mmc->name, "FSL_USDHC");
> +#else
> sprintf(mmc->name, "FSL_ESDHC");
> +#endif
Why not just rename it to FSL_SDHC and be done with it ?
> regs = (struct fsl_esdhc *)cfg->esdhc_base;
>
> /* First reset the eSDHC controller */
next prev parent reply other threads:[~2011-11-12 16:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-12 10:36 [U-Boot] [PATCH 0/6] i.mx: add the initial i.mx6q core/board support Jason Liu
2011-11-12 10:36 ` [U-Boot] [PATCH 1/6] i.mx: i.mx5: Move some files to imx-common folder Jason Liu
2011-11-14 8:34 ` Stefano Babic
2011-11-14 8:57 ` Jason Hui
2011-11-14 11:28 ` Stefano Babic
2011-11-12 10:36 ` [U-Boot] [PATCH 2/6] i.mx: Add the initial support for freescale i.MX6Q processor Jason Liu
2011-11-13 23:11 ` Marek Vasut
2011-11-14 8:47 ` Jason Hui
2011-11-14 10:45 ` Marek Vasut
2011-11-15 10:10 ` Jason Hui
2011-11-15 11:08 ` Stefano Babic
2011-11-14 9:03 ` Stefano Babic
2011-11-14 9:42 ` Jason Hui
2011-11-14 11:49 ` Stefano Babic
2011-11-15 10:18 ` Jason Hui
2011-11-12 10:36 ` [U-Boot] [PATCH 3/6] i.mx: mxc_gpio: add the i.mx6q support Jason Liu
2011-11-14 9:04 ` Stefano Babic
2011-11-12 10:36 ` [U-Boot] [PATCH 4/6] i.mx: serial_mxc: " Jason Liu
2011-11-12 10:36 ` [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: " Jason Liu
2011-11-12 16:35 ` Marek Vasut [this message]
2011-11-14 8:37 ` Jason Hui
2011-11-14 10:42 ` Marek Vasut
2011-11-15 9:46 ` Jason Hui
2011-11-15 11:56 ` Stefano Babic
2011-11-16 1:36 ` Jason Hui
2011-11-16 2:24 ` Marek Vasut
2011-11-14 9:06 ` Stefano Babic
2011-11-12 10:36 ` [U-Boot] [PATCH 6/6] i.mx: i.mx6q: Add the initial support for i.mx6q ARM2 board Jason Liu
2011-11-12 19:42 ` Fabio Estevam
2011-11-14 8:59 ` Jason Hui
2011-11-12 20:13 ` Fabio Estevam
2011-11-14 9:10 ` Jason Hui
2011-11-13 7:04 ` Igor Grinberg
2011-11-14 9:13 ` Jason Hui
2011-11-14 9:25 ` Stefano Babic
2011-11-14 9:55 ` Jason Hui
2011-11-14 11:36 ` Stefano Babic
2011-11-16 11:34 ` Dirk Behme
2011-11-16 12:15 ` Jason Hui
2011-11-12 16:10 ` [U-Boot] [PATCH 0/6] i.mx: add the initial i.mx6q core/board support Dirk Behme
2011-11-14 8:11 ` Jason Hui
2011-11-16 11:56 ` Dirk Behme
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=201111121735.46668.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox