public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fsl_esdhc: Fix esdhc disabled problem on some platforms
Date: Tue, 28 Dec 2010 18:54:27 +0300	[thread overview]
Message-ID: <20101228155427.GA17010@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1293518430-16318-1-git-send-email-b26998@freescale.com>

On Tue, Dec 28, 2010 at 02:40:30PM +0800, Chenhui Zhao wrote:
> Some platform's esdhc pins don't share with other function.
> The eSDHC shouldn't be disabled, even if "esdhc" isn't defined
> in hwconfig env variable.
> 
> Use CONFIG_FSL_ESDHC_PIN_MUX to fix this problem.
> 
> The problem was introduced by this commit:

I would not say 'the problem was introduced'. ;-) Back in 2009
all platforms w/ eSDHC were using muxed eSDHC pins, so disabling
eSDHC was a sane choice.

Anyway, the patch looks mostly OK. One comment below though.

> commit b33433a63fe08c9e723ea15a7c7c7143bf527c6d
> Author: Anton Vorontsov <avorontsov@ru.mvista.com>
> Date:   Wed Jun 10 00:25:29 2009 +0400
> 
>     fsl_esdhc: Add device tree fixups
> 
> Signed-off-by: Chenhui Zhao <b26998@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
>  drivers/mmc/fsl_esdhc.c       |    2 ++
>  include/configs/MPC837XEMDS.h |    1 +
>  include/configs/MPC837XERDB.h |    1 +
>  include/configs/MPC8569MDS.h  |    1 +
>  4 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index cd78714..4c8caa9 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -527,10 +527,12 @@ void fdt_fixup_esdhc(void *blob, bd_t *bd)
>  	const char *compat = "fsl,esdhc";
>  	const char *status = "okay";
>  
> +#ifdef CONFIG_FSL_ESDHC_PIN_MUX
>  	if (!hwconfig("esdhc")) {
>  		status = "disabled";
>  		goto out;

Wouldn't gcc complain about unused "out" label?

>  	}
> +#endif
>  
>  	do_fixup_by_compat_u32(blob, compat, "clock-frequency",
>  			       gd->sdhc_clk, 1);

Thanks,

-- 
Anton Vorontsov
Email: cbouatmailru at gmail.com

      reply	other threads:[~2010-12-28 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28  6:40 [U-Boot] [PATCH] fsl_esdhc: Fix esdhc disabled problem on some platforms Chenhui Zhao
2010-12-28 15:54 ` Anton Vorontsov [this message]

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=20101228155427.GA17010@oksana.dev.rtsoft.ru \
    --to=avorontsov@mvista.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