From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Linux-SH <linux-sh@vger.kernel.org>,
Laurent <laurent.pinchart@ideasonboard.com>,
Ian Molton <ian@mnementh.co.uk>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@lists.codethink.co.uk, linux-gpio@vger.kernel.org,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH v3 5/6] ARM: shmobile: lager: Set clock rates for SDHI
Date: Tue, 30 Jun 2015 01:02:41 +0100 [thread overview]
Message-ID: <1435622561.23818.43.camel@codethink.co.uk> (raw)
In-Reply-To: <87a8vjjas8.wl%kuninori.morimoto.gx@renesas.com>
On Mon, 2015-06-29 at 06:23 +0000, Kuninori Morimoto wrote:
> Hi Ben
> Cc Laurent, Geert, Magnus
>
> > diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> > index aaa4f258e279..5f68e53c58ae 100644
> > --- a/arch/arm/boot/dts/r8a7790-lager.dts
> > +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> > @@ -488,6 +488,9 @@
> > pinctrl-0 = <&sdhi0_pins>;
> > pinctrl-names = "default";
> >
> > + assigned-clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
> > + assigned-clock-rates = <156000000>;
> > +
> > vmmc-supply = <&vcc_sdhi0>;
> > vqmmc-supply = <&vccq_sdhi0>;
> > cd-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
> > @@ -498,6 +501,9 @@
> > pinctrl-0 = <&sdhi2_pins>;
> > pinctrl-names = "default";
> >
> > + assigned-clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
> > + assigned-clock-rates = <97500000>;
> > +
> > vmmc-supply = <&vcc_sdhi2>;
> > vqmmc-supply = <&vccq_sdhi2>;
> > cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
>
> Thank you for your patch, but I still wandering about this.
> Please correct me if I'm misunderstanding.
>
> Above seetings is for SDHI IP, and it can divide it ?
> The image is
>
> [CPG] -> 156 MHz -> [SDHI] -> 1/x -> [CARD]
> ~~~~~~~
>
> If so, why we can't use max-frequency ?
> We can calculate/set SDHI IP clocks via
> max-frequency / clk_round_rate() / clk_set_rate()
> since we know SDHI's divider capability.
>
> SH-MMC is using this style. and I think it is flexible for every speed.
> Please check sh_mmcif_clock_control(), sh_mmcif_clk_setup()
> on ${LINUX}/drivers/mmc/host/sh_mmcif.c
That's certainly a nicer way of doing this. The difficulty I see is
that tmio_mmc doesn't know anything about the input clock, and not all
of the drivers using it actually use the clock framework.
Ben.
next prev parent reply other threads:[~2015-06-30 0:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 15:21 [PATCH v3 0/6] UHS-I support for sh_mobile_sdhi Ben Hutchings
2015-06-26 15:22 ` [PATCH v3 1/6] mmc: tmio: Add UHS-I mode support Ben Hutchings
2015-06-26 15:23 ` [PATCH v3 2/6] pinctrl: sh-pfc: Implement pinconf power-source param for voltage switching Ben Hutchings
2015-06-29 8:17 ` Geert Uytterhoeven
2015-06-29 8:32 ` Laurent Pinchart
2015-06-29 21:55 ` Ben Hutchings
2015-06-26 15:23 ` [PATCH v3 3/6] pinctrl: sh-pfc: r8a7790: Implement voltage switching for SDHI Ben Hutchings
2015-06-29 8:50 ` Laurent Pinchart
2015-06-29 23:44 ` Ben Hutchings
2015-06-26 15:23 ` [PATCH v3 4/6] mmc: sh_mobile_sdhi: Add UHS-I mode support Ben Hutchings
2015-06-26 15:23 ` [PATCH v3 5/6] ARM: shmobile: lager: Set clock rates for SDHI Ben Hutchings
2015-06-29 6:23 ` Kuninori Morimoto
2015-06-30 0:02 ` Ben Hutchings [this message]
2015-06-30 1:29 ` Ben Hutchings
2015-06-30 1:31 ` Ben Hutchings
2015-06-30 1:45 ` Kuninori Morimoto
2015-06-30 2:06 ` Ben Hutchings
2015-06-30 4:43 ` Kuninori Morimoto
2015-06-26 15:23 ` [PATCH v3 6/6] ARM: shmobile: lager: Enable UHS-I SDR-50 Ben Hutchings
2015-06-26 15:25 ` [PATCH v3 0/6] UHS-I support for sh_mobile_sdhi Ben Hutchings
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=1435622561.23818.43.camel@codethink.co.uk \
--to=ben.hutchings@codethink.co.uk \
--cc=geert@linux-m68k.org \
--cc=horms@verge.net.au \
--cc=ian@mnementh.co.uk \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.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).