2012-10-03 15:13:54

by Florian Fainelli

[permalink] [raw]
Subject: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver

Signed-off-by: Florian Fainelli <[email protected]>
---
arch/mips/netlogic/xlr/platform.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 71b44d8..1731dfd 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -15,6 +15,7 @@
#include <linux/serial_8250.h>
#include <linux/serial_reg.h>
#include <linux/i2c.h>
+#include <linux/usb/ehci_pdriver.h>

#include <asm/netlogic/haldefs.h>
#include <asm/netlogic/xlr/iomap.h>
@@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
}, \
}

+static struct usb_ehci_pdata xls_usb_ehci_pdata = {
+ .caps_offset = 0,
+};
+
static struct platform_device xls_usb_ehci_device =
USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
static struct platform_device xls_usb_ohci_device_0 =
@@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
memres = CPHYSADDR((unsigned long)usb_mmio);
xls_usb_ehci_device.resource[0].start = memres;
xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
+ xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;

memres += 0x400;
xls_usb_ohci_device_0.resource[0].start = memres;
--
1.7.9.5


2012-10-03 16:48:03

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver

On Wed, 3 Oct 2012, Florian Fainelli wrote:

> Signed-off-by: Florian Fainelli <[email protected]>

IMO, patches should always have a non-empty changelog. Even if it is
relatively trivial. The same comment applies to several other patches
in this series.

> ---
> arch/mips/netlogic/xlr/platform.c | 6 ++++++
> 1 file changed, 6 insertions(+)

Does this need to enable CONFIG_USB_EHCI_HCD_PLATFORM is some
defconfig file, like you did with the MIPS Loongson 1B?

And likewise for quite a few of the other patches in this series.

> diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
> index 71b44d8..1731dfd 100644
> --- a/arch/mips/netlogic/xlr/platform.c
> +++ b/arch/mips/netlogic/xlr/platform.c
> @@ -15,6 +15,7 @@
> #include <linux/serial_8250.h>
> #include <linux/serial_reg.h>
> #include <linux/i2c.h>
> +#include <linux/usb/ehci_pdriver.h>
>
> #include <asm/netlogic/haldefs.h>
> #include <asm/netlogic/xlr/iomap.h>
> @@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
> }, \
> }
>
> +static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> + .caps_offset = 0,
> +};
> +
> static struct platform_device xls_usb_ehci_device =
> USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
> static struct platform_device xls_usb_ohci_device_0 =
> @@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
> memres = CPHYSADDR((unsigned long)usb_mmio);
> xls_usb_ehci_device.resource[0].start = memres;
> xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
> + xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
>
> memres += 0x400;
> xls_usb_ohci_device_0.resource[0].start = memres;

Don't you need to change/set the pdev name also? Likewise for patch
20/25 and 24/25.

Alan Stern

2012-10-04 10:51:23

by Jonas Gorski

[permalink] [raw]
Subject: Re: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver

On 3 October 2012 17:02, Florian Fainelli <[email protected]> wrote:
> Signed-off-by: Florian Fainelli <[email protected]>
> ---
> arch/mips/netlogic/xlr/platform.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
> index 71b44d8..1731dfd 100644
> --- a/arch/mips/netlogic/xlr/platform.c
> +++ b/arch/mips/netlogic/xlr/platform.c
> @@ -15,6 +15,7 @@
> #include <linux/serial_8250.h>
> #include <linux/serial_reg.h>
> #include <linux/i2c.h>
> +#include <linux/usb/ehci_pdriver.h>
>
> #include <asm/netlogic/haldefs.h>
> #include <asm/netlogic/xlr/iomap.h>
> @@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
> }, \
> }
>
> +static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> + .caps_offset = 0,
> +};
> +
> static struct platform_device xls_usb_ehci_device =
> USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);

Don't you also need to change this to "ehci-platform"?

> static struct platform_device xls_usb_ohci_device_0 =
> @@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
> memres = CPHYSADDR((unsigned long)usb_mmio);
> xls_usb_ehci_device.resource[0].start = memres;
> xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
> + xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
>
> memres += 0x400;
> xls_usb_ohci_device_0.resource[0].start = memres;
> --
> 1.7.9.5

Jonas

2012-10-04 14:51:06

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 04/25] MIPS: Netlogic: use ehci-platform driver

On Wednesday 03 October 2012 12:47:58 Alan Stern wrote:
> On Wed, 3 Oct 2012, Florian Fainelli wrote:
>
> > Signed-off-by: Florian Fainelli <[email protected]>
>
> IMO, patches should always have a non-empty changelog. Even if it is
> relatively trivial. The same comment applies to several other patches
> in this series.
>
> > ---
> > arch/mips/netlogic/xlr/platform.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
>
> Does this need to enable CONFIG_USB_EHCI_HCD_PLATFORM is some
> defconfig file, like you did with the MIPS Loongson 1B?

Netlogic platforms have USB disabled by default in their defconfig, so I'd say
no, but only for them.

>
> And likewise for quite a few of the other patches in this series.
>
> > diff --git a/arch/mips/netlogic/xlr/platform.c
b/arch/mips/netlogic/xlr/platform.c
> > index 71b44d8..1731dfd 100644
> > --- a/arch/mips/netlogic/xlr/platform.c
> > +++ b/arch/mips/netlogic/xlr/platform.c
> > @@ -15,6 +15,7 @@
> > #include <linux/serial_8250.h>
> > #include <linux/serial_reg.h>
> > #include <linux/i2c.h>
> > +#include <linux/usb/ehci_pdriver.h>
> >
> > #include <asm/netlogic/haldefs.h>
> > #include <asm/netlogic/xlr/iomap.h>
> > @@ -123,6 +124,10 @@ static u64 xls_usb_dmamask = ~(u32)0;
> > }, \
> > }
> >
> > +static struct usb_ehci_pdata xls_usb_ehci_pdata = {
> > + .caps_offset = 0,
> > +};
> > +
> > static struct platform_device xls_usb_ehci_device =
> > USB_PLATFORM_DEV("ehci-xls", 0, PIC_USB_IRQ);
> > static struct platform_device xls_usb_ohci_device_0 =
> > @@ -172,6 +177,7 @@ int xls_platform_usb_init(void)
> > memres = CPHYSADDR((unsigned long)usb_mmio);
> > xls_usb_ehci_device.resource[0].start = memres;
> > xls_usb_ehci_device.resource[0].end = memres + 0x400 - 1;
> > + xls_usb_ehci_device.dev.platform_data = &xls_usb_ehci_pdata;
> >
> > memres += 0x400;
> > xls_usb_ohci_device_0.resource[0].start = memres;
>
> Don't you need to change/set the pdev name also? Likewise for patch
> 20/25 and 24/25.
>
> Alan Stern
>