[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-arm
Subject:    Re: CENTIPAD boot
From:       Bernd Walter <ticso () cicely12 ! cicely ! de>
Date:       2007-08-08 21:06:08
Message-ID: 20070808210607.GR41893 () cicely12 ! cicely ! de
[Download RAW message or body]

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
_______________________________________________
freebsd-arm@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic