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

2013-08-01 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] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-08-01 Thread Alan Stern
On Thu, 1 Aug 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] USB: ohci-at91: add usb_clk for transition to common clk framework

2013-08-01 Thread Sergei Shtylyov
Hello. On 08/01/2013 07:56 PM, Alan Stern wrote: What happens if uclk isn't found but it is needed? It will not fail but I guess the usb host won't work as the clock won't be correctly configured. I agree with you: this is not a good solution. Another option is to keep the previous

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

2013-08-01 Thread Alan Stern
On Thu, 1 Aug 2013, Sergei Shtylyov wrote: Yes. However, a more elegant approach is to protect the relevant statements with: if (defined(CONFIG_COMMON_CLK)). This preprocessor You probably meant IS_ENABLED() or IS_BUIILTIN()? Or is there something I don't know about gcc