From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Thu, 29 Nov 2012 13:22:25 +0800 Subject: [U-Boot] [PATCHv2 4/4] at91sam9x5ek: add USB configuration In-Reply-To: <1354103289-967-5-git-send-email-richard.genoud@gmail.com> References: <1354103289-967-1-git-send-email-richard.genoud@gmail.com> <1354103289-967-5-git-send-email-richard.genoud@gmail.com> Message-ID: <50B6F111.4060103@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 On 11/28/2012 19:48, Richard Genoud wrote: > Signed-off-by: Richard Genoud > --- > include/configs/at91sam9x5ek.h | 24 ++++++++++++++++++++++++ > 1 files changed, 24 insertions(+), 0 deletions(-) > > diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h > index 5e5f9c1..fd2586d 100644 > --- a/include/configs/at91sam9x5ek.h > +++ b/include/configs/at91sam9x5ek.h > @@ -91,6 +91,14 @@ > #define CONFIG_CMD_SF > #define CONFIG_CMD_MMC > #define CONFIG_CMD_FAT > +#define CONFIG_CMD_USB > + > +/* > + * define CONFIG_USB_EHCI to enable USB Hi-Speed (aka 2.0) > + * NB: in this case, USB 1.1 devices won't be recognized. > + */ > +#undef CONFIG_USB_EHCI > + Nowhere defined it, so no need undefined it. > > /* SDRAM */ > #define CONFIG_NR_DRAM_BANKS 1 > @@ -158,6 +166,22 @@ > #define CONFIG_NET_RETRY_COUNT 20 > #define CONFIG_MACB_SEARCH_PHY > > +/* USB */ > +#ifdef CONFIG_CMD_USB > +#ifdef CONFIG_USB_EHCI > +#define CONFIG_USB_EHCI_ATMEL > +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2 > +#else > +#define CONFIG_USB_OHCI_NEW > +#define CONFIG_SYS_USB_OHCI_CPU_INIT > +#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00600000 /* ATMEL_BASE_OHCI */ This has defined in arch/arm/include/asm/arch-at91/at91sam9x5.h. You can use it directly. > +#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9x5" > +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3 > +#endif > +#define CONFIG_USB_ATMEL > +#define CONFIG_USB_STORAGE > +#endif > + > #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ > > #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE >