diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-03-17 17:35:00 -0400 |
---|---|---|
committer | Remy Bohmer <linux@bohmer.net> | 2011-04-02 09:38:24 +0200 |
commit | 38e0745e4ddcf0b26fdc609ced835e67bf343689 (patch) | |
tree | 720d9877ceeac84fac393b7c0dba6fffead9edb5 /drivers/usb/musb | |
parent | 67a490d60d70f2b01d55976440ba30154af96965 (diff) |
usb: musb: blackfin: make clkin configurable
Not everyone has a 24MHz clkin to the USB, so let board porters override.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/blackfin_usb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/musb/blackfin_usb.c b/drivers/usb/musb/blackfin_usb.c index 38aceb2e93d..0eb19a0924c 100644 --- a/drivers/usb/musb/blackfin_usb.c +++ b/drivers/usb/musb/blackfin_usb.c @@ -15,6 +15,10 @@ #include "musb_core.h" +#ifndef CONFIG_USB_BLACKFIN_CLKIN +#define CONFIG_USB_BLACKFIN_CLKIN 24 +#endif + /* MUSB platform configuration */ struct musb_config musb_cfg = { .regs = (struct musb_regs *)USB_FADDR, @@ -109,7 +113,8 @@ int musb_platform_init(void) } /* Configure PLL oscillator register */ - bfin_write_USB_PLLOSC_CTRL(0x30a8); + bfin_write_USB_PLLOSC_CTRL(0x3080 | + ((480 / CONFIG_USB_BLACKFIN_CLKIN) << 1)); SSYNC(); bfin_write_USB_SRP_CLKDIV((get_sclk()/1000) / 32 - 1); |