From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Kyungmin Park' <kmpark@infradead.org>,
'Jeongbae Seo' <jeongbae.seo@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org,
ben-linux@fluff.org, akpm@linux-foundation.org,
"'Hyuk Lee'" <hyuk1.lee@samsung.com>,
"'Chris Ball'" <cjb@laptop.org>, '정재훈' <jh80.chung@samsung.com>
Subject: RE: [PATCH 5/5] sdhci-s3c: Add support no internal clock divider in host controller
Date: Fri, 17 Sep 2010 10:18:59 +0900 [thread overview]
Message-ID: <03a201cb5606$5244bc60$f6ce3520$%kim@samsung.com> (raw)
In-Reply-To: <AANLkTik23B23RW_kmjaL1PeXNiWtU01aNBwUOPrac6HF@mail.gmail.com>
Kyungmin Park wrote:
>
> Hi,
>
> Well there are two implementations. and no conclusion yet.
> as s5pc210 don't support internal SDHCI clock, DMC overrides the
> function operation itself when s5pc210. System LSI use the quirks.
>
I think, this approach is better. Because no added new quirk and no override any function operation.
Actually, used SDHCI_QUIRK_NONSTANDARD_CLOCK quirk to support SDMMC host controller of S5PV310/S5PC210 which does not have internal clock divider in it.
But need to re-submit to two separate patches which one is adding support no internal clock divider and other is adding 'pdata->host_caps' feature.
Chris, how do you think this approach?
> Choose any one from MMC maintainer.
>
> Thank you,
> Kyungmin Park
>
> On Thu, Sep 16, 2010 at 5:37 PM, Jeongbae Seo <jeongbae.seo@samsung.com>
> wrote:
> > From: Hyuk Lee <hyuk1.lee@samsung.com>
> >
> > This patch adds to support no internal clock divider in SDHCI.
> > The external clock divider can be used to make a proper clock
> > because SDHCI doesn't support internal clock divider by itself.
> >
> > Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
> > Signed-off-by: Jeongbae Seo <jeongbae.seo@samsung.com>
> > ---
> > drivers/mmc/host/sdhci-s3c.c | 63
> ++++++++++++++++++++++++++++++++++++++++++
> > 1 files changed, 63 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> > index 71ad416..6160960 100644
> > --- a/drivers/mmc/host/sdhci-s3c.c
> > +++ b/drivers/mmc/host/sdhci-s3c.c
> > @@ -96,6 +96,13 @@ static unsigned int sdhci_s3c_get_max_clk(struct
> sdhci_host *host)
> > unsigned int rate, max;
> > int clk;
> >
> > + /*
> > + * There is only one clock source(sclk) if there is no clock divider
> > + * in the host controller
> > + */
> > + if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK)
> > + return clk_round_rate(ourhost->clk_bus[2], UINT_MAX);
> No hard-coded index.
Always, it is #2.
(snip)
> > + /*
> > + * There is only one clock source(sclk) if there is no clock divider
> > + * in the host controller
> > + */
> > + if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK)
> > + return clk_round_rate(ourhost->clk_bus[2], 400000);
> ditto
Same.
(snip)
> > + /*
> > + * If controller does not have internal clock divider,
> > + * we need to use another method with setup a quirk.
> > + */
> > + if (pdata->clk_type)
> check the clk_type with external
I think no need to check it.
Because in the general case, pdata->clk_type is 0, S3C_SDHCI_CLK_DIV_INTERNAL.
But if we want to add new another clock type, checking it is better...but no need now.
> > + host->quirks |= SDHCI_QUIRK_NONSTANDARD_CLOCK;
> > +
> > + if (pdata->host_caps)
> > + host->mmc->caps |= pdata->host_caps;
> > +
> > ret = sdhci_add_host(host);
> > if (ret) {
> > dev_err(dev, "sdhci_add_host() failed\n");
> > --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
next prev parent reply other threads:[~2010-09-17 1:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-16 8:36 [PATCH 0/5] ARM: S5PV310: Add support HSMMC for S5PV310/S5PC210 Jeongbae Seo
2010-09-16 8:36 ` [PATCH 1/5] ARM: S5PV310: Add HSMMC support and SDHCI configuration Jeongbae Seo
2010-09-16 9:13 ` Kyungmin Park
2010-09-17 0:57 ` Kukjin Kim
2010-09-17 4:15 ` Kyungmin Park
2010-10-04 11:03 ` Marek Szyprowski
2010-10-05 6:58 ` Jeongbae Seo
2010-09-16 8:37 ` [PATCH 2/5] ARM: S5PV310: Add HSMMC support into S5PV310 and S5PC210 Jeongbae Seo
2010-10-04 11:02 ` Marek Szyprowski
2010-10-05 6:46 ` Jeongbae Seo
2010-09-16 8:37 ` [PATCH 3/5] ARM: SAMSUNG: Modified to change of bus width and host caps Jeongbae Seo
2010-09-16 8:37 ` [PATCH 4/5] ARM: SAMSUNG: Add clock types into platform data Jeongbae Seo
2010-09-16 8:37 ` [PATCH 5/5] sdhci-s3c: Add support no internal clock divider in host controller Jeongbae Seo
2010-09-16 9:08 ` Kyungmin Park
2010-09-17 1:18 ` Kukjin Kim [this message]
2010-09-17 15:59 ` Chris Ball
2010-09-30 1:18 ` Kyungmin Park
2010-09-30 1:51 ` Chris Ball
2010-09-30 5:40 ` Jeongbae Seo
2010-09-30 6:00 ` Kyungmin Park
2010-09-17 1:22 ` Kukjin Kim
2010-09-17 2:39 ` ???
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='03a201cb5606$5244bc60$f6ce3520$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=ben-linux@fluff.org \
--cc=cjb@laptop.org \
--cc=hyuk1.lee@samsung.com \
--cc=jeongbae.seo@samsung.com \
--cc=jh80.chung@samsung.com \
--cc=kmpark@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
/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