Difference between revisions of "Unit GENET"
Line 280: | Line 280: | ||
</div></div> | </div></div> | ||
<br /> | <br /> | ||
− | + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | |
<pre style="border: 0; padding-bottom:0px;">procedure GENETUMACReset(Network:PGENETNetwork);</pre> | <pre style="border: 0; padding-bottom:0px;">procedure GENETUMACReset(Network:PGENETNetwork);</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> |
Revision as of 07:04, 19 June 2021
Return to Unit Reference
Description
Broadcom GENET Gigabit Ethernet Driver
This driver supports members of the Broadcom family of Gigabit Ethernet devices including the BCM54213PE contained in the Raspberry Pi 4B.
These devices support speeds of 10BASE-T, 100BASE-TX and 1000BASE-T and include a range of features including WOL and EEE.
The device included in the Raspberry Pi 4B uses a memory mapped interface which supports multiple TX and RX queues with priority queueing, hardware filtering and DMA bus master transfers.
Constants
To be documented
Type definitions
To be documented
Public variables
GENET specific variables
GENET_PHY_MODE:String;
|
GENET_PHY_ADDR:LongWord;
|
GENET_SKIP_UMAC_RESET:Boolean;
|
GENET_NO_PHY_INTERRUPT:Boolean;
|
Function declarations
GENET functions
function GENETNetworkCreate(Address:PtrUInt; MDIOOffset:LongWord; IRQ0,IRQ1:LongWord):PNetworkDevice;
Address | The address of the GENET registers |
---|---|
MDIOOffset | The offset from address of the MDIO registers |
IRQ0 | The interrupt number for interrupt 0 of the GENET |
IRQ1 | The interrupt number for interrupt 1 of the GENET |
Return | Pointer to the new Network device or nil if the Network device could not be created |
function GENETNetworkDestroy(Network:PNetworkDevice):LongWord;
Network | The Network device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
GENET network functions
function GENETNetworkOpen(Network:PNetworkDevice):LongWord;
Note | Not intended to be called directly by applications, use NetworkDeviceOpen instead. |
---|
function GENETNetworkClose(Network:PNetworkDevice):LongWord;
Note | Not intended to be called directly by applications, use NetworkDeviceClose instead. |
---|
function GENETNetworkControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Note | Not intended to be called directly by applications, use NetworkDeviceControl instead. |
---|
function GENETBufferAllocate(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Note | Not intended to be called directly by applications, use NetworkBufferAllocate instead. |
---|
function GENETBufferRelease(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Note | Not intended to be called directly by applications, use NetworkBufferRelease instead |
---|
function GENETBufferReceive(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Note | Not intended to be called directly by applications, use NetworkBufferReceive instead. |
---|
function GENETBufferTransmit(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Note | Not intended to be called directly by applications, use NetworkBufferTransmit instead. |
---|
GENET helper functions
function GENETGetHardwareParameters(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
function GENETGetMACAddress(Network:PGENETNetwork; Address:PHardwareAddress):LongWord;
Address | Pointer to a buffer to return the hardware address |
---|---|
Network | The GENET Network device to get from |
Return | ERROR_SUCCESS if completed or another error code on failure |
Note | Caller must hold the network lock |
function GENETSetMACAddress(Network:PGENETNetwork; Address:PHardwareAddress):LongWord;
Address | Pointer to the hardware address to set |
---|---|
Network | The GENET Network device to set for |
Return | ERROR_SUCCESS if completed or another error code on failure |
Note | Caller must hold the network lock |
procedure GENETPowerUp(Network:PGENETNetwork; Mode:LongWord);
Note | Caller must hold the network lock |
---|
function GENETPowerDown(Network:PGENETNetwork; Mode:LongWord):LongWord;
Note | Caller must hold the network lock |
---|
procedure GENETResetUMAC(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
procedure GENETUMACReset(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
procedure GENETInitUMAC(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
function GENETInitializeDMA(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
function GENETFinalizeDMA(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
function GENETShutdownDMA(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
function GENETDisableDMA(Network:PGENETNetwork; FlushRX:Boolean):LongWord;
Note | Caller must hold the network lock |
---|
procedure GENETEnableDMA(Network:PGENETNetwork; DMAControl:LongWord);
Note | Caller must hold the network lock |
---|
function GENETInitRXQueues(Network:PGENETNetwork):LongWord;
Note | Queues 0-15 are priority queues. Hardware Filtering Block (HFB) can be used to direct traffic to these queues. Queue 16 is the default RX queue with Q16RXDescriptorCount descriptors.
Caller must hold the network lock |
---|
procedure GENETInitTXQueues(Network:PGENETNetwork);
Note | Queues 0-3 are priority-based, each one has 32 descriptors, with queue 0 being the highest priority queue. Queue 16 is the default TX queue with Q16TXDescriptorCount = 256 - 4 * 32 = 128 descriptors. The transmit control block pool is then partitioned as follows: TX queue 0 uses TXControlBlocks[0..31] TX queue 1 uses TXControlBlocks[32..63] TX queue 2 uses TXControlBlocks[64..95] TX queue 3 uses TXControlBlocks[96..127] TX queue 16 uses TXControlBlocks[128..255]
Caller must hold the network lock |
---|
function GENETInitRXRing(Network:PGENETNetwork; Index,Size,First,Last:LongWord):LongWord;
Note | Caller must hold the network lock |
---|
procedure GENETInitTXRing(Network:PGENETNetwork; Index,Size,First,Last:LongWord);
Note | Caller must hold the network lock |
---|
function GENETAllocRXBuffers(Network:PGENETNetwork; Ring:PGENETRXRing):LongWord;
Note | Caller must hold the network lock |
---|
procedure GENETFreeRXBuffers(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
procedure GENETHFBInit(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
procedure GENETHFBClear(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
procedure GENETInterfaceStart(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
procedure GENETInterfaceStop(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
function GENETMIIProbe(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
procedure GENETMIISetup(Network:PGENETNetwork);
Note | Caller must hold the network lock |
---|
function GENETMIIConfig(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
function GENETMIIWait(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
function GENETPhyReadStatus(Network:PGENETNetwork):LongWord;
Note | Caller must hold the network lock |
---|
UniMAC helper functions
procedure UniMACMDIOStart(Network:PGENETNetwork);
Note | None documented |
---|
function UniMACMDIOBusy(Network:PGENETNetwork):LongWord;
Note | None documented |
---|
function UniMACMDIOPoll(Network:PGENETNetwork):LongWord;
Note | None documented |
---|
function UniMACMDIORead(Network:PGENETNetwork; Reg:LongWord; var Value:Word):LongWord;
Note | None documented |
---|
function UniMACMDIOWrite(Network:PGENETNetwork; Reg:LongWord; Value:Word):LongWord;
Note | None documented |
---|
function UniMACMDIOReset(Network:PGENETNetwork):LongWord;
Note | None documented |
---|
Return to Unit Reference