2016-11-02 12:48:07

by Axel Haslam

[permalink] [raw]
Subject: [PATCH 0/3] 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(-)

--
2.10.1


2016-11-02 12:48:10

by Axel Haslam

[permalink] [raw]
Subject: [PATCH 3/3] usb: ohci-da8xx: rename driver to ohci-da8xx

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.

Signed-off-by: Axel Haslam <[email protected]>
---
drivers/usb/host/ohci-da8xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index bd6cf3c..b3de8bc 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -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;

--
2.10.1

2016-11-02 12:48:27

by Axel Haslam

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

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.

Signed-off-by: Axel Haslam <[email protected]>
---
drivers/phy/phy-da8xx-usb.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/phy-da8xx-usb.c b/drivers/phy/phy-da8xx-usb.c
index 32ae78c..c85fb0b 100644
--- a/drivers/phy/phy-da8xx-usb.c
+++ b/drivers/phy/phy-da8xx-usb.c
@@ -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;
--
2.10.1

2016-11-02 12:48:48

by Axel Haslam

[permalink] [raw]
Subject: [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.

Signed-off-by: Axel Haslam <[email protected]>
---
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(-)

diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index 41459bd..073c458 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -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),
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 196e262..3961556 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -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),
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 92ae093..2afb067 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -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),
{}
diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c
index b010e5f..c6feecf 100644
--- a/arch/arm/mach-davinci/usb-da8xx.c
+++ b/arch/arm/mach-davinci/usb-da8xx.c
@@ -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),
--
2.10.1

2016-11-02 21:38:30

by David Lechner

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

On 11/02/2016 07:44 AM, Axel Haslam wrote:
> 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.

> 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.

>
> Signed-off-by: Axel Haslam <[email protected]>
> ---


2016-11-02 21:41:51

by David Lechner

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

On 11/02/2016 07:44 AM, Axel Haslam wrote:
> 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.

>
> Signed-off-by: Axel Haslam <[email protected]>
> ---

2016-11-02 21:44:10

by David Lechner

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

On 11/02/2016 07:44 AM, Axel Haslam wrote:
> 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.

2016-11-03 08:24:57

by Axel Haslam

[permalink] [raw]
Subject: Re: [PATCH 0/3] fix ohci phy name

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.

On Wed, Nov 2, 2016 at 1:44 PM, Axel Haslam <[email protected]> wrote:
> 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
>

2016-11-03 11:58:13

by Sekhar Nori

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

On Wednesday 02 November 2016 06:14 PM, Axel Haslam wrote:
> 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.
>
> Signed-off-by: Axel Haslam <[email protected]>
> ---
> drivers/usb/host/ohci-da8xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
> index bd6cf3c..b3de8bc 100644
> --- a/drivers/usb/host/ohci-da8xx.c
> +++ b/drivers/usb/host/ohci-da8xx.c
> @@ -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

2016-11-03 12:01:52

by Sekhar Nori

[permalink] [raw]
Subject: Re: [PATCH 0/3] fix ohci phy name

On Thursday 03 November 2016 01:54 PM, Axel Haslam wrote:
> 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

2016-11-03 12:20:03

by Axel Haslam

[permalink] [raw]
Subject: 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



On Thu, Nov 3, 2016 at 12:56 PM, Sekhar Nori <[email protected]> wrote:
> On Wednesday 02 November 2016 06:14 PM, Axel Haslam wrote:
>> 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.
>>
>> Signed-off-by: Axel Haslam <[email protected]>
>> ---
>> drivers/usb/host/ohci-da8xx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
>> index bd6cf3c..b3de8bc 100644
>> --- a/drivers/usb/host/ohci-da8xx.c
>> +++ b/drivers/usb/host/ohci-da8xx.c
>> @@ -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

2016-11-03 13:59:38

by Axel Haslam

[permalink] [raw]
Subject: Re: [PATCH 0/3] fix ohci phy name

On Thu, Nov 3, 2016 at 1:00 PM, Sekhar Nori <[email protected]> wrote:
> On Thursday 03 November 2016 01:54 PM, Axel Haslam wrote:
>> 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.
>

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

-Axel
> Thanks,
> Sekhar

2016-11-03 16:51:22

by Kishon Vijay Abraham I

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



On Wednesday 02 November 2016 06:14 PM, Axel Haslam wrote:
> 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.
>
> Signed-off-by: Axel Haslam <[email protected]>

Acked-by: Kishon Vijay Abraham I <[email protected]>
> ---
> drivers/phy/phy-da8xx-usb.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/phy/phy-da8xx-usb.c b/drivers/phy/phy-da8xx-usb.c
> index 32ae78c..c85fb0b 100644
> --- a/drivers/phy/phy-da8xx-usb.c
> +++ b/drivers/phy/phy-da8xx-usb.c
> @@ -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;
>

2016-11-04 05:35:41

by Sekhar Nori

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

Hi Kishon,

On Thursday 03 November 2016 10:20 PM, Kishon Vijay Abraham I wrote:
>
>
> On Wednesday 02 November 2016 06:14 PM, Axel Haslam wrote:
>> 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.
>>
>> Signed-off-by: Axel Haslam <[email protected]>
>
> Acked-by: Kishon Vijay Abraham I <[email protected]>

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

2016-11-04 21:05:30

by Kishon Vijay Abraham I

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



On Friday 04 November 2016 11:04 AM, Sekhar Nori wrote:
> Hi Kishon,
>
> On Thursday 03 November 2016 10:20 PM, Kishon Vijay Abraham I wrote:
>>
>>
>> On Wednesday 02 November 2016 06:14 PM, Axel Haslam wrote:
>>> 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.
>>>
>>> Signed-off-by: Axel Haslam <[email protected]>
>>
>> Acked-by: Kishon Vijay Abraham I <[email protected]>
>
> 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