* [PATCH v2 1/2] CLK: TI: OMAP4: Remove gpmc_fck from dummy clocks
2014-02-19 9:15 [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock Florian Vaussard
@ 2014-02-19 9:15 ` Florian Vaussard
2014-02-19 9:15 ` [PATCH v2 2/2] ARM: DTS: OMAP4: Use l3_ick for the gpmc node Florian Vaussard
2014-02-19 16:22 ` [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock Tero Kristo
2 siblings, 0 replies; 12+ messages in thread
From: Florian Vaussard @ 2014-02-19 9:15 UTC (permalink / raw)
To: Benoît Cousson, Tony Lindgren, Tero Kristo
Cc: Mike Turquette, linux-omap, linux-arm-kernel, Florian Vaussard
When arch/arm/mach-omap2/gpmc.c calls clk_get(..., "fck"), it will
get a dummy clock and try to use it. As the rate is configured to zero,
this will result in several divisions by zero, and misconfigured
timings, with devices on the bus being lost in the La La Land.
It is better to remove gpmc_fck from the dummy clocks, so that gpmc.c
can fail gracefully.
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
drivers/clk/ti/clk-44xx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clk/ti/clk-44xx.c b/drivers/clk/ti/clk-44xx.c
index ae00218..02517a8 100644
--- a/drivers/clk/ti/clk-44xx.c
+++ b/drivers/clk/ti/clk-44xx.c
@@ -222,7 +222,6 @@ static struct ti_dt_clk omap44xx_clks[] = {
DT_CLK(NULL, "auxclk5_src_ck", "auxclk5_src_ck"),
DT_CLK(NULL, "auxclk5_ck", "auxclk5_ck"),
DT_CLK(NULL, "auxclkreq5_ck", "auxclkreq5_ck"),
- DT_CLK("50000000.gpmc", "fck", "dummy_ck"),
DT_CLK("omap_i2c.1", "ick", "dummy_ck"),
DT_CLK("omap_i2c.2", "ick", "dummy_ck"),
DT_CLK("omap_i2c.3", "ick", "dummy_ck"),
--
1.8.1.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH v2 2/2] ARM: DTS: OMAP4: Use l3_ick for the gpmc node
2014-02-19 9:15 [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock Florian Vaussard
2014-02-19 9:15 ` [PATCH v2 1/2] CLK: TI: OMAP4: Remove gpmc_fck from dummy clocks Florian Vaussard
@ 2014-02-19 9:15 ` Florian Vaussard
2014-02-19 16:22 ` [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock Tero Kristo
2 siblings, 0 replies; 12+ messages in thread
From: Florian Vaussard @ 2014-02-19 9:15 UTC (permalink / raw)
To: Benoît Cousson, Tony Lindgren, Tero Kristo
Cc: Mike Turquette, linux-omap, linux-arm-kernel, Florian Vaussard
The GPMC clock is derived from l3_ick. The simplest solution is
to reference directly l3_ick to provide the GPMC fck in order to
get correct timings. The real management of the clock is left to
hwmod.
Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
---
arch/arm/boot/dts/omap4.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index d3f8a6e..69409f7 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -275,6 +275,8 @@
gpmc,num-waitpins = <4>;
ti,hwmods = "gpmc";
ti,no-idle-on-init;
+ clocks = <&l3_div_ck>;
+ clock-names = "fck";
};
uart1: serial@4806a000 {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock
2014-02-19 9:15 [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock Florian Vaussard
2014-02-19 9:15 ` [PATCH v2 1/2] CLK: TI: OMAP4: Remove gpmc_fck from dummy clocks Florian Vaussard
2014-02-19 9:15 ` [PATCH v2 2/2] ARM: DTS: OMAP4: Use l3_ick for the gpmc node Florian Vaussard
@ 2014-02-19 16:22 ` Tero Kristo
2014-02-19 19:26 ` Florian Vaussard
2 siblings, 1 reply; 12+ messages in thread
From: Tero Kristo @ 2014-02-19 16:22 UTC (permalink / raw)
To: Florian Vaussard, Benoît Cousson, Tony Lindgren
Cc: linux-omap, Mike Turquette, linux-arm-kernel
On 02/19/2014 11:15 AM, Florian Vaussard wrote:
> Hello,
>
> Trying to get my SMSC9221 working on OMAP4 with DT,
> I faced a misconfigured gpmc_fck (dummy clock set to 0)
> resulting in serveral division-by-zero, misconfigured
> timings and driver lost in the La La Land.
>
> To solve this, patch 1 removes gpmc_fck from the dummy
> clocks, and patch 2 adds the gpmc_fck DT node and
> reference it from the gpmc node.
>
> Tested on DuoVero/Parlor (OMAP4430) with SMSC9221.
I can't test GPMC myself, but other than that, this set looks good to go.
-Tero
>
> Regards,
> Florian
> ---
> Since v1:
> - Removed the gpmc_fck clock node, and reference directly l3_ick
>
> Florian Vaussard (2):
> CLK: TI: OMAP4: Remove gpmc_fck from dummy clocks
> ARM: DTS: OMAP4: Use l3_ick for the gpmc node
>
> arch/arm/boot/dts/omap4.dtsi | 2 ++
> drivers/clk/ti/clk-44xx.c | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock
2014-02-19 16:22 ` [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock Tero Kristo
@ 2014-02-19 19:26 ` Florian Vaussard
2014-02-20 9:51 ` Tero Kristo
[not found] ` <20140223212309.22529.75068@quantum>
0 siblings, 2 replies; 12+ messages in thread
From: Florian Vaussard @ 2014-02-19 19:26 UTC (permalink / raw)
To: Tero Kristo, Benoît Cousson, Tony Lindgren
Cc: Mike Turquette, linux-omap, linux-arm-kernel
On 02/19/2014 05:22 PM, Tero Kristo wrote:
> On 02/19/2014 11:15 AM, Florian Vaussard wrote:
>> Hello,
>>
>> Trying to get my SMSC9221 working on OMAP4 with DT,
>> I faced a misconfigured gpmc_fck (dummy clock set to 0)
>> resulting in serveral division-by-zero, misconfigured
>> timings and driver lost in the La La Land.
>>
>> To solve this, patch 1 removes gpmc_fck from the dummy
>> clocks, and patch 2 adds the gpmc_fck DT node and
>> reference it from the gpmc node.
>>
>> Tested on DuoVero/Parlor (OMAP4430) with SMSC9221.
>
> I can't test GPMC myself, but other than that, this set looks good to go.
>
Thank you. Would you like more test coverage by other people? I would
like to see this in -rc if possible, as it is needed to boot my OMAP4
system.
Regards,
Florian
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock
2014-02-19 19:26 ` Florian Vaussard
@ 2014-02-20 9:51 ` Tero Kristo
2014-02-21 23:23 ` Tony Lindgren
[not found] ` <20140223212309.22529.75068@quantum>
1 sibling, 1 reply; 12+ messages in thread
From: Tero Kristo @ 2014-02-20 9:51 UTC (permalink / raw)
To: florian.vaussard, Benoît Cousson, Tony Lindgren
Cc: Mike Turquette, linux-omap, linux-arm-kernel
On 02/19/2014 09:26 PM, Florian Vaussard wrote:
>
> On 02/19/2014 05:22 PM, Tero Kristo wrote:
>> On 02/19/2014 11:15 AM, Florian Vaussard wrote:
>>> Hello,
>>>
>>> Trying to get my SMSC9221 working on OMAP4 with DT,
>>> I faced a misconfigured gpmc_fck (dummy clock set to 0)
>>> resulting in serveral division-by-zero, misconfigured
>>> timings and driver lost in the La La Land.
>>>
>>> To solve this, patch 1 removes gpmc_fck from the dummy
>>> clocks, and patch 2 adds the gpmc_fck DT node and
>>> reference it from the gpmc node.
>>>
>>> Tested on DuoVero/Parlor (OMAP4430) with SMSC9221.
>>
>> I can't test GPMC myself, but other than that, this set looks good to go.
>>
>
> Thank you. Would you like more test coverage by other people? I would
> like to see this in -rc if possible, as it is needed to boot my OMAP4
> system.
Well, I just think the driver clock change should be acked by someone
who knows gpmc better than me.
-Tero
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock
2014-02-20 9:51 ` Tero Kristo
@ 2014-02-21 23:23 ` Tony Lindgren
2014-02-23 20:36 ` Florian Vaussard
0 siblings, 1 reply; 12+ messages in thread
From: Tony Lindgren @ 2014-02-21 23:23 UTC (permalink / raw)
To: Tero Kristo
Cc: florian.vaussard, Benoît Cousson, Mike Turquette, linux-omap,
linux-arm-kernel
* Tero Kristo <t-kristo@ti.com> [140220 01:54]:
> On 02/19/2014 09:26 PM, Florian Vaussard wrote:
> >
> >On 02/19/2014 05:22 PM, Tero Kristo wrote:
> >>On 02/19/2014 11:15 AM, Florian Vaussard wrote:
> >>>Hello,
> >>>
> >>>Trying to get my SMSC9221 working on OMAP4 with DT,
> >>>I faced a misconfigured gpmc_fck (dummy clock set to 0)
> >>>resulting in serveral division-by-zero, misconfigured
> >>>timings and driver lost in the La La Land.
> >>>
> >>>To solve this, patch 1 removes gpmc_fck from the dummy
> >>>clocks, and patch 2 adds the gpmc_fck DT node and
> >>>reference it from the gpmc node.
> >>>
> >>>Tested on DuoVero/Parlor (OMAP4430) with SMSC9221.
> >>
> >>I can't test GPMC myself, but other than that, this set looks good to go.
> >>
> >
> >Thank you. Would you like more test coverage by other people? I would
> >like to see this in -rc if possible, as it is needed to boot my OMAP4
> >system.
>
> Well, I just think the driver clock change should be acked by
> someone who knows gpmc better than me.
Hmm do we also need to fix this for other omaps? We at least have
the following refrerences:
$ git grep dummy_ck drivers/ | grep -i gpmc
drivers/clk/ti/clk-44xx.c: DT_CLK("50000000.gpmc", "fck", "dummy_ck"),
drivers/clk/ti/clk-54xx.c: DT_CLK(NULL, "gpmc_ck", "dummy_ck"),
drivers/clk/ti/clk-7xx.c: DT_CLK(NULL, "gpmc_ck", "dummy_ck"),
Regards,
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock
2014-02-21 23:23 ` Tony Lindgren
@ 2014-02-23 20:36 ` Florian Vaussard
0 siblings, 0 replies; 12+ messages in thread
From: Florian Vaussard @ 2014-02-23 20:36 UTC (permalink / raw)
To: Tony Lindgren, Tero Kristo
Cc: Benoît Cousson, Mike Turquette, linux-omap, linux-arm-kernel
On 02/22/2014 12:23 AM, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@ti.com> [140220 01:54]:
>> On 02/19/2014 09:26 PM, Florian Vaussard wrote:
>>>
>>> On 02/19/2014 05:22 PM, Tero Kristo wrote:
>>>> On 02/19/2014 11:15 AM, Florian Vaussard wrote:
>>>>> Hello,
>>>>>
>>>>> Trying to get my SMSC9221 working on OMAP4 with DT,
>>>>> I faced a misconfigured gpmc_fck (dummy clock set to 0)
>>>>> resulting in serveral division-by-zero, misconfigured
>>>>> timings and driver lost in the La La Land.
>>>>>
>>>>> To solve this, patch 1 removes gpmc_fck from the dummy
>>>>> clocks, and patch 2 adds the gpmc_fck DT node and
>>>>> reference it from the gpmc node.
>>>>>
>>>>> Tested on DuoVero/Parlor (OMAP4430) with SMSC9221.
>>>>
>>>> I can't test GPMC myself, but other than that, this set looks good to go.
>>>>
>>>
>>> Thank you. Would you like more test coverage by other people? I would
>>> like to see this in -rc if possible, as it is needed to boot my OMAP4
>>> system.
>>
>> Well, I just think the driver clock change should be acked by
>> someone who knows gpmc better than me.
>
> Hmm do we also need to fix this for other omaps? We at least have
> the following refrerences:
>
> $ git grep dummy_ck drivers/ | grep -i gpmc
> drivers/clk/ti/clk-44xx.c: DT_CLK("50000000.gpmc", "fck", "dummy_ck"),
> drivers/clk/ti/clk-54xx.c: DT_CLK(NULL, "gpmc_ck", "dummy_ck"),
> drivers/clk/ti/clk-7xx.c: DT_CLK(NULL, "gpmc_ck", "dummy_ck"),
>
Yes, the same applies to OMAP5 and DRA7. For OMAP5, gpmc_fclk is
connected to L3MAIN2_L3_GICLK, which is a gated l3_iclk. For DRA7, I
have no idea, as the TRM is not public. Someone from TI?
And I have no way to test this.
Cheers,
Florian
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <20140223212309.22529.75068@quantum>]
* Re: [PATCH v2 0/2] ARM: OMAP4: Fix gpmc_fck clock
[not found] ` <20140223212309.22529.75068@quantum>
@ 2014-02-24 5:44 ` Florian Vaussard
[not found] ` <20140225062615.22529.88499@quantum>
0 siblings, 1 reply; 12+ messages in thread
From: Florian Vaussard @ 2014-02-24 5:44 UTC (permalink / raw)
To: Mike Turquette, Tero Kristo, "\" Benoît Cousson",
Tony Lindgren
Cc: linux-omap, linux-arm-kernel
On 02/23/2014 10:23 PM, Mike Turquette wrote:
> Quoting Florian Vaussard (2014-02-19 11:26:43)
>>
>> On 02/19/2014 05:22 PM, Tero Kristo wrote:
>>> On 02/19/2014 11:15 AM, Florian Vaussard wrote:
>>>> Hello,
>>>>
>>>> Trying to get my SMSC9221 working on OMAP4 with DT,
>>>> I faced a misconfigured gpmc_fck (dummy clock set to 0)
>>>> resulting in serveral division-by-zero, misconfigured
>>>> timings and driver lost in the La La Land.
>>>>
>>>> To solve this, patch 1 removes gpmc_fck from the dummy
>>>> clocks, and patch 2 adds the gpmc_fck DT node and
>>>> reference it from the gpmc node.
>>>>
>>>> Tested on DuoVero/Parlor (OMAP4430) with SMSC9221.
>>>
>>> I can't test GPMC myself, but other than that, this set looks good to go.
>>>
>>
>> Thank you. Would you like more test coverage by other people? I would
>> like to see this in -rc if possible, as it is needed to boot my OMAP4
>> system.
>
> What OMAP4 system is this? Is this a regression for board that already
> has support merged into mainline?
>
No, it is not yet merged into mainline. I was planning to post the DTS
this week, when most issues are cleared. Looking at the current mainline
boards, no one seems to use the GPMC, so I am just the first one to hit
this issue.
Regards,
Florian
^ permalink raw reply [flat|nested] 12+ messages in thread