aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2010-10-23 06:12:01 -0400
committerFelipe Balbi <balbi@ti.com>2010-11-05 08:13:32 -0400
commit9c7564620f82e55a9c8713311bffd401ec9d60fe (patch)
tree428c66c3414766bd7326eaf56e31542c26cf6b24
parent68f64714dc35a515a3064b300729e7809bcdd0e0 (diff)
USB: musb: blackfin: push clkin value to platform resources
In order to not touch the driver file for different xtal usage, push the clkin value to board file and calculate the register value instead of hardcoding it. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/musb/blackfin.c3
-rw-r--r--include/linux/usb/musb.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index ade45a219c4..fcb5206a65b 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -337,7 +337,8 @@ static void musb_platform_reg_init(struct musb *musb)
337 } 337 }
338 338
339 /* Configure PLL oscillator register */ 339 /* Configure PLL oscillator register */
340 bfin_write_USB_PLLOSC_CTRL(0x30a8); 340 bfin_write_USB_PLLOSC_CTRL(0x3080 |
341 ((480/musb->config->clkin) << 1));
341 SSYNC(); 342 SSYNC();
342 343
343 bfin_write_USB_SRP_CLKDIV((get_sclk()/1000) / 32 - 1); 344 bfin_write_USB_SRP_CLKDIV((get_sclk()/1000) / 32 - 1);
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index ee2dd1d506e..2387f9fc813 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -89,6 +89,8 @@ struct musb_hdrc_config {
89 /* A GPIO controlling VRSEL in Blackfin */ 89 /* A GPIO controlling VRSEL in Blackfin */
90 unsigned int gpio_vrsel; 90 unsigned int gpio_vrsel;
91 unsigned int gpio_vrsel_active; 91 unsigned int gpio_vrsel_active;
92 /* musb CLKIN in Blackfin in MHZ */
93 unsigned char clkin;
92#endif 94#endif
93 95
94}; 96};