From owner-freebsd-arm@FreeBSD.ORG Fri Dec 14 14:32:03 2007 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB57F16A421 for ; Fri, 14 Dec 2007 14:32:03 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout2.freenet.de (mout2.freenet.de [IPv6:2001:748:100:40::2:4]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9A913C4EC for ; Fri, 14 Dec 2007 14:32:03 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.12] (helo=2.mx.freenet.de) by mout2.freenet.de with esmtpa (Exim 4.68) (envelope-from ) id 1J3Ba5-0002F7-UO for freebsd-arm@freebsd.org; Fri, 14 Dec 2007 15:32:02 +0100 Received: from x0f55.x.pppool.de ([89.59.15.85]:59112 helo=peedub.jennejohn.org) by 2.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.68 #1) id 1J3Ba5-0001fj-Nc for freebsd-arm@freebsd.org; Fri, 14 Dec 2007 15:32:01 +0100 Date: Fri, 14 Dec 2007 15:32:01 +0100 From: Gary Jennejohn To: freebsd-arm@freebsd.org 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> Organization: DENX Softwre Engineering GmbH X-Mailer: Claws Mail 3.0.2 (GTK+ 2.10.14; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: MMC cards support X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2007 14:32:04 -0000 On Fri, 14 Dec 2007 06:25:11 -0700 (MST) Warner Losh wrote: > From: Gary Jennejohn > 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 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