diff mbox

[U-Boot,3/5] usb: s3c-otg: Split out PHY control

Message ID 201411062123.46514.marex@denx.de
State Accepted
Delegated to: Marek Vasut
Headers show

Commit Message

Marek Vasut Nov. 6, 2014, 8:23 p.m. UTC
On Thursday, November 06, 2014 at 10:59:17 AM, Lukasz Majewski wrote:
> Hi Marek,
> 
> > Split the Samsung specific PHY control into a separate file
> > and compile this into the S3C OTG driver only if used on a
> > Samsung system.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Chin Liang See <clsee@altera.com>
> > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > Cc: Vince Bridgers <vbridger@altera.com>
> > Cc: Pavel Machek <pavel@denx.de>
> > Cc: Stefan Roese <sr@denx.de>
> > Cc: Lukasz Majewski <l.majewski@samsung.com>

[...]

> Build HW: trats2 (Exynos4412)
> 
> CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-2013
> .12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-3.12-
> sanitized/bin/arm-v7a-linux-gnueabi-
> 
> Patches applied on top of v2014.10.

Try this trivial patch (add missing include):


Best regards,
Marek Vasut

Comments

Lukasz Majewski Nov. 6, 2014, 9:29 p.m. UTC | #1
On Thu, 6 Nov 2014 21:23:46 +0100
Marek Vasut <marex@denx.de> wrote:

> On Thursday, November 06, 2014 at 10:59:17 AM, Lukasz Majewski wrote:
> > Hi Marek,
> > 
> > > Split the Samsung specific PHY control into a separate file
> > > and compile this into the S3C OTG driver only if used on a
> > > Samsung system.
> > > 
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > Cc: Chin Liang See <clsee@altera.com>
> > > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > Cc: Vince Bridgers <vbridger@altera.com>
> > > Cc: Pavel Machek <pavel@denx.de>
> > > Cc: Stefan Roese <sr@denx.de>
> > > Cc: Lukasz Majewski <l.majewski@samsung.com>
> 
> [...]
> 
> > Build HW: trats2 (Exynos4412)
> > 
> > CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-2013
> > .12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-3.12-
> > sanitized/bin/arm-v7a-linux-gnueabi-
> > 
> > Patches applied on top of v2014.10.
> 
> Try this trivial patch (add missing include):
> 
> diff --git a/drivers/usb/gadget/s3c_udc_otg_phy.c 
> b/drivers/usb/gadget/s3c_udc_otg_phy.c
> index 055fe86..95bd8cf 100644
> --- a/drivers/usb/gadget/s3c_udc_otg_phy.c
> +++ b/drivers/usb/gadget/s3c_udc_otg_phy.c
> @@ -35,6 +35,8 @@
>  #include "regs-otg.h"
>  #include <usb/lin_gadget_compat.h>
>  
> +#include <usb/s3c_udc.h>
> +

Ok, I will apply it and let you know about the result.

BTW: I assume that your work is to reuse the USB 2.0 UDC IP block
(probably in Altera).

I'd be elated if this is true :-).

>  void otg_phy_init(struct s3c_udc *dev)
>  {
>         unsigned int usb_phy_ctrl = dev->pdata->usb_phy_ctrl;
> 
> Best regards,
> Marek Vasut
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Best regards,
Lukasz Majewski
Marek Vasut Nov. 7, 2014, 8:05 a.m. UTC | #2
On Thursday, November 06, 2014 at 10:29:03 PM, Lukasz Majewski wrote:
> On Thu, 6 Nov 2014 21:23:46 +0100

Hi!

> Marek Vasut <marex@denx.de> wrote:
> > On Thursday, November 06, 2014 at 10:59:17 AM, Lukasz Majewski wrote:
> > > Hi Marek,
> > > 
> > > > Split the Samsung specific PHY control into a separate file
> > > > and compile this into the S3C OTG driver only if used on a
> > > > Samsung system.
> > > > 
> > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > Cc: Chin Liang See <clsee@altera.com>
> > > > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > > Cc: Vince Bridgers <vbridger@altera.com>
> > > > Cc: Pavel Machek <pavel@denx.de>
> > > > Cc: Stefan Roese <sr@denx.de>
> > > > Cc: Lukasz Majewski <l.majewski@samsung.com>
> > 
> > [...]
> > 
> > > Build HW: trats2 (Exynos4412)
> > > 
> > > CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-
> > > 2013
> > > .12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-
> > > 3.12- sanitized/bin/arm-v7a-linux-gnueabi-
> > > 
> > > Patches applied on top of v2014.10.
> > 
> > Try this trivial patch (add missing include):
> > 
> > diff --git a/drivers/usb/gadget/s3c_udc_otg_phy.c
> > b/drivers/usb/gadget/s3c_udc_otg_phy.c
> > index 055fe86..95bd8cf 100644
> > --- a/drivers/usb/gadget/s3c_udc_otg_phy.c
> > +++ b/drivers/usb/gadget/s3c_udc_otg_phy.c
> > @@ -35,6 +35,8 @@
> > 
> >  #include "regs-otg.h"
> >  #include <usb/lin_gadget_compat.h>
> > 
> > +#include <usb/s3c_udc.h>
> > +
> 
> Ok, I will apply it and let you know about the result.
> 
> BTW: I assume that your work is to reuse the USB 2.0 UDC IP block
> (probably in Altera).

Yep, I got the UDC working on my SoCFPGA board. We should probably
rename the s3c-otg driver to something more fitting (dwc2-udc ?)
and strive to somehow merge the dwc2-host and dwc2-udc drivers in
the long run.

Speaking of the rename, I'd like to leave that for the next MW, to
make sure it doesn't break any tools which might for example depend
on the name of the driver.

> I'd be elated if this is true :-).

It is :) ... it must have been hard to tell from patch 5/5 ;-)

Best regards,
Marek Vasut
Ɓukasz Majewski Nov. 7, 2014, 10:40 a.m. UTC | #3
Hi Marek,

> On Thursday, November 06, 2014 at 10:29:03 PM, Lukasz Majewski wrote:
> > On Thu, 6 Nov 2014 21:23:46 +0100
> 
> Hi!
> 
> > Marek Vasut <marex@denx.de> wrote:
> > > On Thursday, November 06, 2014 at 10:59:17 AM, Lukasz Majewski
> > > wrote:
> > > > Hi Marek,
> > > > 
> > > > > Split the Samsung specific PHY control into a separate file
> > > > > and compile this into the S3C OTG driver only if used on a
> > > > > Samsung system.
> > > > > 
> > > > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > > > Cc: Chin Liang See <clsee@altera.com>
> > > > > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > > > Cc: Vince Bridgers <vbridger@altera.com>
> > > > > Cc: Pavel Machek <pavel@denx.de>
> > > > > Cc: Stefan Roese <sr@denx.de>
> > > > > Cc: Lukasz Majewski <l.majewski@samsung.com>
> > > 
> > > [...]
> > > 
> > > > Build HW: trats2 (Exynos4412)
> > > > 
> > > > CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-
> > > > 2013
> > > > .12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-
> > > > 3.12- sanitized/bin/arm-v7a-linux-gnueabi-
> > > > 
> > > > Patches applied on top of v2014.10.
> > > 
> > > Try this trivial patch (add missing include):
> > > 
> > > diff --git a/drivers/usb/gadget/s3c_udc_otg_phy.c
> > > b/drivers/usb/gadget/s3c_udc_otg_phy.c
> > > index 055fe86..95bd8cf 100644
> > > --- a/drivers/usb/gadget/s3c_udc_otg_phy.c
> > > +++ b/drivers/usb/gadget/s3c_udc_otg_phy.c
> > > @@ -35,6 +35,8 @@
> > > 
> > >  #include "regs-otg.h"
> > >  #include <usb/lin_gadget_compat.h>
> > > 
> > > +#include <usb/s3c_udc.h>
> > > +
> > 
> > Ok, I will apply it and let you know about the result.
> > 
> > BTW: I assume that your work is to reuse the USB 2.0 UDC IP block
> > (probably in Altera).
> 
> Yep, I got the UDC working on my SoCFPGA board. We should probably
> rename the s3c-otg driver to something more fitting (dwc2-udc ?)
> and strive to somehow merge the dwc2-host and dwc2-udc drivers in
> the long run.
> 
> Speaking of the rename, I'd like to leave that for the next MW, to
> make sure it doesn't break any tools which might for example depend
> on the name of the driver.

+1

IMHO, we should devote one MW only for rename (as I've written
previously).

> 
> > I'd be elated if this is true :-).
> 
> It is :) ... it must have been hard to tell from patch 5/5 ;-)
> 
> Best regards,
> Marek Vasut
diff mbox

Patch

diff --git a/drivers/usb/gadget/s3c_udc_otg_phy.c 
b/drivers/usb/gadget/s3c_udc_otg_phy.c
index 055fe86..95bd8cf 100644
--- a/drivers/usb/gadget/s3c_udc_otg_phy.c
+++ b/drivers/usb/gadget/s3c_udc_otg_phy.c
@@ -35,6 +35,8 @@ 
 #include "regs-otg.h"
 #include <usb/lin_gadget_compat.h>
 
+#include <usb/s3c_udc.h>
+
 void otg_phy_init(struct s3c_udc *dev)
 {
        unsigned int usb_phy_ctrl = dev->pdata->usb_phy_ctrl;