Title: [9148] trunk: [#6129]musb: push MUSB clkin value to board resources
Revision
9148
Author
lliubbo
Date
2010-09-17 07:09:57 -0400 (Fri, 17 Sep 2010)

Log Message

[#6129]musb: push MUSB clkin value to board 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 hardcode.

Modified Paths

Diff

Modified: trunk/arch/blackfin/mach-bf527/boards/ad7160eval.c (9147 => 9148)


--- trunk/arch/blackfin/mach-bf527/boards/ad7160eval.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/arch/blackfin/mach-bf527/boards/ad7160eval.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -67,6 +67,7 @@
 	 * if it is the case.
 	 */
 	.gpio_vrsel_active	= 1,
+	.clkin          = 24,           /* musb CLKIN in MHZ */
 };
 
 static struct musb_hdrc_platform_data musb_plat = {

Modified: trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c (9147 => 9148)


--- trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/arch/blackfin/mach-bf527/boards/cm_bf527.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -102,6 +102,7 @@
 	 * if it is the case.
 	 */
 	.gpio_vrsel_active	= 1,
+	.clkin          = 24,           /* musb CLKIN in MHZ */
 };
 
 static struct musb_hdrc_platform_data musb_plat = {

Modified: trunk/arch/blackfin/mach-bf527/boards/ezbrd.c (9147 => 9148)


--- trunk/arch/blackfin/mach-bf527/boards/ezbrd.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/arch/blackfin/mach-bf527/boards/ezbrd.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -66,6 +66,7 @@
 	 * if it is the case.
 	 */
 	.gpio_vrsel_active	= 1,
+	.clkin          = 24,           /* musb CLKIN in MHZ */
 };
 
 static struct musb_hdrc_platform_data musb_plat = {

Modified: trunk/arch/blackfin/mach-bf527/boards/ezkit.c (9147 => 9148)


--- trunk/arch/blackfin/mach-bf527/boards/ezkit.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/arch/blackfin/mach-bf527/boards/ezkit.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -106,6 +106,7 @@
 	 * if it is the case.
 	 */
 	.gpio_vrsel_active	= 1,
+	.clkin          = 24,           /* musb CLKIN in MHZ */
 };
 
 static struct musb_hdrc_platform_data musb_plat = {

Modified: trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c (9147 => 9148)


--- trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -502,6 +502,7 @@
 	 * if it is the case.
 	 */
 	.gpio_vrsel_active	= 1,
+	.clkin          = 24,           /* musb CLKIN in MHZ */
 };
 
 static struct musb_hdrc_platform_data musb_plat = {

Modified: trunk/arch/blackfin/mach-bf548/boards/ezkit.c (9147 => 9148)


--- trunk/arch/blackfin/mach-bf548/boards/ezkit.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/arch/blackfin/mach-bf548/boards/ezkit.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -607,6 +607,7 @@
 	 * if it is the case.
 	 */
 	.gpio_vrsel_active	= 1,
+	.clkin          = 24,           /* musb CLKIN in MHZ */
 };
 
 static struct musb_hdrc_platform_data musb_plat = {

Modified: trunk/drivers/usb/musb/blackfin.c (9147 => 9148)


--- trunk/drivers/usb/musb/blackfin.c	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/drivers/usb/musb/blackfin.c	2010-09-17 11:09:57 UTC (rev 9148)
@@ -337,7 +337,8 @@
 	}
 
 	/* Configure PLL oscillator register */
-	bfin_write_USB_PLLOSC_CTRL(0x30a8);
+	bfin_write_USB_PLLOSC_CTRL(0x3080 |
+			((480/musb->config->clkin) << 1));
 	SSYNC();
 
 	bfin_write_USB_SRP_CLKDIV((get_sclk()/1000) / 32 - 1);

Modified: trunk/include/linux/usb/musb.h (9147 => 9148)


--- trunk/include/linux/usb/musb.h	2010-09-17 07:42:57 UTC (rev 9147)
+++ trunk/include/linux/usb/musb.h	2010-09-17 11:09:57 UTC (rev 9148)
@@ -54,6 +54,8 @@
         /* A GPIO controlling VRSEL in Blackfin */
         unsigned int    gpio_vrsel;
 	unsigned int	gpio_vrsel_active;
+	/* musb CLKIN in Blackfin in MHZ */
+	unsigned char   clkin;
 #endif
 
 };
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to