usb: gadget: at91_udc: add usb_clk for transition to common clk framework
authorBoris BREZILLON <b.brezillon@overkiz.com>
Fri, 2 Aug 2013 08:37:34 +0000 (10:37 +0200)
committerFelipe Balbi <balbi@ti.com>
Fri, 2 Aug 2013 12:17:03 +0000 (15:17 +0300)
commitc0aefc75ce2512bc308a89ca3cb7bece63c1128f
treeae223d608eb593e7acd63b644db8e34698fd49dc
parent30ce1987160e64f58d92359ee11999e1218a45b9
usb: gadget: at91_udc: add usb_clk for transition to common clk framework

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 when moving to common clk framework.

This patch adds support for usb clock retrieval and configuration, and is
backward compatible with the current at91 clk implementation (if usb clk
is not found, it does not configure/enable it).

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/at91_udc.c
drivers/usb/gadget/at91_udc.h