From owner-freebsd-arm@FreeBSD.ORG Wed Aug 8 21:06:17 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 9691116A46B for ; Wed, 8 Aug 2007 21:06:17 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id F010C13C4A6 for ; Wed, 8 Aug 2007 21:06:16 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l78L6DlX014809; Wed, 8 Aug 2007 23:06:13 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l78L68fR037764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 23:06:09 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l78L68vw055999; Wed, 8 Aug 2007 23:06:08 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l78L68d7055998; Wed, 8 Aug 2007 23:06:08 +0200 (CEST) (envelope-from ticso) Date: Wed, 8 Aug 2007 23:06:08 +0200 From: Bernd Walter To: Krassimir Slavchev Message-ID: <20070808210607.GR41893@cicely12.cicely.de> References: <46B9C68E.2010000@bulinfo.net> <20070808.074028.-749249084.imp@bsdimp.com> <46B9CAD8.4040103@bulinfo.net> <20070808144152.GM41893@cicely12.cicely.de> <46B9DD23.70608@bulinfo.net> <20070808154756.GN41893@cicely12.cicely.de> <46B9EA90.3050508@bulinfo.net> <20070808162011.GP41893@cicely12.cicely.de> <46BA0A40.8030208@bulinfo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46BA0A40.8030208@bulinfo.net> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-arm@freebsd.org, ticso@cicely.de Subject: Re: CENTIPAD boot X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 21:06:17 -0000 On Wed, Aug 08, 2007 at 09:24:00PM +0300, Krassimir Slavchev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > I would assume a RTL8201BL or RTL8201C? > > I have code for the RTL8201BL, which I use with the AT91SAM7X256, but > > it is likely not correct, since I tried a 10BASET link once and it > > failed, but I just took the original code without modification though. > > Anyway - Realtek has datasheets available online. > > RTL8201BL Realtek did something special it seems. You get the duplex state in the BMCR bit 8 (Register 0). 1 = full, 0 = half The speed is in the Test register (25). Bit 0: 1 = 100Mbit link Bit 1: 1 = 10MBit link Bit 0/1 both 0 no link You might want to loop over BMSR (Register 1) bit 3 as well, since a 1 means that auto negotiation has finished. But it might be Ok without it, because there should be enough delays already. In a real world scenario, e.g. in the kernel or running embedded, you'll have to poll the status regulary, to update the MAC accordingly. But it's not required in this case, since the link partner shouldn't change during booting. Let me know if you have success with this, since I'll have to update my AT91SAM7X256 code as well. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de