FreeNOS
Data Structures | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
Sun8iEmac Class Reference

Network device of the Allwinner Sun8i family System-on-Chips. More...

#include <Sun8iEmac.h>

Inheritance diagram for Sun8iEmac:
NetworkDevice Device File

Data Structures

struct  FrameDescriptor
 Transmit/receive frame descriptor. More...
 

Public Member Functions

 Sun8iEmac (const u32 inode, NetworkServer &server)
 Constructor. More...
 
virtual ~Sun8iEmac ()
 Destructor. More...
 
virtual FileSystem::Result initialize ()
 Initialize the device. More...
 
virtual FileSystem::Result getAddress (Ethernet::Address *address)
 Read ethernet address. More...
 
virtual FileSystem::Result setAddress (const Ethernet::Address *address)
 Set ethernet address. More...
 
virtual FileSystem::Result interrupt (const Size vector)
 Called when an interrupt has been triggered for this device. More...
 
virtual FileSystem::Result transmit (NetworkQueue::Packet *pkt)
 Add a network packet to the transmit queue. More...
 
virtual FileSystem::Result startDMA ()
 Start DMA processing. More...
 
- Public Member Functions inherited from NetworkDevice
 NetworkDevice (const u32 inode, NetworkServer &server)
 Constructor. More...
 
virtual ~NetworkDevice ()
 Destructor. More...
 
const Size getMaximumPacketSize () const
 Get maximum packet size. More...
 
NetworkQueuegetReceiveQueue ()
 Get receive queue. More...
 
NetworkQueuegetTransmitQueue ()
 Get transmit queue. More...
 
void unregisterSockets (const ProcessID pid)
 Remove sockets for a process. More...
 
virtual FileSystem::Result process (const NetworkQueue::Packet *packet, const Size offset=0)
 Process a received network packet. More...
 
- Public Member Functions inherited from Device
 Device (const u32 inode, const FileSystem::FileType type)
 Constructor. More...
 
virtual ~Device ()
 Destructor. More...
 
virtual const StringgetIdentifier () const
 Get unique device identifier. More...
 
- Public Member Functions inherited from File
 File (const u32 inode, const FileSystem::FileType type=FileSystem::RegularFile, const UserID uid=ZERO, const GroupID gid=ZERO)
 Constructor function. More...
 
virtual ~File ()
 Destructor function. More...
 
u32 getInode () const
 Get inode number. More...
 
FileSystem::FileType getType () const
 Retrieve our filetype. More...
 
virtual FileSystem::Result read (IOBuffer &buffer, Size &size, const Size offset)
 Read bytes from the file. More...
 
virtual FileSystem::Result write (IOBuffer &buffer, Size &size, const Size offset)
 Write bytes to the file. More...
 
virtual FileSystem::Result status (FileSystem::FileStat &st)
 Retrieve file statistics. More...
 
virtual bool canRead () const
 Check if the File has data ready for reading. More...
 
virtual bool canWrite () const
 Check if the File can be written to. More...
 

Static Public Attributes

static const Size InterruptNumber = 114
 Interrupt number for this device on a sun8i family SoC. More...
 

Private Types

enum  Registers {
  BasicCtl0 = 0x0000, BasicCtl1 = 0x0004, IntStatus = 0x0008, IntEnable = 0x000C,
  TransmitCtl0 = 0x0010, TransmitCtl1 = 0x0014, TransmitFlowCtl = 0x001C, TransmitDescList = 0x0020,
  ReceiveCtl0 = 0x0024, ReceiveCtl1 = 0x0028, ReceiveDescList = 0x0034, ReceiveFrmFilter = 0x0038,
  ReceiveHash0 = 0x0040, ReceiveHash1 = 0x0044, MiiCmd = 0x0048, MiiData = 0x004C,
  AddrHigh = 0x0050, AddrLow = 0x0054, TransmitStatus = 0x00B0, TransmitCurDesc = 0x00B4,
  TransmitCurBuf = 0x00B8, ReceiveStatus = 0x00C0, ReceiveCurDesc = 0x00C4, ReceiveCurBuf = 0x00C8,
  RgmiiStatus = 0x00D0
}
 Hardware registers. More...
 
enum  BasicCtl0Flags { BasicCtl0FullDup = (1 << 0), BasicCtl0SpeedMask = ((1 << 2) | (1 << 3)), BasicCtl0Speed100 = (0x3 << 2) }
 Flags for the Basic Control 0 register. More...
 
enum  BasicCtl1Flags { BasicCtl1Reset = (1 << 0), BasicCtl1BurstShift = 24 }
 Flags for the Basic Control 1 register. More...
 
enum  IntStatusFlags { IntStatusReceive = (1 << 8), IntStatusTransmit = (1 << 0) }
 Flags for the Interrupt Status register. More...
 
enum  IntEnableFlags { IntEnableReceive = (1 << 8), IntEnableTransmit = (1 << 0) }
 Flags for the Interrupt Enable register. More...
 
enum  MiiCmdFlags {
  MiiCmdPhyAddrShift = 12, MiiCmdPhyAddrMask = 0xf000, MiiCmdPhyRegShift = 4, MiiCmdPhyRegMask = 0xf0,
  MiiCmdPhyCsrDiv128 = 0x3, MiiCmdPhyCsrShift = 20, MiiCmdPhyWrite = (1 << 1), MiiCmdPhyBusy = (1 << 0)
}
 Flags for Media-Independent-Interface (MII) Command register. More...
 
enum  MiiRegisters {
  MiiRegControl = (0x0), MiiRegStatus = (0x1), MiiRegIdHigh = (0x2), MiiRegIdLow = (0x3),
  MiiRegAdv = (0x4), MiiRegLink = (0x5)
}
 Registers provided by the PHY on the Media-Independent-Interface (MII) More...
 
enum  MiiControlFlags {
  MiiControlFullDuplex = 0x0100, MiiControlAutoRestart = 0x0200, MiiControlAutoEnable = 0x1000, MiiControlSpeed100 = 0x2000,
  MiiControlReset = 0x8000
}
 Flags in the Mii Control register. More...
 
enum  MiiStatusFlags { MiiStatusExt = 0x0001, MiiStatusLink = 0x0004, MiiStatusAutoCap = 0x0008, MiiStatusAutoCompl = 0x0020 }
 Flags in the Mii Status register. More...
 
enum  MiiAdvFlags { MiiAdvSpeed10Full = 0x0040, MiiAdvSpeed100Full = 0x0100 }
 Flags in the Mii Advertised abilities register. More...
 
enum  TransmitCtl0Flags { TransmitCtl0Enable = (1 << 31) }
 Flags for the Transmit Control 0 register. More...
 
enum  TransmitCtl1Flags { TransmitCtl1DmaStart = (1 << 31), TransmitCtl1DmaEnable = (1 << 30), TransmitCtl1NextFrame = (1 << 2), TransmitCtl1FullFrame = (1 << 1) }
 Flags for the Transmit Control 1 register. More...
 
enum  ReceiveCtl0Flags { ReceiveCtl0Enable = (1 << 31) }
 Flags for the Receive Control 0 register. More...
 
enum  ReceiveCtl1Flags {
  ReceiveCtl1DmaStart = (1 << 31), ReceiveCtl1DmaEnable = (1 << 30), ReceiveCtl1ErrorFrame = (1 << 3), ReceiveCtl1UnderFrame = (1 << 2),
  ReceiveCtl1FullFrame = (1 << 1)
}
 Flags for the Receive Control 1 register. More...
 
enum  FrameDescriptorFlags {
  FrameDescriptorCtl = (1 << 31), TransmitDescRaiseInt = (1 << 31), TransmitDescFirst = (1 << 29), TransmitDescLast = (1 << 30),
  TransmitDescChained = (1 << 24), ReceiveDescLast = (1 << 8), ReceiveDescFrmShift = 16, ReceiveDescFrmMask = (0x3fff)
}
 Flags for frame descriptors. More...
 

Private Member Functions

FileSystem::Result receive ()
 Receive packets. More...
 
bool miiBusyWait () const
 Wait until the PHY comes out of busy state. More...
 
u32 miiRead (const u8 phyAddr, const u8 regAddr)
 Read a Media-Independent-Interface (MII) register on the PHY. More...
 
void miiWrite (const u8 phyAddr, const u8 regAddr, const u32 data)
 Write a Media-Independent-Interface (MII) register on the PHY. More...
 
FileSystem::Result configPhy ()
 Configure the PHY connected to the MAC controller. More...
 
FileSystem::Result resetPhy ()
 Reset the PHY connected to the MAC controller. More...
 
FileSystem::Result resetReceive ()
 Reset receive control functions. More...
 
FileSystem::Result resetTransmit ()
 Reset transmit control functions. More...
 
FileSystem::Result reset ()
 Reset the controller. More...
 
void printRx ()
 Print diagnostic information about the receive queue (RX) More...
 
void printTx ()
 Print diagnostic information about the transmit queue (TX) More...
 

Private Attributes

Arch::IO m_io
 Memory mapped registers. More...
 
SunxiClockControl m_ccu
 Clock Control Unit. More...
 
SunxiSystemControl m_syscon
 System Control Unit. More...
 
Memory::Range m_receiveDescRange
 Memory range for receive descriptors. More...
 
Index< FrameDescriptor, NetworkQueue::MaxPacketsm_receiveDesc
 List of pointers to receive descriptors. More...
 
Index< NetworkQueue::Packet, NetworkQueue::MaxPacketsm_receivePackets
 List of pointers to receive packets. More...
 
Size m_receiveIndex
 Current receive packet index. More...
 
Memory::Range m_transmitDescRange
 Memory range for transmit descriptors. More...
 
Index< FrameDescriptor, NetworkQueue::MaxPacketsm_transmitDesc
 List of pointers to transmit descriptors. More...
 
Queue< NetworkQueue::Packet *, NetworkQueue::MaxPacketsm_transmitPending
 List of pointers to packets pending transmission. More...
 
Queue< NetworkQueue::Packet *, NetworkQueue::MaxPacketsm_transmitPackets
 List of pointers to packets that the driver has submitted for transmission. More...
 
Size m_transmitIndex
 Current transmit packet index. More...
 

Static Private Attributes

static const Address MemoryAddress = 0x01c30000
 Physical memory address of the device memory mapped registers. More...
 
static const u8 PhyMdioAddress = 0x1
 Fixed address of the PHY on the MDIO bus. More...
 
static const Size MaximumMiiPoll = 100000
 Maximum number of polling reads for MII-busy flag. More...
 
static const Size MaximumResetPoll = 100000
 Maximum number of polling reset iterations. More...
 

Additional Inherited Members

- Protected Attributes inherited from NetworkDevice
Size m_maximumPacketSize
 Maximum size of each packet. More...
 
NetworkQueue m_receive
 
NetworkQueue m_transmit
 
NetworkServerm_server
 
Ethernetm_eth
 
ARPm_arp
 
IPV4m_ipv4
 
ICMPm_icmp
 
UDPm_udp
 
- Protected Attributes inherited from Device
String m_identifier
 Unique identifier for this Device. More...
 
- Protected Attributes inherited from File
const u32 m_inode
 Inode number. More...
 
const FileSystem::FileType m_type
 Type of this file. More...
 
UserID m_uid
 Owner of the file. More...
 
GroupID m_gid
 Group of the file. More...
 
FileSystem::FileModes m_access
 Access permissions. More...
 
Size m_size
 Size of the file, in bytes. More...
 

Detailed Description

Network device of the Allwinner Sun8i family System-on-Chips.

Definition at line 41 of file Sun8iEmac.h.

Member Enumeration Documentation

◆ BasicCtl0Flags

Flags for the Basic Control 0 register.

Enumerator
BasicCtl0FullDup 
BasicCtl0SpeedMask 
BasicCtl0Speed100 

Definition at line 97 of file Sun8iEmac.h.

◆ BasicCtl1Flags

Flags for the Basic Control 1 register.

Enumerator
BasicCtl1Reset 
BasicCtl1BurstShift 

Definition at line 107 of file Sun8iEmac.h.

◆ FrameDescriptorFlags

Flags for frame descriptors.

Enumerator
FrameDescriptorCtl 
TransmitDescRaiseInt 
TransmitDescFirst 
TransmitDescLast 
TransmitDescChained 
ReceiveDescLast 
ReceiveDescFrmShift 
ReceiveDescFrmMask 

Definition at line 244 of file Sun8iEmac.h.

◆ IntEnableFlags

Flags for the Interrupt Enable register.

Enumerator
IntEnableReceive 
IntEnableTransmit 

Definition at line 125 of file Sun8iEmac.h.

◆ IntStatusFlags

Flags for the Interrupt Status register.

Enumerator
IntStatusReceive 
IntStatusTransmit 

Definition at line 116 of file Sun8iEmac.h.

◆ MiiAdvFlags

enum Sun8iEmac::MiiAdvFlags
private

Flags in the Mii Advertised abilities register.

Enumerator
MiiAdvSpeed10Full 
MiiAdvSpeed100Full 

Definition at line 185 of file Sun8iEmac.h.

◆ MiiCmdFlags

enum Sun8iEmac::MiiCmdFlags
private

Flags for Media-Independent-Interface (MII) Command register.

Enumerator
MiiCmdPhyAddrShift 
MiiCmdPhyAddrMask 
MiiCmdPhyRegShift 
MiiCmdPhyRegMask 
MiiCmdPhyCsrDiv128 
MiiCmdPhyCsrShift 
MiiCmdPhyWrite 
MiiCmdPhyBusy 

Definition at line 134 of file Sun8iEmac.h.

◆ MiiControlFlags

Flags in the Mii Control register.

Enumerator
MiiControlFullDuplex 
MiiControlAutoRestart 
MiiControlAutoEnable 
MiiControlSpeed100 
MiiControlReset 

Definition at line 162 of file Sun8iEmac.h.

◆ MiiRegisters

Registers provided by the PHY on the Media-Independent-Interface (MII)

Enumerator
MiiRegControl 
MiiRegStatus 

< Control

MiiRegIdHigh 

< Status

MiiRegIdLow 

< Identifier High

MiiRegAdv 

< Identifier Low

MiiRegLink 

< Advertised abilities

Definition at line 149 of file Sun8iEmac.h.

◆ MiiStatusFlags

Flags in the Mii Status register.

Enumerator
MiiStatusExt 
MiiStatusLink 
MiiStatusAutoCap 
MiiStatusAutoCompl 

Definition at line 174 of file Sun8iEmac.h.

◆ ReceiveCtl0Flags

Flags for the Receive Control 0 register.

Enumerator
ReceiveCtl0Enable 

Definition at line 213 of file Sun8iEmac.h.

◆ ReceiveCtl1Flags

Flags for the Receive Control 1 register.

Enumerator
ReceiveCtl1DmaStart 
ReceiveCtl1DmaEnable 
ReceiveCtl1ErrorFrame 
ReceiveCtl1UnderFrame 
ReceiveCtl1FullFrame 

Definition at line 221 of file Sun8iEmac.h.

◆ Registers

enum Sun8iEmac::Registers
private

Hardware registers.

Enumerator
BasicCtl0 
BasicCtl1 

< Basic Control 0

IntStatus 

< Basic Control 1

IntEnable 

< Interrupt Status

TransmitCtl0 

< Interrupt Enable

TransmitCtl1 

< Transmit Control 0

TransmitFlowCtl 

< Transmit Control 1

TransmitDescList 

< Transmit Flow Control

ReceiveCtl0 

< Transmit Descriptor List Address

ReceiveCtl1 

< Receive Control 0

ReceiveDescList 

< Receive Control 1

ReceiveFrmFilter 

< Receive Descriptor List Address

ReceiveHash0 

< Receive Frame Filter

ReceiveHash1 

< Receive Hash Table 0

MiiCmd 

< Receive Hash Table 1

MiiData 

< Management Interface Command

AddrHigh 

< Management Interface Data

AddrLow 

< MAC Address High

TransmitStatus 

< MAC Address Low

TransmitCurDesc 

< Transmit DMA Status

TransmitCurBuf 

< Transmit Current Descriptor

ReceiveStatus 

< Transmit Current Buffer

ReceiveCurDesc 

< Receive DMA Status

ReceiveCurBuf 

< Receive Current Descriptor

RgmiiStatus 

< Receive Current Buffer

Definition at line 65 of file Sun8iEmac.h.

◆ TransmitCtl0Flags

Flags for the Transmit Control 0 register.

Enumerator
TransmitCtl0Enable 

Definition at line 194 of file Sun8iEmac.h.

◆ TransmitCtl1Flags

Flags for the Transmit Control 1 register.

Enumerator
TransmitCtl1DmaStart 
TransmitCtl1DmaEnable 
TransmitCtl1NextFrame 
TransmitCtl1FullFrame 

Definition at line 202 of file Sun8iEmac.h.

Constructor & Destructor Documentation

◆ Sun8iEmac()

Sun8iEmac::Sun8iEmac ( const u32  inode,
NetworkServer server 
)

Constructor.

Parameters
inodeInode number
serverNetworkServer reference

Definition at line 26 of file Sun8iEmac.cpp.

References DEBUG.

◆ ~Sun8iEmac()

Sun8iEmac::~Sun8iEmac ( )
virtual

Destructor.

Definition at line 34 of file Sun8iEmac.cpp.

References DEBUG.

Member Function Documentation

◆ configPhy()

FileSystem::Result Sun8iEmac::configPhy ( )
private

◆ getAddress()

FileSystem::Result Sun8iEmac::getAddress ( Ethernet::Address address)
virtual

Read ethernet address.

Parameters
addressEthernet address reference for output
Returns
Result code

Implements NetworkDevice.

Definition at line 123 of file Sun8iEmac.cpp.

References Ethernet::Address::addr, AddrHigh, AddrLow, DEBUG, m_io, ARMIO::read(), and FileSystem::Success.

Referenced by reset().

◆ initialize()

FileSystem::Result Sun8iEmac::initialize ( )
virtual

◆ interrupt()

FileSystem::Result Sun8iEmac::interrupt ( const Size  vector)
virtual

Called when an interrupt has been triggered for this device.

Parameters
vectorVector number of the interrupt.
Returns
Result code

Reimplemented from Device.

Definition at line 175 of file Sun8iEmac.cpp.

References Queue< T, N >::count(), DEBUG, EnableIRQ, ERROR, IntEnable, IntEnableReceive, IntEnableTransmit, InterruptNumber, IntStatus, IntStatusTransmit, m_io, NetworkDevice::m_transmit, m_transmitPackets, Queue< T, N >::pop(), printTx(), ProcessCtl(), ARMIO::read(), receive(), ReceiveCtl1, NetworkQueue::release(), SELF, File::status(), FileSystem::Success, TransmitCtl1, and ARMIO::write().

◆ miiBusyWait()

bool Sun8iEmac::miiBusyWait ( ) const
private

Wait until the PHY comes out of busy state.

Returns
True if PHY is ready, false if still busy

Definition at line 348 of file Sun8iEmac.cpp.

References DEBUG, ERROR, m_io, MaximumMiiPoll, MiiCmd, MiiCmdPhyBusy, and ARMIO::read().

Referenced by miiRead(), and miiWrite().

◆ miiRead()

u32 Sun8iEmac::miiRead ( const u8  phyAddr,
const u8  regAddr 
)
private

Read a Media-Independent-Interface (MII) register on the PHY.

Parameters
phyAddrAddress of the PHY on the MDIO bus
regAddrMII-register to read
Returns
Value of the register

Definition at line 373 of file Sun8iEmac.cpp.

References DEBUG, m_io, miiBusyWait(), MiiCmd, MiiCmdPhyAddrMask, MiiCmdPhyAddrShift, MiiCmdPhyBusy, MiiCmdPhyCsrDiv128, MiiCmdPhyCsrShift, MiiCmdPhyRegMask, MiiCmdPhyRegShift, MiiData, ARMIO::read(), and ARMIO::write().

Referenced by configPhy(), and resetPhy().

◆ miiWrite()

void Sun8iEmac::miiWrite ( const u8  phyAddr,
const u8  regAddr,
const u32  data 
)
private

Write a Media-Independent-Interface (MII) register on the PHY.

Parameters
phyAddrAddress of the PHY on the MDIO bus
regAddrMII-register to write
dataValue for the register

Definition at line 390 of file Sun8iEmac.cpp.

References DEBUG, m_io, miiBusyWait(), MiiCmd, MiiCmdPhyAddrMask, MiiCmdPhyAddrShift, MiiCmdPhyBusy, MiiCmdPhyCsrDiv128, MiiCmdPhyCsrShift, MiiCmdPhyRegMask, MiiCmdPhyRegShift, MiiCmdPhyWrite, MiiData, and ARMIO::write().

Referenced by configPhy(), and resetPhy().

◆ printRx()

void Sun8iEmac::printRx ( )
private

◆ printTx()

void Sun8iEmac::printTx ( )
private

Print diagnostic information about the transmit queue (TX)

Definition at line 164 of file Sun8iEmac.cpp.

References DEBUG, m_io, m_transmitDesc, m_transmitDescRange, m_transmitIndex, Memory::Range::phys, ARMIO::read(), Sun8iEmac::FrameDescriptor::status, TransmitCurDesc, and TransmitStatus.

Referenced by interrupt(), and startDMA().

◆ receive()

FileSystem::Result Sun8iEmac::receive ( )
private

◆ reset()

FileSystem::Result Sun8iEmac::reset ( )
private

◆ resetPhy()

FileSystem::Result Sun8iEmac::resetPhy ( )
private

◆ resetReceive()

FileSystem::Result Sun8iEmac::resetReceive ( )
private

◆ resetTransmit()

FileSystem::Result Sun8iEmac::resetTransmit ( )
private

◆ setAddress()

FileSystem::Result Sun8iEmac::setAddress ( const Ethernet::Address address)
virtual

Set ethernet address.

Parameters
addressNew ethernet address to set
Returns
Result code

Implements NetworkDevice.

Definition at line 133 of file Sun8iEmac.cpp.

References Ethernet::Address::addr, AddrHigh, AddrLow, DEBUG, m_io, FileSystem::Success, and ARMIO::write().

Referenced by reset().

◆ startDMA()

FileSystem::Result Sun8iEmac::startDMA ( )
virtual

◆ transmit()

FileSystem::Result Sun8iEmac::transmit ( NetworkQueue::Packet pkt)
virtual

Add a network packet to the transmit queue.

Parameters
pktNetwork packet buffer
Returns
Result code

Implements NetworkDevice.

Definition at line 214 of file Sun8iEmac.cpp.

References Queue< T, N >::count(), DEBUG, ERROR, FileSystem::IOError, m_transmitPending, NetworkQueue::MaxPackets, Queue< T, N >::push(), NetworkQueue::Packet::size, and FileSystem::Success.

Field Documentation

◆ InterruptNumber

const Size Sun8iEmac::InterruptNumber = 114
static

Interrupt number for this device on a sun8i family SoC.

Definition at line 46 of file Sun8iEmac.h.

Referenced by initialize(), interrupt(), and main().

◆ m_ccu

SunxiClockControl Sun8iEmac::m_ccu
private

Clock Control Unit.

Definition at line 411 of file Sun8iEmac.h.

Referenced by initialize(), and resetPhy().

◆ m_io

Arch::IO Sun8iEmac::m_io
private

◆ m_receiveDesc

Index<FrameDescriptor, NetworkQueue::MaxPackets> Sun8iEmac::m_receiveDesc
private

List of pointers to receive descriptors.

Definition at line 420 of file Sun8iEmac.h.

Referenced by printRx(), receive(), and resetReceive().

◆ m_receiveDescRange

Memory::Range Sun8iEmac::m_receiveDescRange
private

Memory range for receive descriptors.

Definition at line 417 of file Sun8iEmac.h.

Referenced by initialize(), printRx(), and resetReceive().

◆ m_receiveIndex

Size Sun8iEmac::m_receiveIndex
private

Current receive packet index.

Definition at line 426 of file Sun8iEmac.h.

Referenced by printRx(), receive(), and resetReceive().

◆ m_receivePackets

Index<NetworkQueue::Packet, NetworkQueue::MaxPackets> Sun8iEmac::m_receivePackets
private

List of pointers to receive packets.

Definition at line 423 of file Sun8iEmac.h.

Referenced by receive(), and resetReceive().

◆ m_syscon

SunxiSystemControl Sun8iEmac::m_syscon
private

System Control Unit.

Definition at line 414 of file Sun8iEmac.h.

Referenced by initialize(), and resetPhy().

◆ m_transmitDesc

Index<FrameDescriptor, NetworkQueue::MaxPackets> Sun8iEmac::m_transmitDesc
private

List of pointers to transmit descriptors.

Definition at line 432 of file Sun8iEmac.h.

Referenced by printTx(), resetTransmit(), and startDMA().

◆ m_transmitDescRange

Memory::Range Sun8iEmac::m_transmitDescRange
private

Memory range for transmit descriptors.

Definition at line 429 of file Sun8iEmac.h.

Referenced by initialize(), printTx(), and resetTransmit().

◆ m_transmitIndex

Size Sun8iEmac::m_transmitIndex
private

Current transmit packet index.

Definition at line 441 of file Sun8iEmac.h.

Referenced by printTx(), resetTransmit(), and startDMA().

◆ m_transmitPackets

Queue<NetworkQueue::Packet *, NetworkQueue::MaxPackets> Sun8iEmac::m_transmitPackets
private

List of pointers to packets that the driver has submitted for transmission.

Definition at line 438 of file Sun8iEmac.h.

Referenced by interrupt(), and startDMA().

◆ m_transmitPending

Queue<NetworkQueue::Packet *, NetworkQueue::MaxPackets> Sun8iEmac::m_transmitPending
private

List of pointers to packets pending transmission.

Definition at line 435 of file Sun8iEmac.h.

Referenced by startDMA(), and transmit().

◆ MaximumMiiPoll

const Size Sun8iEmac::MaximumMiiPoll = 100000
staticprivate

Maximum number of polling reads for MII-busy flag.

Definition at line 57 of file Sun8iEmac.h.

Referenced by configPhy(), miiBusyWait(), and resetPhy().

◆ MaximumResetPoll

const Size Sun8iEmac::MaximumResetPoll = 100000
staticprivate

Maximum number of polling reset iterations.

Definition at line 60 of file Sun8iEmac.h.

Referenced by reset().

◆ MemoryAddress

const Address Sun8iEmac::MemoryAddress = 0x01c30000
staticprivate

Physical memory address of the device memory mapped registers.

Definition at line 51 of file Sun8iEmac.h.

Referenced by initialize().

◆ PhyMdioAddress

const u8 Sun8iEmac::PhyMdioAddress = 0x1
staticprivate

Fixed address of the PHY on the MDIO bus.

Definition at line 54 of file Sun8iEmac.h.

Referenced by configPhy(), and resetPhy().


The documentation for this class was generated from the following files: