[U-Boot] [PATCH 1/2] usb/ehci: Add USB support for the MX6Q

Dirk Behme dirk.behme at de.bosch.com
Thu Feb 9 08:24:15 CET 2012


Hi Wolfgang,

On 08.02.2012 16:23, Wolfgang Grandegger wrote:
> Currently, only USB Host 1 is supported.
> 
> Cc: Remy Bohmer <linux at bohmer.net>
> Signed-off-by: Wolfgang Grandegger <wg at denx.de>
> ---
>  arch/arm/cpu/armv7/mx6/clock.c           |   13 ++
>  arch/arm/include/asm/arch-mx6/imx-regs.h |    3 +
>  drivers/usb/host/Makefile                |    1 +
>  drivers/usb/host/ehci-mx6.c              |  205 ++++++++++++++++++++++++++++++
>  4 files changed, 222 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/usb/host/ehci-mx6.c
> 
> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
> index fa3a124..ef98563 100644
> --- a/arch/arm/cpu/armv7/mx6/clock.c
> +++ b/arch/arm/cpu/armv7/mx6/clock.c
> @@ -36,6 +36,19 @@ enum pll_clocks {
>  
>  struct imx_ccm_reg *imx_ccm = (struct imx_ccm_reg *)CCM_BASE_ADDR;
>  
> +void enable_usboh3_clk(unsigned char enable)
> +{
> +	u32 reg;
> +
> +	reg = __raw_readl(&imx_ccm->CCGR6);
> +	if (enable)
> +		reg |= MXC_CCM_CCGR_CG_MASK << MXC_CCM_CCGR0_CG0_OFFSET;
> +	else
> +		reg &= ~(MXC_CCM_CCGR_CG_MASK << MXC_CCM_CCGR0_CG0_OFFSET);
> +	__raw_writel(reg, &imx_ccm->CCGR6);
> +
> +}
> +
>  static u32 decode_pll(enum pll_clocks pll, u32 infreq)
>  {
>  	u32 div;
...
> diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
> new file mode 100644
> index 0000000..b7bf49d
> --- /dev/null
> +++ b/drivers/usb/host/ehci-mx6.c
...
> +int ehci_hcd_init(void)
> +{
> +	struct usb_ehci *ehci;
> +
> +	enable_usboh3_clk(1);

ehci-mx6.c: In function 'ehci_hcd_init':
ehci-mx6.c:171: warning: implicit declaration of function 
'enable_usboh3_clk'

Best regards

Dirk


More information about the U-Boot mailing list