Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2007 15:32:01 +0100
From:      Gary Jennejohn <gary.jennejohn@freenet.de>
To:        freebsd-arm@freebsd.org
Subject:   Re: MMC cards support
Message-ID:  <20071214153201.18c4c5ea@peedub.jennejohn.org>
In-Reply-To: <20071214.062511.74732956.imp@bsdimp.com>
References:  <20071213222654.GE17356@dracon.ht-systems.ru> <20071214090128.GM31230@cicely12.cicely.de> <20071214115226.0b2cb7e2@peedub.jennejohn.org> <20071214.062511.74732956.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 14 Dec 2007 06:25:11 -0700 (MST)
Warner Losh <imp@bsdimp.com> wrote:

> From: Gary Jennejohn <gary.jennejohn@freenet.de>
> Subject: Re: MMC cards support
> Date: Fri, 14 Dec 2007 11:52:26 +0100
> 
> > On Fri, 14 Dec 2007 10:01:28 +0100
> > Bernd Walter <ticso@cicely12.cicely.de> wrote:
> > 
> > > On Fri, Dec 14, 2007 at 01:26:54AM +0300, Stanislav Sedov wrote:
> > > > Probably. It seems that FreeBSD is trying to read MAC address from the chip's
> > > > registers, and I though that if the ethernet works in u-boot then this registers
> > > > have been set. I'll investigate this further.
> > > 
> > > Sounds logical, but I don't know u-boot and FreeBSD won't complain
> > > without a reason.
> > > At least there is no standard place to get the system MAC beside the
> > > ate registers.
> > > Of course you can hack the ate driver and hardcode a MAC into the kernel.
> > > Or you can switch to FreeBSDs own bootcode.
> > > 
> > 
> > u-boot passes this information to Linux in the board info (bd_t)
> > structure at boot time.  A lot of Linux ethernet drivers read the MAC
> > out of this structure and then set it in the hardware/software.
> > 
> > Very few u-boot ethernet drivers set the MAC in the hardware themselves.
> > 
> > With FreeBSD this mechanism is missing.
> 
> I did it this way because the Linux driver for the Atmel driver did it
> this way.  I thought it was the de-facto way things work.  Patches to
> implement this would be welcome.
> 

It is effectively the de-facto way to do things in the Linux embedded
world.  Just about every embedded board used with Linux also uses
u-boot.  It just won't work with FreeBSD because the infrastructure
(passing bd_t to the kernel) is missing.

This is a weakness of which Wolfgang Denk is well aware and he'd just
love for somebody to put together the missing glue for *BSD and send it
to him.  Of course, this would also require changes to the kernel
itself.

I know about this stuff because I do embedded Linux for a living and have
hacked on u-boot myself.  Wolfgang Denk is also a friend of mine.

-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071214153201.18c4c5ea>