ARM: OMAP4: Fix gpmc_fck clock
Subsystems (3)
v2 cover ARM: OMAP4: Fix gpmc_fck clock
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.
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(-)
Signature · 1 line
1.8.1.2
PATCH v2 1/2 CLK: TI: OMAP4: Remove gpmc_fck from dummy clocks
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.
--- drivers/clk/ti/clk-44xx.c | 1 - 1 file changed, 1 deletion(-)
drivers/clk/ti/clk-44xx.c +0 -1
@@ -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"),
Signature · 1 line
1.8.1.2
PATCH v2 2/2 ARM: DTS: OMAP4: Use l3_ick for the gpmc node
In reply to Florian VaussardThe 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.
--- arch/arm/boot/dts/omap4.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/omap4.dtsi +2 -0
@@ -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 at 4806a000 {
Signature · 1 line
1.8.1.2
v2 cover ARM: OMAP4: Fix gpmc_fck clock
In reply to Florian VaussardQuoted 7 lines · Florian Vaussard
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.
Quoted 5 lines
To solve this, patch 1 removes
gpmc_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT 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
Quoted 15 lines
Regards,
Florian
---
Since v1:
- Removed thegpmc_fckclock node, and reference directlyl3_ickFlorian Vaussard (2):
CLK: TI: OMAP4: Removegpmc_fckfrom dummy clocks
ARM: DTS: OMAP4: Usel3_ickfor the gpmc nodearch/arm/boot/dts/omap4.dtsi | 2 ++ drivers/clk/ti/clk-44xx.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Quoted 8 lines · Tero Kristo
Quoted 7 lines · Florian Vaussard
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.
Quoted 8 lines
Quoted 5 lines
To solve this, patch 1 removes
gpmc_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT 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
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Quoted 14 lines · Florian Vaussard
Quoted 12 lines · Tero Kristo
Quoted 11 lines · Florian Vaussard
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_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT node and reference it from the gpmc node.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Quoted 20 lines · Tero Kristo
Quoted 19 lines · Florian Vaussard
Quoted 16 lines · Tero Kristo
Quoted 7 lines · Florian Vaussard
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.Quoted 5 lines
To solve this, patch 1 removes
gpmc_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT 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.
Quoted 6 lines
Quoted 3 lines
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
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Quoted 28 lines · Tony Lindgren
Quoted 20 lines · Tero Kristo
Quoted 19 lines · Florian Vaussard
Quoted 16 lines · Tero Kristo
Quoted 7 lines · Florian Vaussard
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.Quoted 5 lines
To solve this, patch 1 removes
gpmc_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT 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.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 8 lines
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
A message that is not in the archive (sent off-list or not yet received): 20140223212309.22529.75068@quantum
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Quoted 20 lines · Mike Turquette
Quoting Florian Vaussard (2014-02-19 11:26:43)
Quoted 19 lines · Tero Kristo
Quoted 16 lines · Florian Vaussard
Quoted 7 lines
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.Quoted 5 lines
To solve this, patch 1 removes
gpmc_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT 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.
Quoted 7 lines
Quoted 3 lines
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
A message that is not in the archive (sent off-list or not yet received): 20140225062615.22529.88499@quantum
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Quoted 30 lines · Mike Turquette
Quoting Florian Vaussard (2014-02-23 21:44:25)
Quoted 29 lines · Mike Turquette
Quoted 27 lines
Quoting Florian Vaussard (2014-02-19 11:26:43)
Quoted 14 lines · Tero Kristo
Quoted 12 lines · Florian Vaussard
Quoted 11 lines
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_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT node and reference it from the gpmc node.Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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?
Quoted 9 lines
Quoted 4 lines
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.
OK, well typically the later -rc's are for fixing observed regressions. Since your platform is not yet merged in then it's probably fine to push this for 3.15.
Fair enough. 3.15 is fine.
Quoted 2 lines
This also gives time to test the fix for other OMAP-ish processors.
I can do the v3, including OMAP5 and DRA7. But for DRA7, I will need someone with the TRM telling me where is connected gpmc_fclk (Suman?).
BTW, your mail client seems to have corrupted the To: header, double quotes " are missing between Tero, Beno?t and Tony's addresses, mixing them as the same person. Maybe an indigestion caused by the UTF8 character of Beno?t?
Regards,
Florian
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Florian,
Quoted 41 lines · Florian Vaussard
Quoted 30 lines · Mike Turquette
Quoting Florian Vaussard (2014-02-23 21:44:25)
Quoted 29 lines · Mike Turquette
Quoted 27 lines
Quoting Florian Vaussard (2014-02-19 11:26:43)
Quoted 14 lines · Tero Kristo
Quoted 12 lines · Florian Vaussard
Quoted 11 lines
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_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT node and reference it from the gpmc node.Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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?
Quoted 9 lines
Quoted 4 lines
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.
OK, well typically the later -rc's are for fixing observed regressions. Since your platform is not yet merged in then it's probably fine to push this for 3.15.
Quoted 7 lines
Fair enough. 3.15 is fine.
Quoted 2 lines
This also gives time to test the fix for other OMAP-ish processors.
I can do the v3, including OMAP5 and DRA7. But for DRA7, I will need someone with the TRM telling me where is connected
gpmc_fclk(Suman?).
For DRA7, GPMC is connected off L3MAIN1_L3_GICLK (compared to L3MAIN2_L3_GICLK on OMAP5), both of which are actually just L3_ICLK. This is the l3_iclk_div in both the omap54xx-clocks.dtsi and dra7xx-clocks.dtsi files.
regards
Suman
v2 cover ARM: OMAP4: Fix gpmc_fck clock
Hi Suman,
Quoted 51 lines · Suman Anna
Florian,
Quoted 48 lines · Florian Vaussard
Quoted 37 lines · Mike Turquette
Quoting Florian Vaussard (2014-02-23 21:44:25)
Quoted 30 lines · Mike Turquette
Quoted 21 lines
Quoting Florian Vaussard (2014-02-19 11:26:43)
Quoted 20 lines · Tero Kristo
Quoted 17 lines · Florian Vaussard
Quoted 7 lines
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.Quoted 5 lines
To solve this, patch 1 removes
gpmc_fckfrom the dummy clocks, and patch 2 adds thegpmc_fckDT 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.
Quoted 7 lines
Quoted 3 lines
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?
Quoted 5 lines
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.Quoted 4 lines
OK, well typically the later -rc's are for fixing observed regressions. Since your platform is not yet merged in then it's probably fine to push this for 3.15.
Fair enough. 3.15 is fine.
Quoted 2 lines
This also gives time to test the fix for other OMAP-ish processors.
Quoted 8 lines
Quoted 2 lines
I can do the v3, including OMAP5 and DRA7. But for DRA7, I will need someone with the TRM telling me where is connected
gpmc_fclk(Suman?).For DRA7, GPMC is connected off
L3MAIN1_L3_GICLK(compared toL3MAIN2_L3_GICLKon OMAP5), both of which are actually justL3_ICLK. This is thel3_iclk_divin both theomap54xx-clocks.dtsianddra7xx-clocks.dtsifiles.
Thank you very much. So I will send a v3 including this.
Regards,
Florian