From 4ebe208097a374348689907680e002be3ee9e91c Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 1 Nov 2011 20:00:25 +0000 Subject: usb, davinci: add enable_vbus() weak function Signed-off-by: Heiko Schocher Cc: Remy Bohmer Cc: Albert ARIBAUD Cc: Igor Grinberg Signed-off-by: Sandeep Paulraj --- drivers/usb/musb/davinci.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index f56f2df..c94a762 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -78,6 +78,17 @@ static void phy_off(void) writel(USBPHY_OSCPDWN | USBPHY_PHYPDWN, USBPHY_CTL_PADDR); } +void __enable_vbus(void) +{ + /* + * nothing to do, vbus is handled through the cpu. + * Define this function in board code, if it is + * different on your board. + */ +} +void enable_vbus(void) + __attribute__((weak, alias("__enable_vbus"))); + /* * This function performs Davinci platform specific initialization for usb0. */ @@ -86,9 +97,8 @@ int musb_platform_init(void) u32 revision; /* enable USB VBUS */ -#ifndef DAVINCI_DM365EVM enable_vbus(); -#endif + /* start the on-chip USB phy and its pll */ if (!phy_on()) return -1; -- cgit v1.1 From 1fa892c67baffd4b51170cfe9ca6d57ddf0eba60 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 1 Nov 2011 20:00:26 +0000 Subject: arm, usb, davinci: make USBPHY_CTL register configurable Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control register. Signed-off-by: Heiko Schocher Acked-by: Remy Bohmer cc: Sandeep Paulraj cc: Remy Bohmer Signed-off-by: Sandeep Paulraj --- drivers/usb/musb/davinci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index c94a762..359c635 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -26,6 +26,10 @@ #include "davinci.h" #include +#if !defined(CONFIG_DV_USBPHY_CTL) +#define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN) +#endif + /* MUSB platform configuration */ struct musb_config musb_cfg = { .regs = (struct musb_regs *)MENTOR_USB0_BASE, @@ -50,7 +54,7 @@ static u8 phy_on(void) writel(USBPHY_PHY24MHZ | USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR); #else - writel(USBPHY_SESNDEN | USBPHY_VBDTCTEN, USBPHY_CTL_PADDR); + writel(CONFIG_DV_USBPHY_CTL, USBPHY_CTL_PADDR); #endif timeout = musb_cfg.timeout; -- cgit v1.1 From 8d5d1516a21a509ded9836c2b6c111cc2b28aa4a Mon Sep 17 00:00:00 2001 From: Wolfgang Grandegger Date: Mon, 17 Oct 2011 08:17:47 +0000 Subject: ehci-mxc: remove incorrect comment The USB port to be used is determined by CONFIG_MXC_USB_PORT. So, it appears that the comment is not correct. Remove it. Signed-off-by: Wolfgang Grandegger --- drivers/usb/host/ehci-mxc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/usb') diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index a0cfbb7..f403d49 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c @@ -120,7 +120,6 @@ int ehci_hcd_init(void) udelay(80); - /* Take USB2 */ ehci = (struct usb_ehci *)(IMX_USB_BASE + (0x200 * CONFIG_MXC_USB_PORT)); hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); -- cgit v1.1