From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 10 Oct 2013 02:33:15 +0200 Subject: [U-Boot] [PATCH 5/6] usb: am437x: Add support for am437x xhci USB host In-Reply-To: <1381339171-31647-6-git-send-email-dmurphy@ti.com> References: <1381339171-31647-1-git-send-email-dmurphy@ti.com> <1381339171-31647-6-git-send-email-dmurphy@ti.com> Message-ID: <201310100233.15466.marex@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 Dear Dan Murphy, > Add the support for the am437x xhci usb host. > > The xHCI host on AM437 is connected to a usb2 phy so need to > add support to enable those clocks. > > Signed-off-by: Dan Murphy > --- > arch/arm/include/asm/arch-am33xx/hardware_am43xx.h | 10 +++++++++ > drivers/usb/phy/omap_usb_phy.c | 23 > ++++++++++++++++++++ include/configs/am43xx_evm.h | > 11 ++++++++++ include/linux/usb/xhci-omap.h | 4 > ++++ > 4 files changed, 48 insertions(+) > > diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h > b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h index > 303c594..3b665e6 100644 > --- a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h > +++ b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h > @@ -51,4 +51,14 @@ > /* RTC base address */ > #define RTC_BASE 0x44E3E000 > > +/* USB Clock Control */ > +#define PRM_PER_USB_OTG_SS0_CLKCTRL (CM_PER + 0x260) > +#define PRM_PER_USB_OTG_SS1_CLKCTRL (CM_PER + 0x268) > +#define USBOTGSSX_CLKCTRL_MODULE_EN (1 << 2) > +#define USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960 (1 << 8) > + > +#define PRM_PER_USBPHYOCP2SCP0_CLKCTRL (CM_PER + 0x5b8) > +#define PRM_PER_USBPHYOCP2SCP1_CLKCTRL (CM_PER + 0x5c0) > +#define USBPHYOCPSCP_MODULE_EN (1 << 2) > + > #endif /* __AM43XX_HARDWARE_AM43XX_H */ > diff --git a/drivers/usb/phy/omap_usb_phy.c > b/drivers/usb/phy/omap_usb_phy.c index f1da73d..20c4805 100644 > --- a/drivers/usb/phy/omap_usb_phy.c > +++ b/drivers/usb/phy/omap_usb_phy.c > @@ -207,6 +207,25 @@ void usb_phy_power(int on) > } > #endif /* CONFIG_OMAP_USB2PHY2_HOST */ > > +#ifdef CONFIG_AM437X_USB2PHY2_HOST > +static void am437x_enable_usb2_phy2(struct omap_xhci *omap) > +{ > + int usb_otg_ss_clk_val = (USBOTGSSX_CLKCTRL_MODULE_EN | > + USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960); Other than that it should be "const", it should also be at least unsigned. And prefferably u32 . Best regards, Marek Vasut