User`s guide

Porting the Fast Ethernet Controller Driver
i.MX53 System Development User’s Guide, Rev. 1
22-2 Freescale Semiconductor
22.2 Source Code
The source code for the Freescale FEC Linux environment is located under the
../ltib/rpm/BUILD/linux/drivers/net directory. It contains the following files:
Of those files, only the FEC low-level Ethernet driver code (fec.[ch]) constitutes the Linux i.MX53 FEC
driver.
The driver uses the following compile definitions:
CONFIG_FEC_1588 Set for IEEE 1588 network time synchronization.
CONFIG_M5272 PowerPC information. Can be safely ignored and should not be set.
CONFIG_MXC IMXxx parts. Should be defined.
CONFIG_MXS Legacy MXS part. Should generally not be defined.
22.3 Ethernet Configuration
This section covers aspects such as duplex and speed configurations.
The two most common issues are as follows:
MAC address is missing or invalid
Ethernet connection (duplex, speed)
By default, the Ethernet driver reads the burned-in MAC address, which is found in code from the fec.c
file located in the function fec_get_mac(). If no MAC address exists in the hardware, the MAC is read as
all zeros, which creates problems. If this occurs, modify the code to read the MAC address from Flash or
elsewhere.
The FEC driver and hardware are designed to comply to the IEEE standards for Ethernet auto-negotiation.
See the FEC chapter in the i.MX53 Applications Processor Reference Manual for a description of using
flow control in full duplex and more.
Table 22-2. Source Code Files
File Names
FEC low-level Ethernet driver: fec.h
•fec.c
MAC Switch software fec_switch.h
fec_switch.c
IEEE 1588 PTP (network time sync) fec_1588.h
fec_1588.c
MPC52xx PowerPC Ethernet Driver fec_mpc52xx.h
fec_mpc52xx.c
fec_mpc52xx_phy.c