[U-Boot] [PATCH 2/2] document network driver framework

Andy Fleming afleming at gmail.com
Thu Jul 23 01:00:40 CEST 2009


On Sat, Jul 18, 2009 at 8:04 PM, Mike Frysinger <vapier at gentoo.org> wrote:

> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
> Ben: some things to note:
>        - i adopted Jean's proposed naming scheme in the CONFIG section
>        - i deprecated calling the driver-specific entry point
>          "xxx_initialization()" in favor of "xxx_register()" because the
>          former is way too confusing with everyone also having "xxx_init()"
>
>  doc/README.drivers.eth |  199
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 199 insertions(+), 0 deletions(-)
>  create mode 100644 doc/README.drivers.eth
>
> diff --git a/doc/README.drivers.eth b/doc/README.drivers.eth
> new file mode 100644
> index 0000000..00b4eb1
> --- /dev/null
> +++ b/doc/README.drivers.eth
> @@ -0,0 +1,199 @@
> +-----------------------
> + Ethernet Driver Guide
> +-----------------------
> +
> +The networking stack in Das U-Boot is designed for multiple network
> devices
> +to be easily added and controlled at runtime.  This guide is meant for
> people
> +who wish to review the net driver stack with an eye towards implementing
> your
> +own ethernet device driver.  Here we will describe a new pseudo 'APE'
> driver.
> +
> +----------------
> + CONFIG Options
> +----------------
> +
> +The common config defines your device should respect (if applicable):
> +       CONFIG_MII  - configure in MII mode
> +       CONFIG_RMII - configure in RMII mode



That's awfully global, and inflexible.  I don't think there's any convention
here that should be encouraged.  The data bus configuration is a per-device
attribute.  If some system architects choose to allow this into their config
files, far be it from me to protest, but I'm against it.

Also, CONFIG_MII doesn't mean what you think it means.  It stems from the
obnoxious overlap in terms set forth by IEEE 802.3.  The MII in this case
refers to the MII Management bus.  Defining CONFIG_MII will cause
miiphyutil.c to be built, which is a bit-bang MII Management bus driver.  It
will also enable some MII Management features.  CONFIG_MII is therefore a
relevant CONFIG option for most drivers.

Andy


More information about the U-Boot mailing list