EmbeddedRelated.com
Forums
Memfault Beyond the Launch

fec problem on 8xx board

Started by Unknown December 28, 2006
Hi,

I am porting linux 2.6 on a custom MPC8xx processor based board that
uses FEC with LXT971 on the MII bus.

I am not able to bring up the eth0 interface. I have tried using both
the drivers:
1.      Generic FEC driver (FEC_ENET under arch/ppc/8xx_io/fec.c)
2.      Freescale FEC driver (FS_ENET under
drivers/net/fs_enet/fs_enet-main.c)


I have posted the kernel log and ifconfig outputs of both below:
1.      Generic FEC driver (FEC_ENET under arch/ppc/8xx_io/fec.c

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:A0:B0:C0:D0:E0
         inet addr:192.168.188.90  Bcast:192.168.188.255
Mask:255.255.255.0
         BROADCAST MULTICAST  MTU:1500  Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
         Base address:0xe00

# ifconfig eth0 up
SIOCSIFFLAGS: No such device

2.      Freescale FEC driver (FS_ENET under
drivers/net/fs_enet/fs_enet-main.c)

# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found


Could you please let me know:
1.      Which driver tree is to be used (fs_net or fec_enet)
2.      Is there any board specific initialization required for FEC?
3.      Anything that is missed out based on the logs (below)?
4.      Seems like the eth0 device is not getting created. Any
pointers?

Thanks for your help.

Regards,
AP



Boot up Log FEC_ENET
--------------------------------
Kernel command line: ramdisk_size=6144 root=/dev/ram0 init=/linuxrc rw
.
.
NET: Registered protocol family 16
Generic PHY: Registered new driver
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 128 (order: -3, 512 bytes)
TCP established hash table entries: 512 (order: -1, 2048 bytes)
TCP bind hash table entries: 256 (order: -2, 1024 bytes)
TCP: Hash tables configured (established 512 bind 256)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(1277.128:1): initialized
 .
.
.

RAMDISK driver initialized: 1 RAM disks of 6144K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
LXT970: Registered new driver
LXT971: Registered new driver
Fixed PHY: Registered new driver
eth0: FEC ENET Version 0.2, FEC irq 6, MII irq 4, addr
00:A0:B0:C0:D0:E0
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP htcp registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
.
.
.
#


BOOT LOG : Freescale FEC driver (FS_ENET under
drivers/net/fs_enet/fs_enet-main.c)
----------------------------------------------------------------------------------------------------------------------

# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found


Boot up Log - FS_ENET

Kernel command line: ramdisk_size=6144 root=/dev/ram0 init=/linuxrc rw
console=ttyCPM0,115200
.
.
.
NET: Registered protocol family 16
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 128 (order: -3, 512 bytes)
TCP established hash table entries: 512 (order: -1, 2048 bytes)
TCP bind hash table entries: 256 (order: -2, 1024 bytes)
TCP: Hash tables configured (established 512 bind 256)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(7370.992:1): initialized
.
.
.
RAMDISK driver initialized: 1 RAM disks of 6144K size 1024 blocksize
loop: loaded (max 8 devices)
LXT970: Registered new driver
LXT971: Registered new driver
fs_enet.c:v1.0 (Aug 8, 2005)
TCP bic registered
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
.
.
.

#

parkera...@gmail.com wrote:
> I am porting linux 2.6 on a custom MPC8xx processor based board that > uses FEC with LXT971 on the MII bus.
> I am not able to bring up the eth0 interface. I have tried using both > the drivers: > 1. Generic FEC driver (FEC_ENET under arch/ppc/8xx_io/fec.c) > 2. Freescale FEC driver (FS_ENET under > drivers/net/fs_enet/fs_enet-main.c)
I use the LXT971 with the MPC855 and 860 using the driver in 8xx_io/fec.c. No troubles. During boot, you should see something like: eth0: FEC ENET Version 0.2, FEC irq 9, MII irq 12, addr 00:22:33:11:44:22 eth0: Phy @ 0x0, type LXT971 (0x001378e2) This is from fec_enet_init() which should run as long as you've got the FEC configured into your kernel. You might want to check that. The "Generic PHY: Registered new driver" doesn't seem right to me and I don't see where this is coming from in the kernel source.
> 2. Is there any board specific initialization required for FEC?
Some. You need to initialize bd->bi_enetaddr[]. See arch/ppc/boot/simple/embed_config.c for some examples. Regards, Steve ------------------------------------------------------------------------ Steve Schefter phone: +1 705 725 9999 x26 The Software Group Limited fax: +1 705 725 9666 642 Welham Road, Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com

Memfault Beyond the Launch