Unit GENET

From Ultibo.org
Revision as of 07:04, 19 June 2021 by Ultibo (Talk | contribs)

Jump to: navigation, search

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

[Expand]
function GENETNetworkCreate(Address:PtrUInt; MDIOOffset:LongWord; IRQ0,IRQ1:LongWord):PNetworkDevice;
Description: Create and register a new GENET Network device which can be accessed using the Network API


[Expand]
function GENETNetworkDestroy(Network:PNetworkDevice):LongWord;
Description: Close, deregister and destroy a GENET Network device created by this driver


GENET network functions

[Expand]
function GENETNetworkOpen(Network:PNetworkDevice):LongWord;
Description: Implementation of NetworkDeviceOpen API for GENET Network


[Expand]
function GENETNetworkClose(Network:PNetworkDevice):LongWord;
Description: Implementation of NetworkDeviceClose API for GENET Network


[Expand]
function GENETNetworkControl(Network:PNetworkDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Description: Implementation of NetworkDeviceControl API for GENET Network


[Expand]
function GENETBufferAllocate(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferAllocate API for GENET Network


[Expand]
function GENETBufferRelease(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferRelease API for GENET Network


[Expand]
function GENETBufferReceive(Network:PNetworkDevice; var Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferReceive API for GENET Network


[Expand]
function GENETBufferTransmit(Network:PNetworkDevice; Entry:PNetworkEntry):LongWord;
Description: Implementation of NetworkBufferTransmit API for GENET Network


GENET helper functions

[Expand]
function GENETGetHardwareParameters(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function GENETGetMACAddress(Network:PGENETNetwork; Address:PHardwareAddress):LongWord;
Description: Get the current MAC address from a GENET Network device


[Expand]
function GENETSetMACAddress(Network:PGENETNetwork; Address:PHardwareAddress):LongWord;
Description: Set the current MAC address for a GENET Network device


[Expand]
procedure GENETPowerUp(Network:PGENETNetwork; Mode:LongWord);
Description: To be documented


[Expand]
function GENETPowerDown(Network:PGENETNetwork; Mode:LongWord):LongWord;
Description: Power down the unimac, based on mode


[Expand]
procedure GENETResetUMAC(Network:PGENETNetwork);
Description: To be documented


[Expand]
procedure GENETUMACReset(Network:PGENETNetwork);
Description: To be documented


[Expand]
procedure GENETInitUMAC(Network:PGENETNetwork);
Description: To be documented


[Expand]
function GENETInitializeDMA(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function GENETFinalizeDMA(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function GENETShutdownDMA(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function GENETDisableDMA(Network:PGENETNetwork; FlushRX:Boolean):LongWord;
Description: Returns a reusable DMA control register value


[Expand]
procedure GENETEnableDMA(Network:PGENETNetwork; DMAControl:LongWord);
Description: To be documented


[Expand]
function GENETInitRXQueues(Network:PGENETNetwork):LongWord;
Description: Initialize RX queues


[Expand]
procedure GENETInitTXQueues(Network:PGENETNetwork);
Description: Initialize TX queues


[Expand]
function GENETInitRXRing(Network:PGENETNetwork; Index,Size,First,Last:LongWord):LongWord;
Description: Initialize an RX DMA ring


[Expand]
procedure GENETInitTXRing(Network:PGENETNetwork; Index,Size,First,Last:LongWord);
Description: Initialize a TX DMA ring along with corresponding hardware registers


[Expand]
function GENETAllocRXBuffers(Network:PGENETNetwork; Ring:PGENETRXRing):LongWord;
Description: Assign buffer to RX DMA descriptor


[Expand]
procedure GENETFreeRXBuffers(Network:PGENETNetwork);
Description: To be documented


[Expand]
procedure GENETHFBInit(Network:PGENETNetwork);
Description: To be documented


[Expand]
procedure GENETHFBClear(Network:PGENETNetwork);
Description: Clear Hardware Filter Block and disable all filtering


[Expand]
procedure GENETInterfaceStart(Network:PGENETNetwork);
Description: To be documented


[Expand]
procedure GENETInterfaceStop(Network:PGENETNetwork);
Description: To be documented


[Expand]
function GENETMIIProbe(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
procedure GENETMIISetup(Network:PGENETNetwork);
Description: Setup netdev link state when PHY link status change and update UMAC and RGMII block when link up


[Expand]
function GENETMIIConfig(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function GENETMIIWait(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function GENETPhyReadStatus(Network:PGENETNetwork):LongWord;
Description: Check the link status and update current link state


UniMAC helper functions

[Expand]
procedure UniMACMDIOStart(Network:PGENETNetwork);
Description: To be documented


[Expand]
function UniMACMDIOBusy(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function UniMACMDIOPoll(Network:PGENETNetwork):LongWord;
Description: To be documented


[Expand]
function UniMACMDIORead(Network:PGENETNetwork; Reg:LongWord; var Value:Word):LongWord;
Description: To be documented


[Expand]
function UniMACMDIOWrite(Network:PGENETNetwork; Reg:LongWord; Value:Word):LongWord;
Description: To be documented


[Expand]
function UniMACMDIOReset(Network:PGENETNetwork):LongWord;
Description: To be documented


Return to Unit Reference