iPXE
Macros | Functions
lan78xx.h File Reference

Microchip LAN78xx USB Ethernet driver. More...

#include "smscusb.h"
#include "smsc75xx.h"

Go to the source code of this file.

Macros

#define LAN78XX_HW_CFG   0x0010
 Hardware configuration register. More...
 
#define LAN78XX_HW_CFG_LED1_EN   0x00200000UL
 LED1 enable. More...
 
#define LAN78XX_HW_CFG_LED0_EN   0x00100000UL
 LED1 enable. More...
 
#define LAN78XX_HW_CFG_LRST   0x00000002UL
 Soft lite reset. More...
 
#define LAN78XX_INT_EP_CTL   0x0098
 Interrupt endpoint control register. More...
 
#define LAN78XX_INT_EP_CTL_RDFO_EN   0x00400000UL
 RX FIFO overflow. More...
 
#define LAN78XX_INT_EP_CTL_PHY_EN   0x00020000UL
 PHY interrupt. More...
 
#define LAN78XX_BULK_IN_DLY   0x0094
 Bulk IN delay register. More...
 
#define LAN78XX_BULK_IN_DLY_SET(ticks)   ( (ticks) << 0 )
 Delay / 16.7ns. More...
 
#define LAN78XX_E2P_BASE   0x0040
 EEPROM register base. More...
 
#define LAN78XX_USB_CFG0   0x0080
 USB configuration register 0. More...
 
#define LAN78XX_USB_CFG0_BIR   0x00000040UL
 Bulk IN use NAK. More...
 
#define LAN78XX_RFE_CTL   0x00b0
 Receive filtering engine control register. More...
 
#define LAN78XX_RFE_CTL_AB   0x00000400UL
 Accept broadcast. More...
 
#define LAN78XX_RFE_CTL_AM   0x00000200UL
 Accept multicast. More...
 
#define LAN78XX_RFE_CTL_AU   0x00000100UL
 Accept unicast. More...
 
#define LAN78XX_FCT_RX_CTL   0x00c0
 FIFO controller RX FIFO control register. More...
 
#define LAN78XX_FCT_RX_CTL_EN   0x80000000UL
 FCT RX enable. More...
 
#define LAN78XX_FCT_RX_CTL_BAD   0x02000000UL
 Store bad frames. More...
 
#define LAN78XX_FCT_TX_CTL   0x00c4
 FIFO controller TX FIFO control register. More...
 
#define LAN78XX_FCT_TX_CTL_EN   0x80000000UL
 FCT TX enable. More...
 
#define LAN78XX_MAC_CR   0x0100
 MAC control register. More...
 
#define LAN78XX_MAC_CR_ADP   0x00002000UL
 Duplex polarity. More...
 
#define LAN78XX_MAC_CR_ADD   0x00001000UL
 Auto duplex. More...
 
#define LAN78XX_MAC_CR_ASD   0x00000800UL
 Auto speed. More...
 
#define LAN78XX_MAC_RX   0x0104
 MAC receive register. More...
 
#define LAN78XX_MAC_RX_MAX_SIZE(mtu)   ( (mtu) << 16 )
 Max frame size. More...
 
#define LAN78XX_MAC_RX_MAX_SIZE_DEFAULT   LAN78XX_MAC_RX_MAX_SIZE ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ )
 
#define LAN78XX_MAC_RX_FCS   0x00000010UL
 FCS stripping. More...
 
#define LAN78XX_MAC_RX_EN   0x00000001UL
 RX enable. More...
 
#define LAN78XX_MAC_TX   0x0108
 MAC transmit register. More...
 
#define LAN78XX_MAC_TX_EN   0x00000001UL
 TX enable. More...
 
#define LAN78XX_RX_ADDR_BASE   0x0118
 MAC receive address register base. More...
 
#define LAN78XX_MII_BASE   0x0120
 MII register base. More...
 
#define LAN78XX_MII_PHY_INTR_MASK   25
 PHY interrupt mask MII register. More...
 
#define LAN78XX_MII_PHY_INTR_SOURCE   26
 PHY interrupt source MII register. More...
 
#define LAN78XX_PHY_INTR_ENABLE   0x8000
 PHY interrupt: global enable. More...
 
#define LAN78XX_PHY_INTR_LINK   0x2000
 PHY interrupt: link state change. More...
 
#define LAN78XX_PHY_INTR_ANEG_ERR   0x0800
 PHY interrupt: auto-negotiation failure. More...
 
#define LAN78XX_PHY_INTR_ANEG_DONE   0x0400
 PHY interrupt: auto-negotiation complete. More...
 
#define LAN78XX_ADDR_FILT_BASE   0x0400
 MAC address perfect filter register base. More...
 
#define LAN78XX_OTP_BASE   0x1000
 OTP register base. More...
 
#define LAN78XX_RESET_MAX_WAIT_MS   100
 Maximum time to wait for reset (in milliseconds) More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 

Detailed Description

Microchip LAN78xx USB Ethernet driver.

Definition in file lan78xx.h.

Macro Definition Documentation

◆ LAN78XX_HW_CFG

#define LAN78XX_HW_CFG   0x0010

Hardware configuration register.

Definition at line 16 of file lan78xx.h.

◆ LAN78XX_HW_CFG_LED1_EN

#define LAN78XX_HW_CFG_LED1_EN   0x00200000UL

LED1 enable.

Definition at line 17 of file lan78xx.h.

◆ LAN78XX_HW_CFG_LED0_EN

#define LAN78XX_HW_CFG_LED0_EN   0x00100000UL

LED1 enable.

Definition at line 18 of file lan78xx.h.

◆ LAN78XX_HW_CFG_LRST

#define LAN78XX_HW_CFG_LRST   0x00000002UL

Soft lite reset.

Definition at line 19 of file lan78xx.h.

◆ LAN78XX_INT_EP_CTL

#define LAN78XX_INT_EP_CTL   0x0098

Interrupt endpoint control register.

Definition at line 22 of file lan78xx.h.

◆ LAN78XX_INT_EP_CTL_RDFO_EN

#define LAN78XX_INT_EP_CTL_RDFO_EN   0x00400000UL

RX FIFO overflow.

Definition at line 23 of file lan78xx.h.

◆ LAN78XX_INT_EP_CTL_PHY_EN

#define LAN78XX_INT_EP_CTL_PHY_EN   0x00020000UL

PHY interrupt.

Definition at line 24 of file lan78xx.h.

◆ LAN78XX_BULK_IN_DLY

#define LAN78XX_BULK_IN_DLY   0x0094

Bulk IN delay register.

Definition at line 27 of file lan78xx.h.

◆ LAN78XX_BULK_IN_DLY_SET

#define LAN78XX_BULK_IN_DLY_SET (   ticks)    ( (ticks) << 0 )

Delay / 16.7ns.

Definition at line 28 of file lan78xx.h.

◆ LAN78XX_E2P_BASE

#define LAN78XX_E2P_BASE   0x0040

EEPROM register base.

Definition at line 31 of file lan78xx.h.

◆ LAN78XX_USB_CFG0

#define LAN78XX_USB_CFG0   0x0080

USB configuration register 0.

Definition at line 34 of file lan78xx.h.

◆ LAN78XX_USB_CFG0_BIR

#define LAN78XX_USB_CFG0_BIR   0x00000040UL

Bulk IN use NAK.

Definition at line 35 of file lan78xx.h.

◆ LAN78XX_RFE_CTL

#define LAN78XX_RFE_CTL   0x00b0

Receive filtering engine control register.

Definition at line 38 of file lan78xx.h.

◆ LAN78XX_RFE_CTL_AB

#define LAN78XX_RFE_CTL_AB   0x00000400UL

Accept broadcast.

Definition at line 39 of file lan78xx.h.

◆ LAN78XX_RFE_CTL_AM

#define LAN78XX_RFE_CTL_AM   0x00000200UL

Accept multicast.

Definition at line 40 of file lan78xx.h.

◆ LAN78XX_RFE_CTL_AU

#define LAN78XX_RFE_CTL_AU   0x00000100UL

Accept unicast.

Definition at line 41 of file lan78xx.h.

◆ LAN78XX_FCT_RX_CTL

#define LAN78XX_FCT_RX_CTL   0x00c0

FIFO controller RX FIFO control register.

Definition at line 44 of file lan78xx.h.

◆ LAN78XX_FCT_RX_CTL_EN

#define LAN78XX_FCT_RX_CTL_EN   0x80000000UL

FCT RX enable.

Definition at line 45 of file lan78xx.h.

◆ LAN78XX_FCT_RX_CTL_BAD

#define LAN78XX_FCT_RX_CTL_BAD   0x02000000UL

Store bad frames.

Definition at line 46 of file lan78xx.h.

◆ LAN78XX_FCT_TX_CTL

#define LAN78XX_FCT_TX_CTL   0x00c4

FIFO controller TX FIFO control register.

Definition at line 49 of file lan78xx.h.

◆ LAN78XX_FCT_TX_CTL_EN

#define LAN78XX_FCT_TX_CTL_EN   0x80000000UL

FCT TX enable.

Definition at line 50 of file lan78xx.h.

◆ LAN78XX_MAC_CR

#define LAN78XX_MAC_CR   0x0100

MAC control register.

Definition at line 53 of file lan78xx.h.

◆ LAN78XX_MAC_CR_ADP

#define LAN78XX_MAC_CR_ADP   0x00002000UL

Duplex polarity.

Definition at line 54 of file lan78xx.h.

◆ LAN78XX_MAC_CR_ADD

#define LAN78XX_MAC_CR_ADD   0x00001000UL

Auto duplex.

Definition at line 55 of file lan78xx.h.

◆ LAN78XX_MAC_CR_ASD

#define LAN78XX_MAC_CR_ASD   0x00000800UL

Auto speed.

Definition at line 56 of file lan78xx.h.

◆ LAN78XX_MAC_RX

#define LAN78XX_MAC_RX   0x0104

MAC receive register.

Definition at line 59 of file lan78xx.h.

◆ LAN78XX_MAC_RX_MAX_SIZE

#define LAN78XX_MAC_RX_MAX_SIZE (   mtu)    ( (mtu) << 16 )

Max frame size.

Definition at line 60 of file lan78xx.h.

◆ LAN78XX_MAC_RX_MAX_SIZE_DEFAULT

#define LAN78XX_MAC_RX_MAX_SIZE_DEFAULT   LAN78XX_MAC_RX_MAX_SIZE ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ )

Definition at line 61 of file lan78xx.h.

◆ LAN78XX_MAC_RX_FCS

#define LAN78XX_MAC_RX_FCS   0x00000010UL

FCS stripping.

Definition at line 63 of file lan78xx.h.

◆ LAN78XX_MAC_RX_EN

#define LAN78XX_MAC_RX_EN   0x00000001UL

RX enable.

Definition at line 64 of file lan78xx.h.

◆ LAN78XX_MAC_TX

#define LAN78XX_MAC_TX   0x0108

MAC transmit register.

Definition at line 67 of file lan78xx.h.

◆ LAN78XX_MAC_TX_EN

#define LAN78XX_MAC_TX_EN   0x00000001UL

TX enable.

Definition at line 68 of file lan78xx.h.

◆ LAN78XX_RX_ADDR_BASE

#define LAN78XX_RX_ADDR_BASE   0x0118

MAC receive address register base.

Definition at line 71 of file lan78xx.h.

◆ LAN78XX_MII_BASE

#define LAN78XX_MII_BASE   0x0120

MII register base.

Definition at line 74 of file lan78xx.h.

◆ LAN78XX_MII_PHY_INTR_MASK

#define LAN78XX_MII_PHY_INTR_MASK   25

PHY interrupt mask MII register.

Definition at line 77 of file lan78xx.h.

◆ LAN78XX_MII_PHY_INTR_SOURCE

#define LAN78XX_MII_PHY_INTR_SOURCE   26

PHY interrupt source MII register.

Definition at line 80 of file lan78xx.h.

◆ LAN78XX_PHY_INTR_ENABLE

#define LAN78XX_PHY_INTR_ENABLE   0x8000

PHY interrupt: global enable.

Definition at line 83 of file lan78xx.h.

◆ LAN78XX_PHY_INTR_LINK

#define LAN78XX_PHY_INTR_LINK   0x2000

PHY interrupt: link state change.

Definition at line 86 of file lan78xx.h.

◆ LAN78XX_PHY_INTR_ANEG_ERR

#define LAN78XX_PHY_INTR_ANEG_ERR   0x0800

PHY interrupt: auto-negotiation failure.

Definition at line 89 of file lan78xx.h.

◆ LAN78XX_PHY_INTR_ANEG_DONE

#define LAN78XX_PHY_INTR_ANEG_DONE   0x0400

PHY interrupt: auto-negotiation complete.

Definition at line 92 of file lan78xx.h.

◆ LAN78XX_ADDR_FILT_BASE

#define LAN78XX_ADDR_FILT_BASE   0x0400

MAC address perfect filter register base.

Definition at line 95 of file lan78xx.h.

◆ LAN78XX_OTP_BASE

#define LAN78XX_OTP_BASE   0x1000

OTP register base.

Definition at line 98 of file lan78xx.h.

◆ LAN78XX_RESET_MAX_WAIT_MS

#define LAN78XX_RESET_MAX_WAIT_MS   100

Maximum time to wait for reset (in milliseconds)

Definition at line 101 of file lan78xx.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )