Skip to contentSkip to conversation

ARM: da8xx: remove con_id from USB clocks

PATCH New David Lechner 1 participant 4 messages Jan 7, 2018

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

cover ARM: da8xx: remove con_id from USB clocks

This series removes unnecessary con_ids on da8xx USB clocks in preparation of adding device tree support for clocks on this platform.

Note: this is a resend of "USB: musb: da8xx: remove clock con_id" and "USB: ohci: da8xx: remove clk con_id". I sent them before I realized that things break if you don't also remove the con_id when registering the clkdev. :-/

David Lechner (3):
USB: musb: da8xx: remove clock con_id
USB: ohci: da8xx: remove clk con_id
ARM: da8xx: remove con_id from USB clocks

 arch/arm/mach-davinci/da830.c | 4 ++--
 arch/arm/mach-davinci/da850.c | 4 ++--
 drivers/usb/host/ohci-da8xx.c | 2 +-
 drivers/usb/musb/da8xx.c      | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/3 USB: musb: da8xx: remove clock con_id

There is only one clock for the DA8xx MUSB device, so we don't need the con_id, so remove it. This way we don't have to add an unnecessary property to the device tree bindings for the clock.

---
 drivers/usb/musb/da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/da8xx.c +1 -1
index 6c036de..b8295ce 100644
@@ -520,7 +520,7 @@ static int da8xx_probe(struct platform_device *pdev)
 	if (!glue)
 		return -ENOMEM;
 
-	clk = devm_clk_get(&pdev->dev, "usb20");
+	clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(clk)) {
 		dev_err(&pdev->dev, "failed to get clock\n");
 		return PTR_ERR(clk);
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/3 USB: ohci: da8xx: remove clk con_id

In reply to David Lechner

The ohci-da8xx device only has one clock, so a con_id is not needed, so remove it. This way we don't have to add an unnecessary property to the device tree bindings for the clock.

---
 drivers/usb/host/ohci-da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-da8xx.c +1 -1
index 0c507a0..a55cbba 100644
@@ -413,7 +413,7 @@ static int ohci_da8xx_probe(struct platform_device *pdev)
 	da8xx_ohci = to_da8xx_ohci(hcd);
 	da8xx_ohci->hcd = hcd;
 
-	da8xx_ohci->usb11_clk = devm_clk_get(&pdev->dev, "usb11");
+	da8xx_ohci->usb11_clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(da8xx_ohci->usb11_clk)) {
 		error = PTR_ERR(da8xx_ohci->usb11_clk);
 		if (error != -EPROBE_DEFER)
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/3 ARM: da8xx: remove con_id from USB clocks

In reply to David Lechner

There is only one clock each for "musb-da8xx" and "ohci-da8xx", so we do not the the con_id. Removing them will also prevent needing an unnecessary device tree property when device tree bindings are added for clocks.

---
 arch/arm/mach-davinci/da830.c | 4 ++--
 arch/arm/mach-davinci/da850.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-davinci/da830.c +2 -2
index ed0b700..57ab18c 100644
@@ -417,7 +417,7 @@ static struct clk_lookup da830_clks[] = {
 	CLK("davinci-mcasp.0",	NULL,		&mcasp0_clk),
 	CLK("davinci-mcasp.1",	NULL,		&mcasp1_clk),
 	CLK("davinci-mcasp.2",	NULL,		&mcasp2_clk),
-	CLK("musb-da8xx",	"usb20",	&usb20_clk),
+	CLK("musb-da8xx",	NULL,		&usb20_clk),
 	CLK("cppi41-dmaengine",	NULL,		&cppi41_clk),
 	CLK(NULL,		"aemif",	&aemif_clk),
 	CLK(NULL,		"aintc",	&aintc_clk),
@@ -426,7 +426,7 @@ static struct clk_lookup da830_clks[] = {
 	CLK("davinci_mdio.0",   "fck",          &emac_clk),
 	CLK(NULL,		"gpio",		&gpio_clk),
 	CLK("i2c_davinci.2",	NULL,		&i2c1_clk),
-	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
+	CLK("ohci-da8xx",	NULL,	&usb11_clk),
 	CLK(NULL,		"emif3",	&emif3_clk),
 	CLK(NULL,		"arm",		&arm_clk),
 	CLK(NULL,		"rmii",		&rmii_clk),
arch/arm/mach-davinci/da850.c +2 -2
index 04a58a3..aa37cbd 100644
@@ -563,8 +563,8 @@ static struct clk_lookup da850_clks[] = {
 	CLK("da830-mmc.1",	NULL,		&mmcsd1_clk),
 	CLK("ti-aemif",		NULL,		&aemif_clk),
 	CLK("davinci-nand.0",	"aemif",	&aemif_nand_clk),
-	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
-	CLK("musb-da8xx",	"usb20",	&usb20_clk),
+	CLK("ohci-da8xx",	NULL,		&usb11_clk),
+	CLK("musb-da8xx",	NULL,		&usb20_clk),
 	CLK("cppi41-dmaengine",	NULL,		&cppi41_clk),
 	CLK("spi_davinci.0",	NULL,		&spi0_clk),
 	CLK("spi_davinci.1",	NULL,		&spi1_clk),
Signature · 1 line
2.7.4