[U-Boot] [PATCH 10/13] at91: move usb driver to drivers/usb

ksi at koi8.net ksi at koi8.net
Wed Apr 1 17:53:15 CEST 2009


On Wed, 1 Apr 2009, Remy Bohmer wrote:

> Hello Stefan,
> 
> > From what I remember we all agreed to move the device drivers (e.g.
> ethernet,
> > NAND, USB, serial etc) from the architecture/board (cpu/... board/...)
> to the
> > drivers directories at some time.
> >
> > Speaking for PPC4xx, the 4xx ethernet driver has recently been moved
> from
> > cpu/ppc4xx to drivers/net. And I'm planning to move the 4xx NAND
> driver (and
> > others) soon too.
> >
> > So if this atmel_usb.c driver isn't just platform USB init code, but a
> real
> > USB driver, then I'm voting to move it to drivers/usb as well.
> 
> And that is exactly the issue here. The discussion is about moving
> 'platform USB init code' to generic driver code.
> I would have no problems with moving real USB drivers to the generic
> driver section, if they are cleaned from board specific code, of
> course.

Board specific code belongs to $(BOARD).c. It does _NOT_ belong to cpu/*
either so it should be moved to $(BOARD).c no matter where that platform
driver resides.

That is why we should put something like platform_$(DRIVER)_init() in all
those drivers (most of them do already have it, see e.g. I2C drivers) and
move that portion in board specific functions in $(BOARD).c.

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************


More information about the U-Boot mailing list