* [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model
@ 2016-04-20 10:20 Yangbo Lu
2016-04-20 10:20 ` [PATCH 2/2] mmc: sdhci-pltfm: get clock through the common clk APIs Yangbo Lu
2016-04-21 23:08 ` [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Scott Wood
0 siblings, 2 replies; 6+ messages in thread
From: Yangbo Lu @ 2016-04-20 10:20 UTC (permalink / raw)
To: linux-mmc, linuxppc-dev, devicetree
Cc: ulf.hansson, scott.wood, Rob Herring, Yangbo Lu
Provide clocks property instead of clock-frequency for QorIQ eSDHC
dts node to adapt to the new clocking model, so that the driver
could get clock value by the common clk API and the u-boot could
remove the clock fixup.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
index 20835ae..ddbe562 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
@@ -36,5 +36,5 @@ sdhc: sdhc@114000 {
compatible = "fsl,esdhc";
reg = <0x114000 0x1000>;
interrupts = <48 2 0 0>;
- clock-frequency = <0>;
+ clocks = <&clockgen 4 1>;
};
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] mmc: sdhci-pltfm: get clock through the common clk APIs
2016-04-20 10:20 [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Yangbo Lu
@ 2016-04-20 10:20 ` Yangbo Lu
2016-04-21 23:08 ` [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Scott Wood
1 sibling, 0 replies; 6+ messages in thread
From: Yangbo Lu @ 2016-04-20 10:20 UTC (permalink / raw)
To: linux-mmc, linuxppc-dev, devicetree
Cc: ulf.hansson, scott.wood, Rob Herring, Yangbo Lu
Get the sdhc clock through the common clk APIs. If the APIs fail, try
to get the clock through 'clock-frequency' property. We could remove
the clock fixup in u-boot by adding the common clk APIs support.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
drivers/mmc/host/sdhci-pltfm.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 072bb27..383fa49 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -31,6 +31,7 @@
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
+#include <linux/clk.h>
#ifdef CONFIG_PPC
#include <asm/machdep.h>
#endif
@@ -71,6 +72,7 @@ void sdhci_get_of_property(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct sdhci_host *host = platform_get_drvdata(pdev);
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+ struct clk *sdhci_clk;
u32 bus_width;
if (of_get_property(np, "sdhci,auto-cmd12", NULL))
@@ -99,7 +101,11 @@ void sdhci_get_of_property(struct platform_device *pdev)
of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
- of_property_read_u32(np, "clock-frequency", &pltfm_host->clock);
+ sdhci_clk = of_clk_get(np, 0);
+ if (!IS_ERR(sdhci_clk))
+ pltfm_host->clock = clk_get_rate(sdhci_clk);
+ else
+ of_property_read_u32(np, "clock-frequency", &pltfm_host->clock);
if (of_find_property(np, "keep-power-in-suspend", NULL))
host->mmc->pm_caps |= MMC_PM_KEEP_POWER;
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model
2016-04-20 10:20 [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Yangbo Lu
2016-04-20 10:20 ` [PATCH 2/2] mmc: sdhci-pltfm: get clock through the common clk APIs Yangbo Lu
@ 2016-04-21 23:08 ` Scott Wood
2016-04-26 6:19 ` Yangbo Lu
2016-04-26 6:29 ` Yangbo Lu
1 sibling, 2 replies; 6+ messages in thread
From: Scott Wood @ 2016-04-21 23:08 UTC (permalink / raw)
To: Yangbo Lu, linux-mmc, linuxppc-dev, devicetree
Cc: ulf.hansson, Rob Herring, scott.wood
On Wed, 2016-04-20 at 18:20 +0800, Yangbo Lu wrote:
> Provide clocks property instead of clock-frequency for QorIQ eSDHC
> dts node to adapt to the new clocking model, so that the driver
> could get clock value by the common clk API and the u-boot could
> remove the clock fixup.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
> arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> index 20835ae..ddbe562 100644
> --- a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> @@ -36,5 +36,5 @@ sdhc: sdhc@114000 {
> compatible = "fsl,esdhc";
> reg = <0x114000 0x1000>;
> interrupts = <48 2 0 0>;
> - clock-frequency = <0>;
> + clocks = <&clockgen 4 1>;
> };
Binding update?
-Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model
2016-04-21 23:08 ` [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Scott Wood
@ 2016-04-26 6:19 ` Yangbo Lu
2016-04-26 6:29 ` Yangbo Lu
1 sibling, 0 replies; 6+ messages in thread
From: Yangbo Lu @ 2016-04-26 6:19 UTC (permalink / raw)
To: Scott Wood, linux-mmc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org
Cc: ulf.hansson@linaro.org, Rob Herring, Scott Wood
> -----Original Message-----
> From: Scott Wood [mailto:oss@buserror.net]
> Sent: Friday, April 22, 2016 7:08 AM
> To: Yangbo Lu; linux-mmc@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
> devicetree@vger.kernel.org
> Cc: ulf.hansson@linaro.org; Rob Herring; Scott Wood
> Subject: Re: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new
> clocking model
>
> On Wed, 2016-04-20 at 18:20 +0800, Yangbo Lu wrote:
> > Provide clocks property instead of clock-frequency for QorIQ eSDHC dts
> > node to adapt to the new clocking model, so that the driver could get
> > clock value by the common clk API and the u-boot could remove the
> > clock fixup.
> >
> > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > ---
> > arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > index 20835ae..ddbe562 100644
> > --- a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > +++ b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > @@ -36,5 +36,5 @@ sdhc: sdhc@114000 {
> > compatible = "fsl,esdhc";
> > reg = <0x114000 0x1000>;
> > interrupts = <48 2 0 0>;
> > - clock-frequency = <0>;
> > + clocks = <&clockgen 4 1>;
> > };
>
> Binding update?
>
> -Scott
[Lu Yangbo-B47093] Sorry, did you mean the doc update? ...
It has already had a description in Documentation/devicetree/bindings/clock/qoriq-clock.txt
- clock-frequency: Input system clock frequency (SYSCLK)
- clocks: If clock-frequency is not specified, sysclk may be provided
as an input clock. Either clock-frequency or clocks must be
provided.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model
2016-04-21 23:08 ` [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Scott Wood
2016-04-26 6:19 ` Yangbo Lu
@ 2016-04-26 6:29 ` Yangbo Lu
2016-04-26 6:31 ` Scott Wood
1 sibling, 1 reply; 6+ messages in thread
From: Yangbo Lu @ 2016-04-26 6:29 UTC (permalink / raw)
To: Yangbo Lu, Scott Wood, linux-mmc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org
Cc: ulf.hansson@linaro.org, Rob Herring, Scott Wood
> -----Original Message-----
> From: Yangbo Lu
> Sent: Tuesday, April 26, 2016 2:19 PM
> To: 'Scott Wood'; linux-mmc@vger.kernel.org; linuxppc-
> dev@lists.ozlabs.org; devicetree@vger.kernel.org
> Cc: ulf.hansson@linaro.org; Rob Herring; Scott Wood
> Subject: RE: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new
> clocking model
>
> > -----Original Message-----
> > From: Scott Wood [mailto:oss@buserror.net]
> > Sent: Friday, April 22, 2016 7:08 AM
> > To: Yangbo Lu; linux-mmc@vger.kernel.org;
> > linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org
> > Cc: ulf.hansson@linaro.org; Rob Herring; Scott Wood
> > Subject: Re: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new
> > clocking model
> >
> > On Wed, 2016-04-20 at 18:20 +0800, Yangbo Lu wrote:
> > > Provide clocks property instead of clock-frequency for QorIQ eSDHC
> > > dts node to adapt to the new clocking model, so that the driver
> > > could get clock value by the common clk API and the u-boot could
> > > remove the clock fixup.
> > >
> > > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> > > ---
> > > arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > > b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > > index 20835ae..ddbe562 100644
> > > --- a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > > +++ b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
> > > @@ -36,5 +36,5 @@ sdhc: sdhc@114000 {
> > > compatible = "fsl,esdhc";
> > > reg = <0x114000 0x1000>;
> > > interrupts = <48 2 0 0>;
> > > - clock-frequency = <0>;
> > > + clocks = <&clockgen 4 1>;
> > > };
> >
> > Binding update?
> >
> > -Scott
>
> [Lu Yangbo-B47093] Sorry, did you mean the doc update? ...
> It has already had a description in
> Documentation/devicetree/bindings/clock/qoriq-clock.txt
>
> - clock-frequency: Input system clock frequency (SYSCLK)
> - clocks: If clock-frequency is not specified, sysclk may be provided
> as an input clock. Either clock-frequency or clocks must be
> provided.
[Lu Yangbo-B47093] Or update mmc doc?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model
2016-04-26 6:29 ` Yangbo Lu
@ 2016-04-26 6:31 ` Scott Wood
0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2016-04-26 6:31 UTC (permalink / raw)
To: Yangbo Lu, Scott Wood, linux-mmc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org
Cc: ulf.hansson@linaro.org, Rob Herring
On 04/26/2016 01:29 AM, Yangbo Lu wrote:
>
>
>> -----Original Message-----
>> From: Yangbo Lu
>> Sent: Tuesday, April 26, 2016 2:19 PM
>> To: 'Scott Wood'; linux-mmc@vger.kernel.org; linuxppc-
>> dev@lists.ozlabs.org; devicetree@vger.kernel.org
>> Cc: ulf.hansson@linaro.org; Rob Herring; Scott Wood
>> Subject: RE: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new
>> clocking model
>>
>>> -----Original Message-----
>>> From: Scott Wood [mailto:oss@buserror.net]
>>> Sent: Friday, April 22, 2016 7:08 AM
>>> To: Yangbo Lu; linux-mmc@vger.kernel.org;
>>> linuxppc-dev@lists.ozlabs.org; devicetree@vger.kernel.org
>>> Cc: ulf.hansson@linaro.org; Rob Herring; Scott Wood
>>> Subject: Re: [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new
>>> clocking model
>>>
>>> On Wed, 2016-04-20 at 18:20 +0800, Yangbo Lu wrote:
>>>> Provide clocks property instead of clock-frequency for QorIQ eSDHC
>>>> dts node to adapt to the new clocking model, so that the driver
>>>> could get clock value by the common clk API and the u-boot could
>>>> remove the clock fixup.
>>>>
>>>> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
>>>> ---
>>>> arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
>>>> b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
>>>> index 20835ae..ddbe562 100644
>>>> --- a/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
>>>> +++ b/arch/powerpc/boot/dts/fsl/qoriq-esdhc-0.dtsi
>>>> @@ -36,5 +36,5 @@ sdhc: sdhc@114000 {
>>>> compatible = "fsl,esdhc";
>>>> reg = <0x114000 0x1000>;
>>>> interrupts = <48 2 0 0>;
>>>> - clock-frequency = <0>;
>>>> + clocks = <&clockgen 4 1>;
>>>> };
>>>
>>> Binding update?
>>>
>>> -Scott
>>
>> [Lu Yangbo-B47093] Sorry, did you mean the doc update? ...
>> It has already had a description in
>> Documentation/devicetree/bindings/clock/qoriq-clock.txt
>>
>> - clock-frequency: Input system clock frequency (SYSCLK)
>> - clocks: If clock-frequency is not specified, sysclk may be provided
>> as an input clock. Either clock-frequency or clocks must be
>> provided.
>
> [Lu Yangbo-B47093] Or update mmc doc?
Yes, mmc. This patch has nothing to do with the clockgen node's input
clock...
-Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-26 6:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 10:20 [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Yangbo Lu
2016-04-20 10:20 ` [PATCH 2/2] mmc: sdhci-pltfm: get clock through the common clk APIs Yangbo Lu
2016-04-21 23:08 ` [PATCH 1/2] powerpc/85xx: adapt QorIQ eSDHC to the new clocking model Scott Wood
2016-04-26 6:19 ` Yangbo Lu
2016-04-26 6:29 ` Yangbo Lu
2016-04-26 6:31 ` Scott Wood
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).