Skip to contentSkip to conversation

clk: davinci: psc-da830: fix USB0 48MHz PHY clock registration

PATCH New Sekhar Nori 3 participants 5 messages May 7, 2018 – May 18, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: davinci: psc-da830: fix USB0 48MHz PHY clock registration

USB0 48MHz PHY clock registration fails on DA830 because the da8xx-cfgchip clock driver cannot get a reference to USB0 LPSC clock.

The USB0 LPSC needs to be enabled during PHY clock enable. Setup the clock lookup correctly to fix this.

---
 drivers/clk/davinci/psc-da830.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/davinci/psc-da830.c +2 -1
index f61abf5632ff..081b039fcb02 100644
@@ -55,7 +55,8 @@ const struct davinci_psc_init_data da830_psc0_init_data = {
 	.psc_init		= &da830_psc0_init,
 };
 
-LPSC_CLKDEV2(usb0_clkdev,	NULL,	"musb-da8xx",
+LPSC_CLKDEV3(usb0_clkdev,	"fck",	"da830-usb-phy-clks",
+				NULL,	"musb-da8xx",
 				NULL,	"cppi41-dmaengine");
 LPSC_CLKDEV1(usb1_clkdev,	NULL,	"ohci-da8xx");
 /* REVISIT: gpio-davinci.c should be modified to drop con_id */
Signature · 1 line
2.16.2
maintainer
#1 lore raw

PATCH 1/1 clk: davinci: psc-da830: fix USB0 48MHz PHY clock registration

Quoted 18 lines · Sekhar Nori

USB0 48MHz PHY clock registration fails on DA830 because the da8xx-cfgchip clock driver cannot get a reference to USB0 LPSC clock.

The USB0 LPSC needs to be enabled during PHY clock enable. Setup the clock lookup correctly to fix this.

---
  drivers/clk/davinci/psc-da830.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/davinci/psc-da830.c +0 -0
index f61abf5632ff..081b039fcb02 100644

drivers/clk/davinci/psc-da830.c const struct davinci_psc_init_data da830_psc0_init_data = { · line 62

Quoted 9 lines
drivers/clk/davinci/psc-da830.c +2 -1
@@ -55,7 +55,8 @@ const struct davinci_psc_init_data da830_psc0_init_data = {
  	.psc_init		= &da830_psc0_init,
  };
 
-LPSC_CLKDEV2(usb0_clkdev,	NULL,	"musb-da8xx",
+LPSC_CLKDEV3(usb0_clkdev,	"fck",	"da830-usb-phy-clks",
+				NULL,	"musb-da8xx",
  				NULL,	"cppi41-dmaengine");
  LPSC_CLKDEV1(usb1_clkdev,	NULL,	"ohci-da8xx");
  /* REVISIT: gpio-davinci.c should be modified to drop con_id */
maintainer Applied
#2 lore raw

PATCH 1/1 clk: davinci: psc-da830: fix USB0 48MHz PHY clock registration

In reply to Sekhar Nori

Quoting Sekhar Nori (2018-05-07 04:34:57)

Quoted 9 lines

USB0 48MHz PHY clock registration fails on DA830 because the da8xx-cfgchip clock driver cannot get a reference to USB0 LPSC clock.

The USB0 LPSC needs to be enabled during PHY clock enable. Setup the clock lookup correctly to fix this.

---

Applied to clk-next

Did this need a fixes tag? And should it go into 4.17 final? Or it's not causing problems right now?

#3 lore raw

PATCH 1/1 clk: davinci: psc-da830: fix USB0 48MHz PHY clock registration

Hi Stephen,

Quoted 8 lines · Stephen Boyd

Quoting Sekhar Nori (2018-05-07 04:34:57)

Quoted 7 lines

USB0 48MHz PHY clock registration fails on DA830 because the da8xx-cfgchip clock driver cannot get a reference to USB0 LPSC clock.

The USB0 LPSC needs to be enabled during PHY clock enable. Setup the clock lookup correctly to fix this.

Quoted 7 lines
Quoted 2 lines

---

Applied to clk-next

Did this need a fixes tag? And should it go into 4.17 final? Or it's not causing problems right now?

We have not switched DaVinci to use common clock framework still. So no, this does not cause problems right now. All drivers/clk/davinci/* patches can be included for v4.18.

Although if you are sending a v4.17 pull request to Linus anyway, and can include this, I would not mind it ;) We don't need stable backports definitely, so no need to add a Fixes: tag.

Thanks,
Sekhar

#4 lore raw

PATCH 1/1 clk: davinci: psc-da830: fix USB0 48MHz PHY clock registration

Hi Stephen,

Quoted 14 lines · Sekhar Nori

Hi Stephen,

Quoted 11 lines · Stephen Boyd

Quoting Sekhar Nori (2018-05-07 04:34:57)

Quoted 9 lines

USB0 48MHz PHY clock registration fails on DA830 because the da8xx-cfgchip clock driver cannot get a reference to USB0 LPSC clock.

The USB0 LPSC needs to be enabled during PHY clock enable. Setup the clock lookup correctly to fix this.

---

Quoted 8 lines
Quoted 4 lines

Applied to clk-next

Did this need a fixes tag? And should it go into 4.17 final? Or it's not causing problems right now?

We have not switched DaVinci to use common clock framework still. So no, this does not cause problems right now. All drivers/clk/davinci/* patches can be included for v4.18.

There are some more patches (fixes) to drivers/clk/davinci which have been reviewed and both David and I think are ready for merge[1].

Do you have them in your queue? Else, I can send a pull request for you to take a look and merge.

Thanks,
Sekhar

[1]
clk: davinci: psc-dm365: fix few clocks
clk: davinci: pll-dm646x: keep PLL2 SYSCLK1 always enabled
clk: davinci: psc-dm355: fix ASP0/1 clkdev lookups
clk: davinci: pll-dm355: fix SYSCLKn parent names
clk: davinci: pll-dm355: drop pll2_sysclk2