Skip to contentSkip to conversation

fix ohci phy name

PATCH Superseded Axel Haslam 4 participants 15 messages Nov 2, 2016 – Nov 4, 2016

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover fix ohci phy name

The usb ohci clock match is not working because the usb clock is registered as "ohci" instead of "ohci.0"

But since there is only a single ohci instance, lets pass -1 to the platform data id parameter and avoid the extra ".0" matching.

while we are fixing this, rename the driver to "ohci-da8xx" to be consistent with davinci musb and other usb drivers.

Axel Haslam (3):
ARM: davinci: da8xx: Fix ohci driver name
phy: da8xx-usb: rename the ohci device to ohci-da8xx
usb: ohci-da8xx: rename driver to ohci-da8xx

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

PATCH 1/3 ARM: davinci: da8xx: Fix ohci driver name

There is a single instance of the ohci driver, while the clk lookup table is making reference to "ohci" other subsystems (such as phy) are looking for "ohci.0"

Since there is a single ohci instance, change the dev id to -1, and add the "-da8xx" for consitancy with the musb driver name.

---
 arch/arm/mach-davinci/da830.c     | 2 +-
 arch/arm/mach-davinci/da850.c     | 2 +-
 arch/arm/mach-davinci/da8xx-dt.c  | 2 +-
 arch/arm/mach-davinci/usb-da8xx.c | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-davinci/da830.c +1 -1
index 41459bd..073c458 100644
@@ -420,7 +420,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",		"usb11",	&usb11_clk),
+	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
 	CLK(NULL,		"emif3",	&emif3_clk),
 	CLK(NULL,		"arm",		&arm_clk),
 	CLK(NULL,		"rmii",		&rmii_clk),
arch/arm/mach-davinci/da850.c +1 -1
index 196e262..3961556 100644
@@ -503,7 +503,7 @@ static struct clk_lookup da850_clks[] = {
 	CLK("da830-mmc.1",	NULL,		&mmcsd1_clk),
 	CLK("ti-aemif",		NULL,		&aemif_clk),
 	CLK(NULL,		"aemif",	&aemif_clk),
-	CLK("ohci",		"usb11",	&usb11_clk),
+	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
 	CLK("musb-da8xx",	"usb20",	&usb20_clk),
 	CLK("spi_davinci.0",	NULL,		&spi0_clk),
 	CLK("spi_davinci.1",	NULL,		&spi1_clk),
arch/arm/mach-davinci/da8xx-dt.c +1 -1
index 92ae093..2afb067 100644
@@ -39,7 +39,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL),
 	OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL),
 	OF_DEV_AUXDATA("ti,da850-tilcdc", 0x01e13000, "da8xx_lcdc.0", NULL),
-	OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci", NULL),
+	OF_DEV_AUXDATA("ti,da830-ohci", 0x01e25000, "ohci-da8xx", NULL),
 	OF_DEV_AUXDATA("ti,da830-musb", 0x01e00000, "musb-da8xx", NULL),
 	OF_DEV_AUXDATA("ti,da830-usb-phy", 0x01c1417c, "da8xx-usb-phy", NULL),
 	{}
arch/arm/mach-davinci/usb-da8xx.c +2 -2
index b010e5f..c6feecf 100644
@@ -109,8 +109,8 @@ static struct resource da8xx_usb11_resources[] = {
 static u64 da8xx_usb11_dma_mask = DMA_BIT_MASK(32);
 
 static struct platform_device da8xx_usb11_device = {
-	.name		= "ohci",
-	.id		= 0,
+	.name		= "ohci-da8xx",
+	.id		= -1,
 	.dev = {
 		.dma_mask		= &da8xx_usb11_dma_mask,
 		.coherent_dma_mask	= DMA_BIT_MASK(32),
Signature · 1 line
2.10.1
#2 lore raw

Re: [PATCH 1/3] ARM: davinci: da8xx: Fix ohci driver name

Quoted 4 lines · Axel Haslam

There is a single instance of the ohci driver, while the clk lookup table is making reference to "ohci" other subsystems (such as phy) are looking for "ohci.0"

This patch changes the "device" name, not the "driver" name. You use "driver" above and in the subject.

Quoted 3 lines

Since there is a single ohci instance, change the dev id to -1, and add the "-da8xx" for consitancy with the musb driver name.

It would be more accurate to say that you are adding "-da8xx" because you are also changing the ohci _driver_ name in a separate patch.

Quoted 3 lines

---

#3 lore raw

PATCH 2/3 phy: da8xx-usb: rename the ohci device to ohci-da8xx

In reply to Axel Haslam

There is only one ohci on the da8xx series of chips, so remove the ".0" when creating the phy. Also add the "-da8xx" postfix to be consistent across davinci usb drivers.

---
 drivers/phy/phy-da8xx-usb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-da8xx-usb.c +3 -2
index 32ae78c..c85fb0b 100644
@@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
 	} else {
 		int ret;
 
-		ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
+		ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy",
+					"ohci-da8xx");
 		if (ret)
 			dev_warn(dev, "Failed to create usb11 phy lookup\n");
 		ret = phy_create_lookup(d_phy->usb20_phy, "usb-phy",
@@ -216,7 +217,7 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)
 
 	if (!pdev->dev.of_node) {
 		phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
-		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
+		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
 	}
 
 	return 0;
Signature · 1 line
2.10.1
#4 lore raw

Re: [PATCH 2/3] phy: da8xx-usb: rename the ohci device to ohci-da8xx

Quoted 4 lines · Axel Haslam

There is only one ohci on the da8xx series of chips, so remove the ".0" when creating the phy. Also add the "-da8xx" postfix to be consistent across davinci usb drivers.

It would be more accurate to say that the device name is being changed in the mach board configuration files, so it is being changed here in the lookup table to match the new name.

Quoted 3 lines

---

Acked-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] phy: da8xx-usb: rename the ohci device to ohci-da8xx

In reply to Axel Haslam
Quoted 6 lines · Axel Haslam

There is only one ohci on the da8xx series of chips, so remove the ".0" when creating the phy. Also add the "-da8xx" postfix to be consistent across davinci usb drivers.

Quoted 28 lines
---
 drivers/phy/phy-da8xx-usb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-da8xx-usb.c +3 -2
index 32ae78c..c85fb0b 100644
@@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
 	} else {
 		int ret;
 
-		ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
+		ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy",
+					"ohci-da8xx");
 		if (ret)
 			dev_warn(dev, "Failed to create usb11 phy lookup\n");
 		ret = phy_create_lookup(d_phy->usb20_phy, "usb-phy",
@@ -216,7 +217,7 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)
 
 	if (!pdev->dev.of_node) {
 		phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
-		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
+		phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
 	}
 
 	return 0;
#6 lore raw

Re: [PATCH 2/3] phy: da8xx-usb: rename the ohci device to ohci-da8xx

Hi Kishon,

Quoted 11 lines · Kishon Vijay Abraham I
Quoted 6 lines · Axel Haslam

There is only one ohci on the da8xx series of chips, so remove the ".0" when creating the phy. Also add the "-da8xx" postfix to be consistent across davinci usb drivers.

You will have to carry this patch from your tree. I thought I can carry the entire series, but the USB patch depends on other patches that Greg has already queued. So I think its best if the individual patches go through their respective trees.

Note that there is a v2 already submitted.

Thanks,
Sekhar

#7 lore raw

Re: [PATCH 2/3] phy: da8xx-usb: rename the ohci device to ohci-da8xx

Quoted 13 lines · Sekhar Nori

Hi Kishon,

Quoted 10 lines · Kishon Vijay Abraham I
Quoted 6 lines · Axel Haslam

There is only one ohci on the da8xx series of chips, so remove the ".0" when creating the phy. Also add the "-da8xx" postfix to be consistent across davinci usb drivers.

Quoted 8 lines
Quoted 1 line

You will have to carry this patch from your tree. I thought I can carry the entire series, but the USB patch depends on other patches that Greg has already queued. So I think its best if the individual patches go through their respective trees.

Note that there is a v2 already submitted.

Okay. I can pick them in my tree.

Thanks
Kishon

#8 lore raw

PATCH 3/3 usb: ohci-da8xx: rename driver to ohci-da8xx

In reply to Axel Haslam

To be consistent on the usb driver for the davinci platform follow the example of musb, and add the "-da8xx" postfix to the driver name.

---
 drivers/usb/host/ohci-da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-da8xx.c +1 -1
index bd6cf3c..b3de8bc 100644
@@ -27,7 +27,7 @@
 #include "ohci.h"
 
 #define DRIVER_DESC "DA8XX"
-#define DRV_NAME "ohci"
+#define DRV_NAME "ohci-da8xx"
 
 static struct hc_driver __read_mostly ohci_da8xx_hc_driver;
 
Signature · 1 line
2.10.1
#9 lore raw

Re: [PATCH 3/3] usb: ohci-da8xx: rename driver to ohci-da8xx

Quoted 4 lines · Axel Haslam

To be consistent on the usb driver for the davinci platform follow the example of musb, and add the "-da8xx" postfix to the driver name.

It is probably worth mentioning that the existing driver name is "ohci" which is a bit too generic.

#10 lore raw

Re: [PATCH 3/3] usb: ohci-da8xx: rename driver to ohci-da8xx

In reply to Axel Haslam
Quoted 14 lines · Axel Haslam

To be consistent on the usb driver for the davinci platform follow the example of musb, and add the "-da8xx" postfix to the driver name.

---
 drivers/usb/host/ohci-da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-da8xx.c +0 -0
index bd6cf3c..b3de8bc 100644

drivers/usb/host/ohci-da8xx.c line 30

Quoted 5 lines
drivers/usb/host/ohci-da8xx.c +1 -1
@@ -27,7 +27,7 @@
 #include "ohci.h"
 
 #define DRIVER_DESC "DA8XX"
-#define DRV_NAME "ohci"
+#define DRV_NAME "ohci-da8xx"

To which baseline does this patch apply? I don't see this code in linux-next.

Thanks,
Sekhar

#11 lore raw

Re: [PATCH 3/3] usb: ohci-da8xx: rename driver to ohci-da8xx

Hi Sekhar,

The baseline used was the branch usb-next, in Greg's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git

Linux next is missing this patch[1] which was applied last week, but not yet pulled into linux-next. it will be there soon.

Sorry, i did not mention it, i thought it would be already on linux-next.

[1]
6c21caa USB: OHCI: make ohci-da8xx a separate driver
https://lkml.org/lkml/2016/10/27/120

Regards
Axel

Quoted 26 lines · Sekhar Nori
Quoted 14 lines · Axel Haslam

To be consistent on the usb driver for the davinci platform follow the example of musb, and add the "-da8xx" postfix to the driver name.

---
 drivers/usb/host/ohci-da8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-da8xx.c +0 -0
index bd6cf3c..b3de8bc 100644

drivers/usb/host/ohci-da8xx.c line 30

Quoted 5 lines
drivers/usb/host/ohci-da8xx.c +1 -1
@@ -27,7 +27,7 @@
 #include "ohci.h"
 
 #define DRIVER_DESC "DA8XX"
-#define DRV_NAME "ohci"
+#define DRV_NAME "ohci-da8xx"

To which baseline does this patch apply? I don't see this code in linux-next.

Thanks,
Sekhar

#12 lore raw
In reply to Axel Haslam

Hi Sekhar, David,

It might make sense to have this patch series,
squashed into a single patch, would you agree,
or do you prefer it as is: one-per-subsystem?

Regards
Axel.

Quoted 25 lines · Axel Haslam

The usb ohci clock match is not working because the usb clock is registered as "ohci" instead of "ohci.0"

But since there is only a single ohci instance, lets pass -1 to the platform data id parameter and avoid the extra ".0" matching.

while we are fixing this, rename the driver to "ohci-da8xx" to be consistent with davinci musb and other usb drivers.

Axel Haslam (3):
ARM: davinci: da8xx: Fix ohci driver name
phy: da8xx-usb: rename the ohci device to ohci-da8xx
usb: ohci-da8xx: rename driver to ohci-da8xx

 arch/arm/mach-davinci/da830.c     | 2 +-
 arch/arm/mach-davinci/da850.c     | 2 +-
 arch/arm/mach-davinci/da8xx-dt.c  | 2 +-
 arch/arm/mach-davinci/usb-da8xx.c | 4 ++--
 drivers/phy/phy-da8xx-usb.c       | 5 +++--
 drivers/usb/host/ohci-da8xx.c     | 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

--
2.10.1

#13 lore raw
Quoted 5 lines · Axel Haslam

Hi Sekhar, David,

It might make sense to have this patch series,
squashed into a single patch, would you agree,
or do you prefer it as is: one-per-subsystem?

Patches in the current form are okay. Some coordination is required in getting them merged though. I am happy to take the driver patches through ARM-SoC with ack from respective maintainers.

I will need to carry the platform patch through my tree because it conflicts with other changes I have already queued.

That said, I am unable to review 3/3 since I am unable to find its baseline.

Thanks,
Sekhar

#14 lore raw
Quoted 7 lines · Sekhar Nori
Quoted 5 lines · Axel Haslam

Hi Sekhar, David,

It might make sense to have this patch series,
squashed into a single patch, would you agree,
or do you prefer it as is: one-per-subsystem?

Quoted 9 lines

Patches in the current form are okay. Some coordination is required in getting them merged though. I am happy to take the driver patches through ARM-SoC with ack from respective maintainers.

I will need to carry the platform patch through my tree because it conflicts with other changes I have already queued.

That said, I am unable to review 3/3 since I am unable to find its baseline.

ok, ill send v2 fixing Davids comments on the commit messages and referencing the missing patch that is queued on usb-next.

-Axel

Quoted 2 lines

Thanks,
Sekhar