From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 09 Aug 2011 07:05:20 +0200 Subject: [U-Boot] [PATCH] arm, usb, davinci: make USBPHY_CTL register configurable In-Reply-To: References: <1312266042-28787-1-git-send-email-hs@denx.de> Message-ID: <4E40C010.7090600@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Remy, Remy Bohmer wrote: > Hi, > > 2011/8/2 Heiko Schocher : >> Define CONFIG_DV_USBPHY_CTL for setting the USB PHY control >> register. >> Signed-off-by: Heiko Schocher >> cc: Sandeep Paulraj >> cc: Remy Bohmer >> --- >> drivers/usb/musb/davinci.c | 6 +++++- >> 1 files changed, 5 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c >> index f56f2df..98c2c62 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; > > What does it fix, why do you want this? I posted the cam_enc_4xx board support. Now adding USB support, and I have to configure this register as: #define CONFIG_DV_USBPHY_CTL (USBPHY_SESNDEN | USBPHY_VBDTCTEN | \ USBPHY_PHY24MHZ) so I need a possibility to configure this register ... and I could not use DAVINCI_DM365EVM! (BTW: This define (so it seems to me) hides board specific code, which should be cleaned up ... Sandeep?) bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany