linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: r66093@freescale.com
Cc: Jerry Huang <Chang-Ming.Huang@freescale.com>,
	Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/esdhc: enable the card insert/remove interrupt
Date: Tue, 23 Oct 2012 01:26:48 -0700	[thread overview]
Message-ID: <20121023082648.GA21690@lizard> (raw)
In-Reply-To: <1350975677-8195-1-git-send-email-r66093@freescale.com>

On Tue, Oct 23, 2012 at 03:01:17PM +0800, r66093@freescale.com wrote:
> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
> 
> The current eSDHC driver use the poll mode to detect
> if the SD/MMC card is inserted or removed, which will generate
> many interrupts and impact the performance. 
> Therefore, change the default card detect to interrupt mode,
> if the board can't support this mode, we still use the poll mode.
> 
> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> CC: Anton Vorontsov <cbouatmailru@gmail.com>
> CC: Chris Ball <cjb@laptop.org>
> ---

IIRC, the card detection is broken SOC-revision-wise, not board-wise. So
the change seems wrong.

Also, take a look at this:

	http://lkml.org/lkml/2010/7/14/127

I started the work but never finished, unfortunately it caused some
regressions for non-FSL hardware...

>  drivers/mmc/host/sdhci-of-esdhc.c |    7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index ffc1226..5dc362f 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -196,6 +196,11 @@ static void esdhc_of_detect_limitation(struct platform_device *pdev,
>  	if (vvn == VENDOR_V_22)
>  		pdata->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
>  
> +	/* P4080DS and MPC837XMDS board don't support interrupt mode */
> +	if (of_machine_is_compatible("fsl,mpc837xmds") ||
> +	    of_machine_is_compatible("fsl,P4080DS"))
> +		pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> +
>  	iounmap(ioaddr);
>  end:
>  	return;
> @@ -223,7 +228,7 @@ static struct sdhci_pltfm_data sdhci_esdhc_pdata = {
>  	 * card detection could be handled via GPIO
>  	 * eSDHC cannot support End Attribute in NOP ADMA descriptor
>  	 */
> -	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> +	.quirks = ESDHC_DEFAULT_QUIRKS
>  		| SDHCI_QUIRK_NO_CARD_NO_RESET
>  		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>  	.ops = &sdhci_esdhc_ops,
> -- 
> 1.7.9.5

       reply	other threads:[~2012-10-23  8:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1350975677-8195-1-git-send-email-r66093@freescale.com>
2012-10-23  8:26 ` Anton Vorontsov [this message]
2012-10-23  8:39   ` [PATCH] powerpc/esdhc: enable the card insert/remove interrupt Huang Changming-R66093
2012-10-25 10:05     ` Huang Changming-R66093
2012-10-25 10:30       ` Anton Vorontsov
2012-10-26  2:42         ` Huang Changming-R66093
2012-10-27  1:12           ` Anton Vorontsov
2012-10-29  1:40             ` Huang Changming-R66093

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=20121023082648.GA21690@lizard \
    --to=cbouatmailru@gmail.com \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r66093@freescale.com \
    /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;
as well as URLs for NNTP newsgroup(s).