[PATCH v20120528 4/5] toshiba-ac100: add USB host support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue May 29 11:52:36 EDT 2012


On 12:42 Tue 29 May     , Sascha Hauer wrote:
> On Tue, May 29, 2012 at 12:37:20PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:30 Tue 29 May     , Sascha Hauer wrote:
> > > On Mon, May 28, 2012 at 12:12:35PM +0400, Antony Pavlov wrote:
> > > > Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
> > > > ---
> > > >  arch/arm/boards/toshiba-ac100/board.c |   18 ++++++++++++++++++
> > > >  1 file changed, 18 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
> > > > index e3a5eba..3fd720d 100644
> > > > --- a/arch/arm/boards/toshiba-ac100/board.c
> > > > +++ b/arch/arm/boards/toshiba-ac100/board.c
> > > > @@ -24,6 +24,8 @@
> > > >  #include <init.h>
> > > >  #include <asm/armlinux.h>
> > > >  #include <sizes.h>
> > > > +#include <usb/ehci.h>
> > > > +#include <mach/iomap.h>
> > > >  
> > > >  static int ac100_mem_init(void)
> > > >  {
> > > > @@ -32,3 +34,19 @@ static int ac100_mem_init(void)
> > > >  	return 0;
> > > >  }
> > > >  mem_initcall(ac100_mem_init);
> > > > +
> > > > +#ifdef CONFIG_USB_EHCI
> > > > +static struct ehci_platform_data ehci_pdata = {
> > > > +	.flags = EHCI_HAS_TT,
> > > > +};
> > > > +#endif
> > > > +
> > > > +static int ac100_devices_init(void)
> > > > +{
> > > > +#ifdef CONFIG_USB_EHCI
> > > > +	add_generic_usb_ehci_device(-1, TEGRA_USB3_BASE, &ehci_pdata);
> > > > +#endif
> > > 
> > > Better skip the ifdefs. It won't hurt except for a few bytes of wated
> > > space.
> > and the -1 need to be a define
> > 
> > 
> > btw I think we need to change the auto allocated dev_id to -2 so -1 one have
> > the same meanning as in the kernel
> 
> I think we still have hardcoded -1 around.
I check normally no

Best Regards,
J.



More information about the barebox mailing list