LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pierre Tardy <tardyp@gmail.com>
To: Philip Rakity <prakity@marvell.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] mmc: add MMC_QUIRK_BROKEN_CLK_GATING
Date: Mon, 10 Jan 2011 17:57:07 +0100	[thread overview]
Message-ID: <AANLkTimSV07Kdk_xq3nhGa26-SF_u3gxCM+CUhmRJrib@mail.gmail.com> (raw)
In-Reply-To: <ADE0108D-6DF1-4230-B7FB-39D7AC7F63D1@marvell.com>

>
>
> Since the code is not called that often could you change the above code to:
>
>>       if (mmc_card_sdio(card))
>>               return !(card->quirks & MMC_QUIRK_BROKEN_CLK_GATING);
Well, The comment in the
>        return true;
>
> more obvious that quirk only applies to sdio.

Disagree.Actually, before this code, there is a pretty long comment,
that explain that this quirk only apply to sdio.

If we figure out later that some sdcard does not like clock gating
either, we could add this quirk to those bad sdcard as well.

Here is the whole resulting function. I think this is clear enough:

static bool mmc_host_may_gate_card(struct mmc_card *card)
{

        /* If there is no card we may gate it */
        if (!card)
               return true;
        /*
        * Don't gate SDIO cards! These need to be clocked at all times
        * since they may be independent systems generating interrupts
        * and other events. The clock requests counter from the core will
        * go down to zero since the core does not need it, but we will not
        * gate the clock, because there is somebody out there that may still
        * be using it.
        */
        return !(card->quirks & MMC_QUIRK_BROKEN_CLK_GATING);


}
Pierre

  reply	other threads:[~2011-01-10 16:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-09 16:26 [PATCH 0/3] mmc: add quirks.c file and CLK_GATING users Pierre Tardy
2011-01-09 16:26 ` [PATCH 1/3] mmc: add per device quirk placeholder Pierre Tardy
2011-01-10 16:04   ` Philip Rakity
2011-01-10 17:02     ` Pierre Tardy
2011-01-22 22:55   ` Ohad Ben-Cohen
2011-01-09 16:26 ` [PATCH 2/3] mmc: add MMC_QUIRK_BROKEN_CLK_GATING Pierre Tardy
2011-01-10 15:58   ` Philip Rakity
2011-01-10 16:57     ` Pierre Tardy [this message]
2011-01-10 17:18       ` Philip Rakity
2011-01-09 16:26 ` [PATCH 3/3] mmc: remove anti clock gating quirk for wl1271 Pierre Tardy
2011-01-20  4:14   ` Chris Ball
2011-01-20  7:17     ` Pierre Tardy
2011-01-22 14:47       ` Chris Ball
2011-01-10 22:01 ` [PATCH 0/3] mmc: add quirks.c file and CLK_GATING users Linus Walleij

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=AANLkTimSV07Kdk_xq3nhGa26-SF_u3gxCM+CUhmRJrib@mail.gmail.com \
    --to=tardyp@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@marvell.com \
    --subject='Re: [PATCH 2/3] mmc: add MMC_QUIRK_BROKEN_CLK_GATING' \
    /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

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).