Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-07 Thread Marek Vasut
On Friday, November 07, 2014 at 03:33:10 PM, Lukasz Majewski wrote:
> Hi Marek,
> 
> > On Friday, November 07, 2014 at 10:11:35 AM, Lukasz Majewski wrote:
> > > Hi Marek,
> > > 
> > > > On Tuesday, November 04, 2014 at 08:36:57 PM, Pavel Machek wrote:
> > > > > On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> > > > > > Allow passing in a custom configuration of the gusbcfg
> > > > > > register via platform data.
> > > > > > 
> > > > > > Signed-off-by: Marek Vasut 
> > > > > > Cc: Chin Liang See 
> > > > > > Cc: Dinh Nguyen 
> > > > > > Cc: Vince Bridgers 
> > > > > 
> > > > > Acked-by: Pavel Machek 
> > > > > 
> > > > > > debug("Reseting OTG controller\n");
> > > > > > 
> > > > > > -   writel(0<<15/* PHY Low Power Clock
> > > > > > sel*/
> > > > > > +   dflt_gusbcfg =
> > > > > > +   0<<15   /* PHY Low Power Clock
> > > > > > sel*/
> > > > > > 
> > > > > > |1<<14  /* Non-Periodic TxFIFO
> > > > > > 
> > > > > > Rewind Enable*/ |0x5<<10/* Turnaround time*/
> > > > > > 
> > > > > > |0<<9 | 0<<8/* [0:HNP disable,1:HNP
> > > > > > 
> > > > > > enable][ 0:SRP disable*/
> > > > > > 
> > > > > > @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
> > > > > > 
> > > > > > |0<<6   /* 0: high speed utmi+,
> > > > > > 
> > > > > > 1: full speed serial*/ |0<<4/* 0: utmi+,
> > > > > > 1:ulpi*/
> > > > > > 
> > > > > > |1<<3   /* phy i/f  0:8bit,
> > > > > > 
> > > > > > 1:16bit*/
> > > > > > 
> > > > > > -   |0x7<<0,/* HS/FS Timeout**/
> > > > > > -   ®->gusbcfg);
> > > > > > +   |0x7<<0;/* HS/FS Timeout**/
> > > > > > +
> > > > > 
> > > > > "Interesting" comment style. And I'd remove 0x prefixes from
> > > > > constants <8...
> > > > 
> > > > Lukasz, what do you say to just convert those four boards to use
> > > > the gusbcfg platform data afterward ?
> > > 
> > > +1
> > > 
> > > It is a very good idea since we are using the same dwc2 IP block for
> > > host (./usb/host/dwc2.c) and device (s3c_hsotg).
> > 
> > Yep ... I'm just wondering if we should do that rename in the next MW.
> > If you're fine with this MW though, then I will do just that.
> > 
> > > > btw. you can find the latest version in u-boot-usb:topic/s3c-otg
> > > 
> > > I've read comments from Pavel and tested the code up till first
> > > build error :-).
> > 
> > I rewrote that branch, so feel free to use that as a base for your
> > testing. I will repost the corrected patches once I get feedback from
> > you.
> > 
> > Best regards,
> > Marek Vasut
> 
> Reviewed-by: Lukasz Majewski 
> 
> Tested-by: Lukasz Majewski 
> 
> Test HW: Trats2 (Exynos4412)

Queued for master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-07 Thread Lukasz Majewski
Hi Marek,

> On Friday, November 07, 2014 at 10:11:35 AM, Lukasz Majewski wrote:
> > Hi Marek,
> > 
> > > On Tuesday, November 04, 2014 at 08:36:57 PM, Pavel Machek wrote:
> > > > On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> > > > > Allow passing in a custom configuration of the gusbcfg
> > > > > register via platform data.
> > > > > 
> > > > > Signed-off-by: Marek Vasut 
> > > > > Cc: Chin Liang See 
> > > > > Cc: Dinh Nguyen 
> > > > > Cc: Vince Bridgers 
> > > > 
> > > > Acked-by: Pavel Machek 
> > > > 
> > > > >   debug("Reseting OTG controller\n");
> > > > > 
> > > > > - writel(0<<15/* PHY Low Power Clock
> > > > > sel*/
> > > > > + dflt_gusbcfg =
> > > > > + 0<<15   /* PHY Low Power Clock
> > > > > sel*/
> > > > > 
> > > > >   |1<<14  /* Non-Periodic TxFIFO
> > > > > 
> > > > > Rewind Enable*/ |0x5<<10  /* Turnaround time*/
> > > > > 
> > > > >   |0<<9 | 0<<8/* [0:HNP disable,1:HNP
> > > > > 
> > > > > enable][ 0:SRP disable*/
> > > > > 
> > > > > @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
> > > > > 
> > > > >   |0<<6   /* 0: high speed utmi+,
> > > > > 1: full speed serial*/ |0<<4  /* 0: utmi+,
> > > > > 1:ulpi*/
> > > > > 
> > > > >   |1<<3   /* phy i/f  0:8bit,
> > > > > 
> > > > > 1:16bit*/
> > > > > 
> > > > > - |0x7<<0,/* HS/FS Timeout**/
> > > > > - ®->gusbcfg);
> > > > > + |0x7<<0;/* HS/FS Timeout**/
> > > > > +
> > > > 
> > > > "Interesting" comment style. And I'd remove 0x prefixes from
> > > > constants <8...
> > > 
> > > Lukasz, what do you say to just convert those four boards to use
> > > the gusbcfg platform data afterward ?
> > 
> > +1
> > 
> > It is a very good idea since we are using the same dwc2 IP block for
> > host (./usb/host/dwc2.c) and device (s3c_hsotg).
> 
> Yep ... I'm just wondering if we should do that rename in the next MW.
> If you're fine with this MW though, then I will do just that.
> 
> > > btw. you can find the latest version in u-boot-usb:topic/s3c-otg
> > 
> > I've read comments from Pavel and tested the code up till first
> > build error :-).
> 
> I rewrote that branch, so feel free to use that as a base for your
> testing. I will repost the corrected patches once I get feedback from
> you.
> 
> Best regards,
> Marek Vasut

Reviewed-by: Lukasz Majewski 

Tested-by: Lukasz Majewski 

Test HW: Trats2 (Exynos4412)

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-07 Thread Lukasz Majewski
Hi Marek,

> On Friday, November 07, 2014 at 10:11:35 AM, Lukasz Majewski wrote:
> > Hi Marek,
> > 
> > > On Tuesday, November 04, 2014 at 08:36:57 PM, Pavel Machek wrote:
> > > > On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> > > > > Allow passing in a custom configuration of the gusbcfg
> > > > > register via platform data.
> > > > > 
> > > > > Signed-off-by: Marek Vasut 
> > > > > Cc: Chin Liang See 
> > > > > Cc: Dinh Nguyen 
> > > > > Cc: Vince Bridgers 
> > > > 
> > > > Acked-by: Pavel Machek 
> > > > 
> > > > >   debug("Reseting OTG controller\n");
> > > > > 
> > > > > - writel(0<<15/* PHY Low Power Clock
> > > > > sel*/
> > > > > + dflt_gusbcfg =
> > > > > + 0<<15   /* PHY Low Power Clock
> > > > > sel*/
> > > > > 
> > > > >   |1<<14  /* Non-Periodic TxFIFO
> > > > > 
> > > > > Rewind Enable*/ |0x5<<10  /* Turnaround time*/
> > > > > 
> > > > >   |0<<9 | 0<<8/* [0:HNP disable,1:HNP
> > > > > 
> > > > > enable][ 0:SRP disable*/
> > > > > 
> > > > > @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
> > > > > 
> > > > >   |0<<6   /* 0: high speed utmi+,
> > > > > 1: full speed serial*/ |0<<4  /* 0: utmi+,
> > > > > 1:ulpi*/
> > > > > 
> > > > >   |1<<3   /* phy i/f  0:8bit,
> > > > > 
> > > > > 1:16bit*/
> > > > > 
> > > > > - |0x7<<0,/* HS/FS Timeout**/
> > > > > - ®->gusbcfg);
> > > > > + |0x7<<0;/* HS/FS Timeout**/
> > > > > +
> > > > 
> > > > "Interesting" comment style. And I'd remove 0x prefixes from
> > > > constants <8...
> > > 
> > > Lukasz, what do you say to just convert those four boards to use
> > > the gusbcfg platform data afterward ?
> > 
> > +1
> > 
> > It is a very good idea since we are using the same dwc2 IP block for
> > host (./usb/host/dwc2.c) and device (s3c_hsotg).
> 
> Yep ... I'm just wondering if we should do that rename in the next MW.
> If you're fine with this MW though, then I will do just that.

I'd prefer to spent one MW only for s3c-hsotg rename. In other words we
do the "fixes" and "clean ups" now and only when the code gets stable
we perform the rename (at the MW).

Does it work for you?

> 
> > > btw. you can find the latest version in u-boot-usb:topic/s3c-otg
> > 
> > I've read comments from Pavel and tested the code up till first
> > build error :-).
> 
> I rewrote that branch, so feel free to use that as a base for your
> testing. I will repost the corrected patches once I get feedback from
> you.

Ok.

> 
> Best regards,
> Marek Vasut



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-07 Thread Marek Vasut
On Friday, November 07, 2014 at 10:11:35 AM, Lukasz Majewski wrote:
> Hi Marek,
> 
> > On Tuesday, November 04, 2014 at 08:36:57 PM, Pavel Machek wrote:
> > > On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> > > > Allow passing in a custom configuration of the gusbcfg register
> > > > via platform data.
> > > > 
> > > > Signed-off-by: Marek Vasut 
> > > > Cc: Chin Liang See 
> > > > Cc: Dinh Nguyen 
> > > > Cc: Vince Bridgers 
> > > 
> > > Acked-by: Pavel Machek 
> > > 
> > > > debug("Reseting OTG controller\n");
> > > > 
> > > > -   writel(0<<15/* PHY Low Power Clock sel*/
> > > > +   dflt_gusbcfg =
> > > > +   0<<15   /* PHY Low Power Clock sel*/
> > > > 
> > > > |1<<14  /* Non-Periodic TxFIFO
> > > > 
> > > > Rewind Enable*/ |0x5<<10/* Turnaround time*/
> > > > 
> > > > |0<<9 | 0<<8/* [0:HNP disable,1:HNP
> > > > 
> > > > enable][ 0:SRP disable*/
> > > > 
> > > > @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
> > > > 
> > > > |0<<6   /* 0: high speed utmi+, 1:
> > > > full speed serial*/ |0<<4   /* 0: utmi+, 1:ulpi*/
> > > > 
> > > > |1<<3   /* phy i/f  0:8bit,
> > > > 
> > > > 1:16bit*/
> > > > 
> > > > -   |0x7<<0,/* HS/FS Timeout**/
> > > > -   ®->gusbcfg);
> > > > +   |0x7<<0;/* HS/FS Timeout**/
> > > > +
> > > 
> > > "Interesting" comment style. And I'd remove 0x prefixes from
> > > constants <8...
> > 
> > Lukasz, what do you say to just convert those four boards to use the
> > gusbcfg platform data afterward ?
> 
> +1
> 
> It is a very good idea since we are using the same dwc2 IP block for
> host (./usb/host/dwc2.c) and device (s3c_hsotg).

Yep ... I'm just wondering if we should do that rename in the next MW.
If you're fine with this MW though, then I will do just that.

> > btw. you can find the latest version in u-boot-usb:topic/s3c-otg
> 
> I've read comments from Pavel and tested the code up till first build
> error :-).

I rewrote that branch, so feel free to use that as a base for your testing.
I will repost the corrected patches once I get feedback from you.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-07 Thread Lukasz Majewski
Hi Marek,

> On Tuesday, November 04, 2014 at 08:36:57 PM, Pavel Machek wrote:
> > On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> > > Allow passing in a custom configuration of the gusbcfg register
> > > via platform data.
> > > 
> > > Signed-off-by: Marek Vasut 
> > > Cc: Chin Liang See 
> > > Cc: Dinh Nguyen 
> > > Cc: Vince Bridgers 
> > 
> > Acked-by: Pavel Machek 
> > 
> > >   debug("Reseting OTG controller\n");
> > > 
> > > - writel(0<<15/* PHY Low Power Clock sel*/
> > > + dflt_gusbcfg =
> > > + 0<<15   /* PHY Low Power Clock sel*/
> > > 
> > >   |1<<14  /* Non-Periodic TxFIFO
> > > Rewind Enable*/ |0x5<<10  /* Turnaround time*/
> > >   |0<<9 | 0<<8/* [0:HNP disable,1:HNP
> > > enable][ 0:SRP disable*/
> > > 
> > > @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
> > > 
> > >   |0<<6   /* 0: high speed utmi+, 1:
> > > full speed serial*/ |0<<4 /* 0: utmi+, 1:ulpi*/
> > >   |1<<3   /* phy i/f  0:8bit,
> > > 1:16bit*/
> > > 
> > > - |0x7<<0,/* HS/FS Timeout**/
> > > - ®->gusbcfg);
> > > + |0x7<<0;/* HS/FS Timeout**/
> > > +
> > 
> > "Interesting" comment style. And I'd remove 0x prefixes from
> > constants <8...
> 
> Lukasz, what do you say to just convert those four boards to use the
> gusbcfg platform data afterward ?

+1

It is a very good idea since we are using the same dwc2 IP block for
host (./usb/host/dwc2.c) and device (s3c_hsotg).

> 
> btw. you can find the latest version in u-boot-usb:topic/s3c-otg

I've read comments from Pavel and tested the code up till first build
error :-).

> 
> Best regards,
> Marek Vasut



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-06 Thread Marek Vasut
On Tuesday, November 04, 2014 at 08:36:57 PM, Pavel Machek wrote:
> On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> > Allow passing in a custom configuration of the gusbcfg register
> > via platform data.
> > 
> > Signed-off-by: Marek Vasut 
> > Cc: Chin Liang See 
> > Cc: Dinh Nguyen 
> > Cc: Vince Bridgers 
> 
> Acked-by: Pavel Machek 
> 
> > debug("Reseting OTG controller\n");
> > 
> > -   writel(0<<15/* PHY Low Power Clock sel*/
> > +   dflt_gusbcfg =
> > +   0<<15   /* PHY Low Power Clock sel*/
> > 
> > |1<<14  /* Non-Periodic TxFIFO Rewind Enable*/
> > |0x5<<10/* Turnaround time*/
> > |0<<9 | 0<<8/* [0:HNP disable,1:HNP enable][ 0:SRP disable*/
> > 
> > @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
> > 
> > |0<<6   /* 0: high speed utmi+, 1: full speed serial*/
> > |0<<4   /* 0: utmi+, 1:ulpi*/
> > |1<<3   /* phy i/f  0:8bit, 1:16bit*/
> > 
> > -   |0x7<<0,/* HS/FS Timeout**/
> > -   ®->gusbcfg);
> > +   |0x7<<0;/* HS/FS Timeout**/
> > +
> 
> "Interesting" comment style. And I'd remove 0x prefixes from constants
> <8...

Lukasz, what do you say to just convert those four boards to use the gusbcfg
platform data afterward ?

btw. you can find the latest version in u-boot-usb:topic/s3c-otg

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] usb: s3c-otg: Allow custom gusbcfg

2014-11-04 Thread Pavel Machek
On Tue 2014-11-04 06:07:33, Marek Vasut wrote:
> Allow passing in a custom configuration of the gusbcfg register
> via platform data.
> 
> Signed-off-by: Marek Vasut 
> Cc: Chin Liang See 
> Cc: Dinh Nguyen 
> Cc: Vince Bridgers 

Acked-by: Pavel Machek 

>   debug("Reseting OTG controller\n");
>  
> - writel(0<<15/* PHY Low Power Clock sel*/
> + dflt_gusbcfg =
> + 0<<15   /* PHY Low Power Clock sel*/
>   |1<<14  /* Non-Periodic TxFIFO Rewind Enable*/
>   |0x5<<10/* Turnaround time*/
>   |0<<9 | 0<<8/* [0:HNP disable,1:HNP enable][ 0:SRP disable*/
> @@ -413,8 +415,12 @@ static void reconfig_usbd(void)
>   |0<<6   /* 0: high speed utmi+, 1: full speed serial*/
>   |0<<4   /* 0: utmi+, 1:ulpi*/
>   |1<<3   /* phy i/f  0:8bit, 1:16bit*/
> - |0x7<<0,/* HS/FS Timeout**/
> - ®->gusbcfg);
> + |0x7<<0;/* HS/FS Timeout**/
> +

"Interesting" comment style. And I'd remove 0x prefixes from constants
<8...


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot