From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Thu, 29 Nov 2012 13:22:03 +0800 Subject: [U-Boot] [PATCHv2 2/4] at91sam9x5: enable USB support for 9x5ek board. In-Reply-To: <1354103289-967-3-git-send-email-richard.genoud@gmail.com> References: <1354103289-967-1-git-send-email-richard.genoud@gmail.com> <1354103289-967-3-git-send-email-richard.genoud@gmail.com> Message-ID: <50B6F0FB.5050307@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Richard, On 11/28/2012 19:48, Richard Genoud wrote: > Signed-off-by: Richard Genoud > --- > arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c | 10 ++++++++++ > arch/arm/include/asm/arch-at91/at91sam9x5.h | 2 ++ > board/atmel/at91sam9x5ek/at91sam9x5ek.c | 3 +++ > drivers/usb/host/ohci-at91.c | 6 ++++-- > 4 files changed, 19 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c > index 9348552..f2a05c8 100644 > --- a/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c > +++ b/arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c > @@ -193,6 +193,16 @@ void at91_spi1_hw_init(unsigned long cs_mask) > } > #endif > > +#if defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_EHCI) > +void at91_uhp_hw_init(void) > +{ > + /* Enable VBus on UHP ports */ > + at91_set_pio_output(AT91_PIO_PORTD, 18, 0); /* port A */ > + at91_set_pio_output(AT91_PIO_PORTD, 19, 0); /* port B */ > + at91_set_pio_output(AT91_PIO_PORTD, 20, 0); /* port C */ > +} > +#endif > + As port C doesn't support EHCI, so, I think we should deal with this carefully. ---<8--- #if OHCI #else EHCI #endif --->8--- I think this will be better. Best Regards Bo Shen