Fast Ethernet Controller (FEC) Driver
i.MX51 EVK Linux Reference Manual
Freescale Semiconductor
21-3
status word contains the M, BC, MC, LG, NO, CR, OV, and TR status bits, and the frame length.
Receive Buffer (RXB) and Frame Interrupts (RXF) may be generated if enabled by the EIMR
register. When the receive frame is complete, the FEC sets the L bit in the RxBD, writes the other
frame status bits into the RxBD, and clears the E bit. The Ethernet controller next generates a
maskable interrupt (RXF bit in EIR, maskable by RXF bit in EIMR), indicating that a frame has
been received and is in memory. The Ethernet controller then waits for a new frame.
•
Interrupt
management—When an event occurs that sets a bit in the EIR, an interrupt is generated
if the corresponding bit in the interrupt mask register (EIMR) is also set. The bit in the EIR is
cleared if a one is written to that bit position; writing zero has no effect. This register is cleared
upon hardware reset. These interrupts can be divided into operational interrupts,
transceiver/network error interrupts, and internal error interrupts. Interrupts which may occur in
normal operation are GRA, TXF, TXB, RXF, RXB. Interrupts resulting from errors/problems
detected in the network or transceiver are HBERR, BABR, BABT, LC, and RL. Interrupts resulting
from internal errors are HBERR and UN. Some of the error interrupts are independently counted
in the MIB block counters. Software may choose to mask off these interrupts as these errors are
visible to network management through the MIB counters.
•
PHY management—phylib was used to manage all the FEC phy related operation such as phy
discovery, link status, state machine etc.MDIO bus will be created in FEC driver and registered into
the system.You can refer to Documentation/networking/phy.txt under linux source directory for
more information.
21.2
Software Operation
The FEC driver supports the following functions:
•
Module initialization—Initializes the module with the device specific structure
•
Rx/Tx transmition
•
Interrupt servicing routine
•
PHY management
•
FEC management such init/start/stop
21.3
Source Code Structure
shows the source files available in the
<ltib_dir>/rpm/BUILD/linux/drivers/net directory.
.
For more information about the generic Linux driver, see the
<ltib_dir>/rpm/BUILD/linux/drivers/net/fec.c
source file.
Table 21-2. FEC Driver Files
File
Description
fec.h
Header file defining registers
fec.c
Linux driver for Ethernet LAN controller
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...