Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-17 Thread Alan Stern
On Wed, 17 Jul 2013, boris brezillon wrote: > On 17/07/2013 17:33, Alan Stern wrote: > > On Tue, 16 Jul 2013, Boris BREZILLON wrote: > > > >> The AT91 PMC (Power Management Controller) provides an USB clock used by > >> USB Full Speed host (ohci) and USB Full Speed device (udc). > >> The usb

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-17 Thread boris brezillon
On 17/07/2013 17:33, Alan Stern wrote: On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-17 Thread Alan Stern
On Tue, 16 Jul 2013, Boris BREZILLON wrote: > The AT91 PMC (Power Management Controller) provides an USB clock used by > USB Full Speed host (ohci) and USB Full Speed device (udc). > The usb drivers (ohci and udc) must configure this clock to 48Mhz. > This configuration was formely done in

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-17 Thread Alan Stern
On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This configuration was formely done in

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-17 Thread boris brezillon
On 17/07/2013 17:33, Alan Stern wrote: On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-17 Thread Alan Stern
On Wed, 17 Jul 2013, boris brezillon wrote: On 17/07/2013 17:33, Alan Stern wrote: On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread boris brezillon
On 16/07/2013 20:47, Alan Stern wrote: On Tue, 16 Jul 2013, boris brezillon wrote: + uclk = clk_get(>dev, "usb_clk"); + if (IS_ERR(uclk)) { + uclk = NULL; + dev_warn(>dev, "failed to get usb_clk\n"); + } Is this really what you want for backward

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Alan Stern
On Tue, 16 Jul 2013, boris brezillon wrote: > >> + uclk = clk_get(>dev, "usb_clk"); > >> + if (IS_ERR(uclk)) { > >> + uclk = NULL; > >> + dev_warn(>dev, "failed to get usb_clk\n"); > >> + } > > Is this really what you want for backward compatibility? > Here are some

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Russell King - ARM Linux
On Tue, Jul 16, 2013 at 05:22:15PM +0200, Boris BREZILLON wrote: > @@ -41,6 +41,10 @@ extern int usb_disabled(void); > > static void at91_start_clock(void) > { > + if (uclk) { if (!IS_ERR(uclk)) { > + clk_set_rate(uclk, 4800); > +

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread boris brezillon
Hello Alan, On 16/07/2013 18:48, Alan Stern wrote: On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Alan Stern
On Tue, 16 Jul 2013, Boris BREZILLON wrote: > The AT91 PMC (Power Management Controller) provides an USB clock used by > USB Full Speed host (ohci) and USB Full Speed device (udc). > The usb drivers (ohci and udc) must configure this clock to 48Mhz. > This configuration was formely done in

[PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Boris BREZILLON
The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This configuration was formely done in mach-at91/clock.c, but this implementation will be removed

[PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Boris BREZILLON
The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This configuration was formely done in mach-at91/clock.c, but this implementation will be removed

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Alan Stern
On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to 48Mhz. This configuration was formely done in

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Russell King - ARM Linux
On Tue, Jul 16, 2013 at 05:22:15PM +0200, Boris BREZILLON wrote: @@ -41,6 +41,10 @@ extern int usb_disabled(void); static void at91_start_clock(void) { + if (uclk) { if (!IS_ERR(uclk)) { + clk_set_rate(uclk, 4800); + clk_prepare_enable(uclk); +

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread boris brezillon
Hello Alan, On 16/07/2013 18:48, Alan Stern wrote: On Tue, 16 Jul 2013, Boris BREZILLON wrote: The AT91 PMC (Power Management Controller) provides an USB clock used by USB Full Speed host (ohci) and USB Full Speed device (udc). The usb drivers (ohci and udc) must configure this clock to

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread Alan Stern
On Tue, 16 Jul 2013, boris brezillon wrote: + uclk = clk_get(pdev-dev, usb_clk); + if (IS_ERR(uclk)) { + uclk = NULL; + dev_warn(pdev-dev, failed to get usb_clk\n); + } Is this really what you want for backward compatibility? Here are some proposition to remove

Re: [PATCH v3 6/7] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-07-16 Thread boris brezillon
On 16/07/2013 20:47, Alan Stern wrote: On Tue, 16 Jul 2013, boris brezillon wrote: + uclk = clk_get(pdev-dev, usb_clk); + if (IS_ERR(uclk)) { + uclk = NULL; + dev_warn(pdev-dev, failed to get usb_clk\n); + } Is this really what you want for