Difference between revisions of "Unit GENET"

From Ultibo.org
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
'''Broadcom GENET Gigabit Ethernet Driver'''
+
'''Broadcom GENET Gigabit Ethernet Driver unit'''
  
 
This driver supports members of the Broadcom family of Gigabit Ethernet devices including the BCM54213PE contained in the Raspberry Pi 4B.
 
This driver supports members of the Broadcom family of Gigabit Ethernet devices including the BCM54213PE contained in the Raspberry Pi 4B.
Line 16: Line 16:
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''GENET specific constants''' <code> GENET_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Broadcom Gigabit Ethernet controller
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_NETWORK_DESCRIPTION = 'Broadcom GENET (Gigabit Ethernet) controller';</code>
 +
| style="width: 50%;"|Description of GENET device
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_MAX_TX_ENTRIES = SIZE_256;</code>
 +
| Number of Transmit buffers allocated
 +
|-
 +
| <code>GENET_MAX_RX_ENTRIES = SIZE_512;</code>
 +
| Number of Receive buffers allocated
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_MAX_PACKET_SIZE = 2048;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_V1 = 1;</code>
 +
| Version information
 +
|-
 +
| <code>GENET_V2 = 2;</code>
 +
| Version information
 +
|-
 +
| <code>GENET_V3 = 3;</code>
 +
| Version information
 +
|-
 +
| <code>GENET_V4 = 4;</code>
 +
| Version information
 +
|-
 +
| <code>GENET_V5 = 5;</code>
 +
| Version information
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_TOTAL_DESC = 256</code>
 +
| Total number of Buffer Descriptors, same for RX/TX
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_DESC_INDEX = 16;</code>
 +
| Max number of descriptor queues (plus 1 for default)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_ETH_BRCM_TAG_LEN = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_ETH_PAD = 8;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|<code>GENET_ETH_MAX_MTU_SIZE = (ETHERNET_MTU + ETHERNET_HEADER_SIZE + ETHERNET_VLAN_SIZE + GENET_ETH_BRCM_TAG_LEN + ETHERNET_CRC_SIZE + GENET_ETH_PAD);</code>
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>GENET_Q0_PRIORITY = 0;</code>
 +
| Default highest priority queue for multi queue support
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>CLEAR_ALL_HFB = $FF;</code>
 +
| Misc configuration
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA configuration''' <code> DMA_MAX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_MAX_BURST_LENGTH = $08;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_FC_THRESH_HI = (GENET_TOTAL_DESC shr 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_FC_THRESH_LO = 5;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RX status bits''' <code> STATUS_RX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>STATUS_RX_EXT_MASK = $1FFFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>STATUS_RX_CSUM_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_CSUM_OK = $10000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_CSUM_FR = $20000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_PROTO_TCP = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_PROTO_UDP = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_PROTO_ICMP = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_PROTO_OTHER = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_PROTO_MASK = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_RX_PROTO_SHIFT = 18;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_FILTER_INDEX_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''TX status bits''' <code> STATUS_TX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>STATUS_TX_CSUM_START_MASK = $7FFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>STATUS_TX_CSUM_START_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_TX_CSUM_PROTO_UDP = $8000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_TX_CSUM_OFFSET_MASK = $7FFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>STATUS_TX_CSUM_LV = $80000000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA descriptor''' <code> DMA_DESC_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_DESC_LENGTH_STATUS = $00;</code>
 +
| style="width: 50%;"|In bytes of data in buffer
 +
|-
 +
| <code>DMA_DESC_ADDRESS_LO = $04;</code>
 +
| Lower bits of PA
 +
|-
 +
| <code>DMA_DESC_ADDRESS_HI = $08;</code>
 +
| Upper 32 bits of PA, GENETv4+
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''UniMAC registers''' <code> UMAC_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>UMAC_HD_BKP_CTRL = $004;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HD_FC_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>HD_FC_BKOFF_OK = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPG_CONFIG_RX_SHIFT = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IPG_CONFIG_RX_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_CMD = $008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_TX_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_RX_EN = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_SPEED_10 = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_SPEED_100 = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_SPEED_1000 = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_SPEED_2500 = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_SPEED_SHIFT = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_SPEED_MASK = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_PROMISC = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_PAD_EN = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_CRC_FWD = (1 shl 6);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_PAUSE_FWD = (1 shl 7);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_RX_PAUSE_IGNORE = (1 shl 8);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_TX_ADDR_INS = (1 shl 9);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_HD_EN = (1 shl 10);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_SW_RESET = (1 shl 13);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_LCL_LOOP_EN = (1 shl 15);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_AUTO_CONFIG = (1 shl 22);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_CNTL_FRM_EN = (1 shl 23);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_NO_LEN_CHK = (1 shl 24);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_RMT_LOOP_EN = (1 shl 25);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_PRBL_EN = (1 shl 27);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_TX_PAUSE_IGNORE = (1 shl 28);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_TX_RX_EN = (1 shl 29);</code>
 +
| &nbsp;
 +
|-
 +
| <code>CMD_RUNT_FILTER_DIS = (1 shl 30);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_MAC0 = $00C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MAC1 = $010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MAX_FRAME_LEN = $014;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_MODE  = $44;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MODE_LINK_STATUS = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_EEE_CTRL = $064;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EN_LPI_RX_PAUSE = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EN_LPI_TX_PFC = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EN_LPI_TX_PAUSE = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EEE_EN = (1 shl 3);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RX_FIFO_CHECK = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EEE_TX_CLK_DIS = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
| <code>DIS_EEE_10M = (1 shl 6);</code>
 +
| &nbsp;
 +
|-
 +
| <code>LP_IDLE_PREDICTION_MODE = (1 shl 7);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_EEE_LPI_TIMER = $068;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_EEE_WAKE_TIMER = $06C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_EEE_REF_COUNT = $070;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EEE_REFERENCE_COUNT_MASK = $ffff;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_TX_FLUSH = $334;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_MIB_START = $400;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_MDIO_CMD = $614;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_START_BUSY = (1 shl 29);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_READ_FAIL = (1 shl 28);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_RD = (2 shl 26);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_WR = (1 shl 26);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_PMD_SHIFT = 21;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_PMD_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_REG_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_REG_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_RBUF_OVFL_CNT_V1 = $61C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_OVFL_CNT_V2 = $80;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_OVFL_CNT_V3PLUS = $94;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_MPD_CTRL = $620;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MPD_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MPD_PW_EN = (1 shl 27);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MPD_MSEQ_LEN_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MPD_MSEQ_LEN_MASK = $FF;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>UMAC_MPD_PW_MS = $624;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MPD_PW_LS = $628;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_RBUF_ERR_CNT_V1 = $634;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_ERR_CNT_V2 = $84;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_ERR_CNT_V3PLUS = $98;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MDF_ERR_CNT = $638;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MDF_CTRL = $650;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MDF_ADDR = $654;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_MIB_CTRL = $580;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MIB_RESET_RX = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MIB_RESET_RUNT = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MIB_RESET_TX = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
 
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Receive buffer registers''' <code> RBUF_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RBUF_CTRL = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RBUF_64B_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_ALIGN_2B = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_BAD_DIS = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RBUF_STATUS = $0C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_STATUS_WOL = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_STATUS_MPD_INTR_ACTIVE = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_STATUS_ACPI_INTR_ACTIVE = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RBUF_CHK_CTRL = $14;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_RXCHK_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_SKIP_FCS = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RBUF_ENERGY_CTRL = $9c;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_EEE_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_PM_EN = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RBUF_TBUF_SIZE_CTRL = $b4;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Hardware filter block (HFB)''' <code> RBUF_HFB_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>RBUF_HFB_CTRL_V1 = $38;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RBUF_HFB_FILTER_EN_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_HFB_FILTER_EN_MASK = $ffff0000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_HFB_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_HFB_256B = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_ACPI_EN = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>RBUF_HFB_LEN_V1 = $3C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_FLTR_LEN_MASK = $FF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_FLTR_LEN_SHIFT = 8;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Transmit buffer registers''' <code> TBUF_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TBUF_CTRL = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TBUF_BP_MC = $0C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TBUF_ENERGY_CTRL = $14;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TBUF_EEE_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>TBUF_PM_EN = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TBUF_CTRL_V1 = $80;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TBUF_BP_MC_V1 = $A0;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Hardware filter block (HFB) registers''' <code> HFB_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>HFB_CTRL = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>HFB_FLT_ENABLE_V3PLUS = $04;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HFB_FLT_LEN_V2 = $04;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HFB_FLT_LEN_V3PLUS = $1C;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''UniMAC INTRL2 registers''' <code> INTRL2_CPU_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>INTRL2_CPU_STAT = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>INTRL2_CPU_SET = $04;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INTRL2_CPU_CLEAR = $08;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INTRL2_CPU_MASK_STATUS = $0C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INTRL2_CPU_MASK_SET = $10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>INTRL2_CPU_MASK_CLEAR = $14;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''UniMAC INTRL2 IRQ0 definitions''' <code> UMAC_IRQ0_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>UMAC_IRQ0_SCB = (1 shl 0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_EPHY = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_PHY_DET_R = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_PHY_DET_F = (1 shl 3);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_LINK_UP = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_LINK_DOWN = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_LINK_EVENT = (UMAC_IRQ0_LINK_UP or UMAC_IRQ0_LINK_DOWN);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_UMAC = (1 shl 6);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_UMAC_TSV = (1 shl 7);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_TBUF_UNDERRUN = (1 shl 8);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_RBUF_OVERFLOW = (1 shl 9);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_HFB_SM = (1 shl 10);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_HFB_MM = (1 shl 11);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_MPD_R = (1 shl 12);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_RXDMA_MBDONE = (1 shl 13);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_RXDMA_PDONE = (1 shl 14);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_RXDMA_BDONE = (1 shl 15);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_RXDMA_DONE = UMAC_IRQ0_RXDMA_MBDONE;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_TXDMA_MBDONE = (1 shl 16);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_TXDMA_PDONE = (1 shl 17);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_TXDMA_BDONE = (1 shl 18);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_TXDMA_DONE = UMAC_IRQ0_TXDMA_MBDONE;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|Only valid for GENETv3+
 +
|-
 +
| <code>UMAC_IRQ0_MDIO_DONE = (1 shl 23);</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ0_MDIO_ERROR = (1 shl 24);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''UniMAC INTRL2 IRQ1 definitions''' <code> UMAC_IRQ1_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>UMAC_IRQ1_TX_INTR_MASK = $FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>UMAC_IRQ1_RX_INTR_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>UMAC_IRQ1_RX_INTR_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''GENET register block offsets''' <code> GENET_*_OFF </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>GENET_SYS_OFF = $0000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>GENET_GR_BRIDGE_OFF = $0040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_EXT_OFF = $0080;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_INTRL2_0_OFF = $0200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_INTRL2_1_OFF = $0240;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_RBUF_OFF = $0300;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_UMAC_OFF = $0800;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''SYS block offsets and register definitions''' <code> SYS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SYS_REV_CTRL = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>SYS_PORT_CTRL = $04;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PORT_MODE_INT_EPHY = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PORT_MODE_INT_GPHY = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PORT_MODE_EXT_EPHY = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PORT_MODE_EXT_GPHY = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PORT_MODE_EXT_RVMII_25 = (4 or (1 shl 4));</code>
 +
| &nbsp;
 +
|-
 +
| <code>PORT_MODE_EXT_RVMII_50 = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>LED_ACT_SOURCE_MAC = (1 shl 9);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>SYS_RBUF_FLUSH_CTRL = $08;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SYS_TBUF_FLUSH_CTRL = $0C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RBUF_FLUSH_CTRL_V1 = $04;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Ext block register offsets and definitions''' <code> EXT_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>EXT_EXT_PWR_MGMT = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_BIAS = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_DLL = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_PHY = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DN_EN_LD = (1 shl 3);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_ENERGY_DET = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_IDDQ_FROM_PHY = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_IDDQ_GLBL_PWR = (1 shl 7);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PHY_RESET = (1 shl 8);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_ENERGY_DET_MASK = (1 shl 12);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_PHY_TX = (1 shl 16);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_PHY_RX = (1 shl 17);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_PHY_SD = (1 shl 18);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_PHY_RD = (1 shl 19);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_PWR_DOWN_PHY_EN = (1 shl 20);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>EXT_RGMII_OOB_CTRL = $0C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RGMII_MODE_EN_V123 = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RGMII_LINK = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>OOB_DISABLE = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
| <code>RGMII_MODE_EN = (1 shl 6);</code>
 +
| &nbsp;
 +
|-
 +
| <code>ID_MODE_DIS = (1 shl 16);</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>EXT_GPHY_CTRL = $1C;</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_CFG_IDDQ_BIAS = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_CFG_PWR_DOWN = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_CK25_DIS = (1 shl 4);</code>
 +
| &nbsp;
 +
|-
 +
| <code>EXT_GPHY_RESET = (1 shl 5);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA rings size''' <code> DMA_RING_SIZE* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_RING_SIZE = $40;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_RINGS_SIZE = (DMA_RING_SIZE * (GENET_DESC_INDEX + 1));</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA registers common definitions''' <code> DMA_RW_POINTER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_RW_POINTER_MASK = $1FF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_P_INDEX_DISCARD_CNT_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_P_INDEX_DISCARD_CNT_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_BUFFER_DONE_CNT_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_BUFFER_DONE_CNT_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_P_INDEX_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_C_INDEX_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA ring size register''' <code> DMA_RING_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_RING_SIZE_MASK = $FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_RING_SIZE_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING_BUFFER_SIZE_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA interrupt threshold register''' <code> DMA_INTR_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_INTR_THRESHOLD_MASK = $01FF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA XON/XOFF register''' <code> DMA_XON_THREHOLD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_XON_THREHOLD_MASK = $FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_XOFF_THRESHOLD_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_XOFF_THRESHOLD_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA flow period register''' <code> DMA_FLOW_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_FLOW_PERIOD_MASK = $FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_MAX_PKT_SIZE_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_MAX_PKT_SIZE_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA control register''' <code> DMA_EN_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_EN = (1 shl 0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_RING_BUF_EN_SHIFT = $01;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING_BUF_EN_MASK = $FFFF;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_TSB_SWAP_EN = (1 shl 20);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA status register''' <code> DMA_DESC_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_DISABLED = (1 shl 0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_DESC_RAM_INIT_BUSY = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA SCB burst size register''' <code> DMA_SCB_BURST_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_SCB_BURST_SIZE_MASK = $1F;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA activity vector register''' <code> DMA_ACTIVITY_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_ACTIVITY_VECTOR_MASK = $1FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA backpressure mask register''' <code> DMA_BACKPRESSURE_MASK* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_BACKPRESSURE_MASK = $1FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_PFC_ENABLE = (1 shl 31);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA backpressure status register''' <code> DMA_BACKPRESSURE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_BACKPRESSURE_STATUS_MASK = $1FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA override register''' <code> DMA_*_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_LITTLE_ENDIAN_MODE = (1 shl 0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_REGISTER_MODE = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''DMA timeout register''' <code> DMA_TIMEOUT_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_TIMEOUT_MASK = $FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_TIMEOUT_VAL = 5000;</code>
 +
| Micro seconds
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''TDMA rate limiting control register''' <code> DMA_RATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_RATE_LIMIT_EN_MASK = $FFFF;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''TDMA arbitration control register''' <code> DMA_ARBITER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_ARBITER_MODE_MASK = $03;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_RING_BUF_PRIORITY_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING_BUF_PRIORITY_SHIFT = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RATE_ADJ_MASK = $FF;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''TX/RX DMA descriptor common bits''' <code> DMA_BUFLENGTH_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_BUFLENGTH_MASK = $0fff;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_BUFLENGTH_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_OWN = $8000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_EOP = $4000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_SOP = $2000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_WRAP = $1000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''TX specific DMA descriptor bits''' <code> DMA_TX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_TX_UNDERRUN = $0200;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_TX_APPEND_CRC = $0040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_TX_OW_CRC = $0020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_TX_DO_CSUM = $0010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_TX_QTAG_SHIFT = 7;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RX specific DMA descriptor bits''' <code> DMA_RX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_RX_CHK_V3PLUS = $8000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_RX_CHK_V12 = $1000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_BRDCAST = $0040;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_MULT = $0020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_LG = $0010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_NO = $0008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_RXER = $0004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_CRC_ERROR = $0002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_OV = $0001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_FI_MASK = $001F;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RX_FI_SHIFT = $0007;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_DESC_ALLOC_MASK = $00FF;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
 
 +
| <code>DMA_ARBITER_RR = $00;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_ARBITER_WRR = $01;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_ARBITER_SP = $02;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''GENET power management mode''' <code> GENET_POWER_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>GENET_POWER_CABLE_SENSE = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>GENET_POWER_PASSIVE = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_POWER_WOL_MAGIC = 2;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''GENET hardware flags''' <code> GENET_HAS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>GENET_HAS_40BITS = (1 shl 0);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>GENET_HAS_EXT= (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_HAS_MDIO_INTR = (1 shl 2);</code>
 +
| &nbsp;
 +
|-
 +
| <code>GENET_HAS_MOCA_LINK_DET = (1 shl 3);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RX/TX DMA registers''' <code> DMA_CTRL* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>DMA_RING_CFG = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>DMA_CTRL = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_STATUS = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_SCB_BURST_SIZE = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_ARB_CTRL = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_PRIORITY_0 = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_PRIORITY_1 = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_PRIORITY_2 = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_0 = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_1 = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_2 = 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_3 = 11;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_4 = 12;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_5 = 13;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_6 = 14;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_INDEX2RING_7 = 15;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING0_TIMEOUT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING1_TIMEOUT = 17;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING2_TIMEOUT = 18;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING3_TIMEOUT = 19;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING4_TIMEOUT = 20;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING5_TIMEOUT = 21;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING6_TIMEOUT = 22;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING7_TIMEOUT = 23;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING8_TIMEOUT = 24;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING9_TIMEOUT = 25;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING10_TIMEOUT = 26;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING11_TIMEOUT = 27;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING12_TIMEOUT = 28;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING13_TIMEOUT = 29;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING14_TIMEOUT = 30;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING15_TIMEOUT = 31;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING16_TIMEOUT = 32;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''RDMA/TDMA ring registers''' <code> TDMA_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Merge the common fields and just prefix with T/D the registers having different meaning depending on the direction
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TDMA_READ_PTR = 0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>RDMA_WRITE_PTR = TDMA_READ_PTR;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TDMA_READ_PTR_HI = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RDMA_WRITE_PTR_HI = TDMA_READ_PTR_HI;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TDMA_CONS_INDEX = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RDMA_PROD_INDEX = TDMA_CONS_INDEX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TDMA_PROD_INDEX = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RDMA_CONS_INDEX = TDMA_PROD_INDEX;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_RING_BUF_SIZE = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_START_ADDR = 5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_START_ADDR_HI = 6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_END_ADDR = 7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_END_ADDR_HI = 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMA_MBUF_DONE_THRESH = 9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TDMA_FLOW_PERIOD = 10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RDMA_XON_XOFF_THRESH = TDMA_FLOW_PERIOD;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TDMA_WRITE_PTR = 11;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RDMA_READ_PTR = TDMA_WRITE_PTR;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TDMA_WRITE_PTR_HI = 12;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RDMA_READ_PTR_HI = TDMA_WRITE_PTR_HI;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''UniMAC specific constants''' <code> MDIO_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Broadcom UniMAC MDIO bus controller
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MDIO_CMD = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|See UMAC_MDIO_CMD
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MDIO_START_BUSY = (1 shl 29);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_READ_FAIL = (1 shl 28);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_RD = (2 shl 26);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_WR = (1 shl 26);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_PMD_SHIFT = 21;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_PMD_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_REG_SHIFT = 16;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_REG_MASK = $1F;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MDIO_CFG = $04;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_C22 = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_C45 = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_CLK_DIV_SHIFT = 4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_CLK_DIV_MASK = $3F;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MDIO_SUPP_PREAMBLE = (1 shl 12);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Broadcom PHY ID''' <code> PHY_ID_BCM* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PHY_ID_BCM50610 = $0143bd60;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PHY_ID_BCM50610M = $0143bd70;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5241 = $0143bc30;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCMAC131 = $0143bc70;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5481 = $0143bca0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5395 = $0143bcf0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM54810 = $03625d00;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5482 = $0143bcb0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5411 = $00206070;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5421 = $002060e0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM54210E = $600d84a0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5464 = $002060b0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM5461 = $002060c0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM54612E = $03625e60;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM54616S = $03625d10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM57780 = $03625d90;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM89610 = $03625cd0;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7250 = $ae025280;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7255 = $ae025120;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7260 = $ae025190;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7268 = $ae025090;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7271 = $ae0253b0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7278 = $ae0251a0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7364 = $ae025260;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7366 = $600d8490;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7346 = $600d8650;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7362 = $600d84b0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7425 = $600d86b0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7429 = $600d8730;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7435 = $600d8750;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM74371 = $ae0252e0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7439 = $600d8480;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7439_2 = $ae025080;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM7445 = $600d8510;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PHY_ID_BCM_CYGNUS = $ae025200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_ID_BCM_OMEGA = $ae025100;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>PHY_ID_MASK = $fffffff0;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Broadcom PHY flags''' <code> PHY_BCM_FLAGS_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>PHY_BCM_FLAGS_MODE_COPPER = $00000001;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>PHY_BCM_FLAGS_MODE_1000BX = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BCM_FLAGS_INTF_SGMII = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BCM_FLAGS_INTF_XAUI = $00000020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_WIRESPEED_ENABLE = $00000100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_AUTO_PWRDWN_ENABLE = $00000200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_RX_REFCLK_UNUSED = $00000400;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_STD_IBND_DISABLE = $00000800;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_EXT_IBND_RX_ENABLE = $00001000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_EXT_IBND_TX_ENABLE = $00002000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_CLEAR_RGMII_MODE = $00004000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_DIS_TXCRXC_NOENRGY = $00008000;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PHY_BRCM_EN_MASTER_MODE = $00010000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Broadcom BCM54XX register definitions ''' <code> MII_BCM54XX_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Common to most Broadcom PHYs
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_ECR = $10;</code>
 +
| style="width: 50%;"|BCM54xx extended control register
 +
|-
 +
| <code>MII_BCM54XX_ECR_IM = $1000;</code>
 +
| Interrupt mask
 +
|-
 +
| <code>MII_BCM54XX_ECR_IF = $0800;</code>
 +
| Interrupt force
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_ESR = $11;</code>
 +
| BCM54xx extended status register
 +
|-
 +
| <code>MII_BCM54XX_ESR_IS = $1000;</code>
 +
| Interrupt status
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_DATA = $15;</code>
 +
| Expansion register data
 +
|-
 +
| <code>MII_BCM54XX_EXP_SEL = $17;</code>
 +
| Expansion register select
 +
|-
 +
| <code>MII_BCM54XX_EXP_SEL_SSD = $0e00;</code>
 +
| Secondary SerDes select
 +
|-
 +
| <code>MII_BCM54XX_EXP_SEL_ER = $0f00;</code>
 +
| Expansion register select
 +
|-
 +
| <code>MII_BCM54XX_EXP_SEL_ETC = $0d00;</code>
 +
| Expansion register spare + 2k mem
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUX_CTL = $18;</code>
 +
| Auxiliary control register
 +
|-
 +
| <code>MII_BCM54XX_ISR = $1a;</code>
 +
| BCM54xx interrupt status register
 +
|-
 +
| <code>MII_BCM54XX_IMR = $1b;</code>
 +
| BCM54xx interrupt mask register
 +
|-
 +
| <code>MII_BCM54XX_INT_CRCERR = $0001;</code>
 +
| CRC error
 +
|-
 +
| <code>MII_BCM54XX_INT_LINK = $0002;</code>
 +
| Link status changed
 +
|-
 +
| <code>MII_BCM54XX_INT_SPEED = $0004;</code>
 +
| Link speed change
 +
|-
 +
| <code>MII_BCM54XX_INT_DUPLEX = $0008;</code>
 +
| Duplex mode changed
 +
|-
 +
| <code>MII_BCM54XX_INT_LRS = $0010;</code>
 +
| Local receiver status changed
 +
|-
 +
| <code>MII_BCM54XX_INT_RRS = $0020;</code>
 +
| Remote receiver status changed
 +
|-
 +
| <code>MII_BCM54XX_INT_SSERR = $0040;</code>
 +
| Scrambler synchronization error
 +
|-
 +
| <code>MII_BCM54XX_INT_UHCD = $0080;</code>
 +
| Unsupported HCD negotiated
 +
|-
 +
| <code>MII_BCM54XX_INT_NHCD = $0100;</code>
 +
| No HCD
 +
|-
 +
| <code>MII_BCM54XX_INT_NHCDL = $0200;</code>
 +
| No HCD link
 +
|-
 +
| <code>MII_BCM54XX_INT_ANPR = $0400;</code>
 +
| Auto-negotiation page received
 +
|-
 +
| <code>MII_BCM54XX_INT_LC = $0800;</code>
 +
| All counters below 128
 +
|-
 +
| <code>MII_BCM54XX_INT_HC = $1000;</code>
 +
| Counter above 32768
 +
|-
 +
| <code>MII_BCM54XX_INT_MDIX = $2000;</code>
 +
| MDIX status change
 +
|-
 +
| <code>MII_BCM54XX_INT_PSERR = $4000;</code>
 +
| Pair swap error
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_SHD = $1c;</code>
 +
| 0x1c shadow registers
 +
|-
 +
| <code>MII_BCM54XX_SHD_WRITE = $8000;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Broadcom auxilliary control shadow access registers ''' <code> MII_BCM54XX_AUXCTL_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|PHY REG 0x18
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_SHDWSEL_AUXCTL = $00;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_ACTL_TX_6DB = $0400;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_ACTL_SMDSP_ENA = $0800;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_SHDWSEL_MISC = $07;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN = $0010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN = $0100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_MISC_FORCE_AMDIX = $0200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_MISC_WREN = $8000;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_SHDWSEL_READ_SHIFT = 12;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_AUXCTL_SHDWSEL_MASK = $0007;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Broadcom LED source encodings''' <code> BCM_LED_SRC_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|These are used in BCM5461, BCM5481,BCM5482, and possibly some others.
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_LINKSPD1 = $0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_LINKSPD2 = $1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_XMITLED = $2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_ACTIVITYLED = $3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_FDXLED = $4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_SLAVE = $5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_INTR = $6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_QUALITY = $7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_RCVLED = $8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_WIRESPEED = $9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_MULTICOLOR1 = $a;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_OPENSHORT = $b;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_SRC_OFF = $e;</code>
 +
| Tied high
 +
|-
 +
| <code>BCM_LED_SRC_ON = $f;</code>
 +
| Tied low
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Broadcom multicolor LED configurations (expansion register 4)''' <code> BCM_*_MULTICOLOR* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>BCM_EXP_MULTICOLOR = (MII_BCM54XX_EXP_SEL_ER + $04);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_IN_PHASE = 1 shl 8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_LINK_ACT = $0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_SPEED = $1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_ACT_FLASH = $2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_FDX = $3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_OFF = $4;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_ON = $5;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_ALT = $6;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_FLASH = $7;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_LINK = $8;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_ACT = $9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_LED_MULTICOLOR_PROGRAM = $a;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''BCM5482 shadow registers''' <code> BCM54XX_SHD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Shadow values go into bits [14:10] of register 0x1c to select a shadow register to access
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
|colspan="2"|00100: Reserved control register 2
 +
|-
 +
| <code>BCM54XX_SHD_SCR2 = $04;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR2_WSPD_RTRY_DIS = $100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_SHIFT = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK = $7;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|00101: Spare Control Register 3
 +
|-
 +
| <code>BCM54XX_SHD_SCR3 = $05;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR3_DEF_CLK125 = $0001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR3_DLLAPD_DIS = $0002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54XX_SHD_SCR3_TRDDAPD = $0004;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|01010: Auto Power-Down
 +
|-
 +
| <code>BCM54XX_SHD_APD = $0a;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_APD_CLR_MASK = $FE9F;</code>
 +
| Clear bits 5, 6 & 8
 +
|-
 +
| <code>BCM54XX_SHD_APD_EN = $0020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM_NO_ANEG_APD_EN = $0060;</code>
 +
| Bits 5 & 6
 +
|-
 +
| <code>BCM_APD_SINGLELP_EN = $0100;</code>
 +
| Bit 8
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>BCM5482_SHD_LEDS1 = $0d;</code>
 +
| 01101: LED Selector 1
 +
|-
 +
| <code>BCM54XX_SHD_RGMII_MODE = $0b;</code>
 +
| 01011: RGMII Mode Selector
 +
|-
 +
| <code>BCM5482_SHD_SSD = $14;</code>
 +
| 10100: Secondary SerDes control
 +
|-
 +
| <code>BCM5482_SHD_SSD_LEDM = $0008;</code>
 +
| SSD LED Mode enable
 +
|-
 +
| <code>BCM5482_SHD_SSD_EN = $0001;</code>
 +
| SSD enable
 +
|-
 +
| <code>BCM5482_SHD_MODE = $1f;</code>
 +
| 11111: Mode Control Register
 +
|-
 +
| <code>BCM5482_SHD_MODE_1000BX = $0001;</code>
 +
| Enable 1000BASE-X registers
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Expansion shadow access registers ''' <code> MII_BCM54XX_EXP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|PHY REG 0x15, 0x16, and 0x17
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_AADJ1CH0 = $001f;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_AADJ1CH0_SWP_ABCD_OEN = $0200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_AADJ1CH0_SWSEL_THPF = $0100;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_AADJ1CH3 = $601f;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_AADJ1CH3_ADCCKADJ = $0002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP08 = $0F08;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP08_RJCT_2MHZ = $0001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP08_EARLY_DAC_WAKE = $0200;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP75 = $0f75;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP75_VDACCTRL = $003c;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP75_CM_OSC = $0001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP96 = $0f96;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP96_MYST = $0010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP97 = $0f97;</code>
 +
| &nbsp;
 +
|-
 +
| <code>MII_BCM54XX_EXP_EXP97_MYST = $0c0c;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''BCM5482 secondary SerDes registers''' <code> BCM5482_SSD_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>BCM5482_SSD_1000BX_CTL = $00;</code>
 +
| style="width: 50%;"|1000BASE-X Control
 +
|-
 +
| <code>BCM5482_SSD_1000BX_CTL_PWRDOWN = $0800;</code>
 +
| Power-down SSD
 +
|-
 +
| <code>BCM5482_SSD_SGMII_SLAVE = $15;</code>
 +
| SGMII Slave Register
 +
|-
 +
| <code>BCM5482_SSD_SGMII_SLAVE_EN = $0002;</code>
 +
| Slave mode enable
 +
|-
 +
| <code>BCM5482_SSD_SGMII_SLAVE_AD = $0001;</code>
 +
| Slave auto-detection
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''BCM54810 registers''' <code> BCM54810_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>BCM54810_EXP_BROADREACH_LRE_MISC_CTL = (MII_BCM54XX_EXP_SEL_ER + $90);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN = (1 shl 0);</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54810_SHD_CLK_CTL = $3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BCM54810_SHD_CLK_CTL_GTXCLK_EN = (1 shl 9);</code>
 +
| &nbsp;
 +
|-
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''BCM54612E registers''' <code> BCM54612E_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>BCM54612E_EXP_SPARE0 = (MII_BCM54XX_EXP_SEL_ETC + $34);</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>BCM54612E_LED4_CLK125OUT_EN = (1 shl 1);</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===
 
----
 
----
  
''To be documented''
+
 
 +
'''GENET network'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETNetwork = ^TGENETNetwork;</code>
 +
 
 +
<code>TGENETNetwork = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''Network Properties''
 +
|-
 +
| <code>Network:TNetworkDevice;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|colspan="2"|''Driver Properties''
 +
|-
 +
| <code>IRQ0:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IRQ1:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Address:Pointer;</code>
 +
| Device register base address
 +
|-
 +
| <code>MDIOOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Lock:TSpinHandle;</code>
 +
| Device lock (Differs from lock in Network device) (Spin lock due to use by interrupt handler)
 +
|-
 +
| <code>Version:LongWord;</code>
 +
| Device version (GENET_V1..GENETV5)
 +
|-
 +
| <code>PhyRevision:LongWord;</code>
 +
| PHY revision (GENET_V1..GENETV4 devices only)
 +
|-
 +
| <code>Status64Enable:LongBool;</code>
 +
| True if 64 byte RX/TX status block is enabled (for hardware checksum etc)
 +
|-
 +
| <code>RXChecksumEnable:LongBool;</code>
 +
| True if RX checksum is enabled
 +
|-
 +
| <code>CRCForwardEnable:LongBool;</code>
 +
| True if CRC forwarding is enabled
 +
|-
 +
| <code>IRQStatus:LongWord;</code>
 +
| Non TX/RX interrupts forwarded to worker thread for servicing
 +
|-
 +
| <code>PendingCount:LongWord;</code>
 +
| Number of worker requests pending for this network
 +
|-
 +
| <code>WaiterThread:TThreadId;</code>
 +
| Thread waiting for pending requests to complete (for network close)
 +
|-
 +
| <code>StatusTimer:TTimerHandle;</code>
 +
| Timer for status change detection
 +
|-
 +
|colspan="2"|Hardware Parameters (Version specific)
 +
|-
 +
| <code>TXQueues:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXDescriptorsPerQueue:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RXQueues:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RXDescriptorsPerQueue:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BackPressureEnableShift:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>BackPressureMask:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HFBFilterCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HFBFilterSize:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>QTAGMask:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXBufferOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HFBOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>HFBRegOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RXDMAOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXDMAOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>WordsPerDescriptor:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Flags:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Q16TXDescriptorCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Q16RXDescriptorCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|DMA Parameters (Version specific)
 +
|-
 +
| <code>DMARXCheckBit:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RXDMARegOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXDMARegOffset:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMADescriptorSize:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMARegisters:TGENETDMARegisters;</code>
 +
| &nbsp;
 +
|-
 +
| <code>DMARingRegisters:TGENETDMARingRegisters;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|PHY Parameters
 +
|-
 +
| <code>PhyId:LongWord;</code>
 +
| PHY Identifier
 +
|-
 +
| <code>PhyAddr:LongWord;</code>
 +
| PHY Bus Address
 +
|-
 +
| <code>PhyMode:LongWord;</code>
 +
| PHY Interface Mode
 +
|-
 +
| <code>PhyFlags:LongWord;</code>
 +
| PHY Flags
 +
|-
 +
| <code>PhyInternal:LongBool;</code>
 +
| &nbsp;
 +
|-
 +
| <code>PhyExternal:LongBool;</code>
 +
| &nbsp;
 +
|-
 +
| <code>Link:LongInt;</code>
 +
| 0 = Down / 1 = Up
 +
|-
 +
| <code>Speed:LongInt;</code>
 +
| 10/100/1000 Mbps
 +
|-
 +
| <code>Duplex:LongInt;</code>
 +
| 0 = Half / 1 = Full
 +
|-
 +
| <code>Pause:LongInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>OldLink:LongInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>OldSpeed:LongInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>OldDuplex:LongInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>OldPause:LongInt;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|RX/TX Parameters
 +
|-
 +
| <code>RXRings:TGENETRXRings;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXRings:TGENETTXRings;</code>
 +
| &nbsp;
 +
|-
 +
| <code>RXControlBlocks:PGENETControlBlocks;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TXControlBlocks:PGENETControlBlocks;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Statistics Properties''
 +
|-
 +
| <code>InterruptCount:LongWord;</code>
 +
| Number of interrupt requests received by the device
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET RX/TX control block'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETControlBlock = ^TGENETControlBlock;</code>
 +
 
 +
<code>TGENETControlBlock = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''RX/TX Control Block''
 +
|-
 +
| <code>DescriptorAddress:PtrUInt;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>Entry:PNetworkEntry;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET control blocks'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETControlBlocks = ^TGENETControlBlocks;</code>
 +
 
 +
<code>TGENETControlBlocks = array[0..GENET_TOTAL_DESC - 1] of TGENETControlBlock;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET RX ring int enable'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TGENETRXRingIntEnable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''GENET RX ring int disable'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TGENETRXRingIntDisable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''GENET RX ring buffer'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETRXRing = ^TGENETRXRing;</code>
 +
 
 +
<code>TGENETRXRing = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''RX Ring Buffer''
 +
|-
 +
| <code>Network:PGENETNetwork;</code>
 +
| style="width: 50%;"|The owner of this RX ring
 +
|-
 +
| <code>Worker:TWorkerHandle;</code>
 +
| Handle of worker currently servicing RX ring
 +
|-
 +
| <code>Index:LongWord;</code>
 +
| RX ring index
 +
|-
 +
| <code>Size:LongWord;</code>
 +
| RX ring size
 +
|-
 +
| <code>Consumer:LongWord;</code>
 +
| RX last consumer index
 +
|-
 +
| <code>Read:LongWord;</code>
 +
| RX ring read pointer
 +
|-
 +
| <code>First:LongWord;</code>
 +
| RX ring initial CB ptr
 +
|-
 +
| <code>Last:LongWord;</code>
 +
| RX ring end CB ptr
 +
|-
 +
| <code>OldDiscards:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>ControlBlocks:PGENETControlBlocks;</code>
 +
| RX ring buffer control block
 +
|-
 +
| <code>IntEnable:TGENETRXRingIntEnable;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IntDisable:TGENETRXRingIntDisable;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET RX rings buffer'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETRXRings = ^TGENETRXRings;</code>
 +
 
 +
<code>TGENETRXRings = array[0..GENET_DESC_INDEX] of TGENETRXRing;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET TX ring int enable'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TGENETTXRingIntEnable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 +
'''GENET TX ring int disable'''
 +
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>TGENETTXRingIntDisable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
 
 +
'''GENET TX ring buffer'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETTXRing = ^TGENETTXRing;</code>
 +
 
 +
<code>TGENETTXRing = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''TX Ring Buffer''
 +
|-
 +
| <code>Network:PGENETNetwork;</code>
 +
| style="width: 50%;"|The owner of this TX ring
 +
|-
 +
| <code>Worker:TWorkerHandle;</code>
 +
| Handle of worker currently servicing TX ring
 +
|-
 +
| <code>Index:LongWord;</code>
 +
| TX ring index
 +
|-
 +
| <code>Queue:LongWord;</code>
 +
| TX queue index
 +
|-
 +
| <code>Size:LongWord;</code>
 +
| TX ring size
 +
|-
 +
| <code>Clean:LongWord;</code>
 +
| TX ring clean pointer
 +
|-
 +
| <code>Consumer:LongWord;</code>
 +
| TX last consumer index
 +
|-
 +
| <code>Free:LongWord;</code>
 +
| TX number of free descriptors
 +
|-
 +
| <code>Write:LongWord;</code>
 +
| TX ring write pointer SW copy
 +
|-
 +
| <code>Producer:LongWord;</code>
 +
| TX ring producer index SW copy
 +
|-
 +
| <code>First:LongWord;</code>
 +
| TX ring initial CB ptr
 +
|-
 +
| <code>Last:LongWord;</code>
 +
| TX ring end CB ptr
 +
|-
 +
| <code>ControlBlocks:PGENETControlBlocks;</code>
 +
| TX ring buffer control block
 +
|-
 +
| <code>IntEnable:TGENETTXRingIntEnable;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IntDisable:TGENETTXRingIntDisable;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET TX rings buffer'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETTXRings = ^TGENETTXRings;</code>
 +
 
 +
<code>TGENETTXRings = array[0..GENET_DESC_INDEX] of TGENETTXRing;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET RX/TX DMA registers'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETDMARegisters = ^TGENETDMARegisters;</code>
 +
 
 +
<code>TGENETDMARegisters = array[DMA_RING_CFG..DMA_RING16_TIMEOUT] of Byte;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''RX/TX DMA registers''
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET RX/TX DMA ring registers'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETDMARingRegisters = ^TGENETDMARingRegisters;</code>
 +
 
 +
<code>TGENETDMARingRegisters = array[TDMA_READ_PTR..TDMA_WRITE_PTR_HI] of Byte;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''RX/TX DMA ring registers''
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''GENET status 64'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGENETStatus64 = ^TGENETStatus64;</code>
 +
 
 +
<code>TGENETStatus64 = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>LengthStatus:LongWord;</code>
 +
| style="width: 50%;"|Length and peripheral status
 +
|-
 +
| <code>ExtendedStatus:LongWord;</code>
 +
| Extended status
 +
|-
 +
| <code>RXChecksum:LongWord;</code>
 +
| Partial RX checksum
 +
|-
 +
| <code>Unused1:array[0..8] of LongWord;</code>
 +
| Unused
 +
|-
 +
| <code>TXCheckusmInfo:LongWord;</code>
 +
| TX checksum info
 +
|-
 +
| <code>Unused2:array[0..2] of LongWord;</code>
 +
| Unused
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===
Line 158: Line 2,769:
 
|-
 
|-
 
! Note
 
! Note
| Not intended to be called directly by applications, use NetworkBufferRelease instead
+
| Not intended to be called directly by applications, use NetworkBufferRelease instead.
 
|-
 
|-
 
|}
 
|}

Latest revision as of 06:27, 3 August 2022

Return to Unit Reference


Description


Broadcom GENET Gigabit Ethernet Driver unit

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



[Expand]
GENET specific constants GENET_*


[Expand]
DMA configuration DMA_MAX_*


[Expand]
RX status bits STATUS_RX_*


[Expand]
TX status bits STATUS_TX_*


[Expand]
DMA descriptor DMA_DESC_*


[Expand]
UniMAC registers UMAC_*


[Expand]
Receive buffer registers RBUF_*


[Expand]
Hardware filter block (HFB) RBUF_HFB_*


[Expand]
Transmit buffer registers TBUF_*


[Expand]
Hardware filter block (HFB) registers HFB_*


[Expand]
UniMAC INTRL2 registers INTRL2_CPU_*


[Expand]
UniMAC INTRL2 IRQ0 definitions UMAC_IRQ0_*


[Expand]
UniMAC INTRL2 IRQ1 definitions UMAC_IRQ1_*


[Expand]
GENET register block offsets GENET_*_OFF


[Expand]
SYS block offsets and register definitions SYS_*


[Expand]
Ext block register offsets and definitions EXT_*


[Expand]
DMA rings size DMA_RING_SIZE*


[Expand]
DMA registers common definitions DMA_RW_POINTER_*


[Expand]
DMA ring size register DMA_RING_*


[Expand]
DMA interrupt threshold register DMA_INTR_*


[Expand]
DMA XON/XOFF register DMA_XON_THREHOLD_*


[Expand]
DMA flow period register DMA_FLOW_*


[Expand]
DMA control register DMA_EN_*


[Expand]
DMA status register DMA_DESC_*


[Expand]
DMA SCB burst size register DMA_SCB_BURST_*


[Expand]
DMA activity vector register DMA_ACTIVITY_*


[Expand]
DMA backpressure mask register DMA_BACKPRESSURE_MASK*


[Expand]
DMA backpressure status register DMA_BACKPRESSURE_*


[Expand]
DMA override register DMA_*_MODE_*


[Expand]
DMA timeout register DMA_TIMEOUT_*


[Expand]
TDMA rate limiting control register DMA_RATE_*


[Expand]
TDMA arbitration control register DMA_ARBITER_*


[Expand]
TX/RX DMA descriptor common bits DMA_BUFLENGTH_*


[Expand]
TX specific DMA descriptor bits DMA_TX_*


[Expand]
RX specific DMA descriptor bits DMA_RX_*


[Expand]
GENET power management mode GENET_POWER_*


[Expand]
GENET hardware flags GENET_HAS_*


[Expand]
RX/TX DMA registers DMA_CTRL*


[Expand]
RDMA/TDMA ring registers TDMA_*


[Expand]
UniMAC specific constants MDIO_*


[Expand]
Broadcom PHY ID PHY_ID_BCM*


[Expand]
Broadcom PHY flags PHY_BCM_FLAGS_*


[Expand]
Broadcom BCM54XX register definitions MII_BCM54XX_*


[Expand]
Broadcom auxilliary control shadow access registers MII_BCM54XX_AUXCTL_*


[Expand]
Broadcom LED source encodings BCM_LED_SRC_*


[Expand]
Broadcom multicolor LED configurations (expansion register 4) BCM_*_MULTICOLOR*


[Expand]
BCM5482 shadow registers BCM54XX_SHD_*


[Expand]
Expansion shadow access registers MII_BCM54XX_EXP_*


[Expand]
BCM5482 secondary SerDes registers BCM5482_SSD_*


[Expand]
BCM54810 registers BCM54810_*


Type definitions



GENET network

[Expand]

PGENETNetwork = ^TGENETNetwork;

TGENETNetwork = record

GENET RX/TX control block

[Expand]

PGENETControlBlock = ^TGENETControlBlock;

TGENETControlBlock = record

GENET control blocks

[Expand]

PGENETControlBlocks = ^TGENETControlBlocks;

TGENETControlBlocks = array[0..GENET_TOTAL_DESC - 1] of TGENETControlBlock;

GENET RX ring int enable

TGENETRXRingIntEnable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);

GENET RX ring int disable

TGENETRXRingIntDisable = procedure(Network:PGENETNetwork; Ring:PGENETRXRing);

GENET RX ring buffer

[Expand]

PGENETRXRing = ^TGENETRXRing;

TGENETRXRing = record

GENET RX rings buffer

[Expand]

PGENETRXRings = ^TGENETRXRings;

TGENETRXRings = array[0..GENET_DESC_INDEX] of TGENETRXRing;

GENET TX ring int enable

TGENETTXRingIntEnable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);

GENET TX ring int disable

TGENETTXRingIntDisable = procedure(Network:PGENETNetwork;Ring:PGENETTXRing);

GENET TX ring buffer

[Expand]

PGENETTXRing = ^TGENETTXRing;

TGENETTXRing = record

GENET TX rings buffer

[Expand]

PGENETTXRings = ^TGENETTXRings;

TGENETTXRings = array[0..GENET_DESC_INDEX] of TGENETTXRing;

GENET RX/TX DMA registers

[Expand]

PGENETDMARegisters = ^TGENETDMARegisters;

TGENETDMARegisters = array[DMA_RING_CFG..DMA_RING16_TIMEOUT] of Byte;

GENET RX/TX DMA ring registers

[Expand]

PGENETDMARingRegisters = ^TGENETDMARingRegisters;

TGENETDMARingRegisters = array[TDMA_READ_PTR..TDMA_WRITE_PTR_HI] of Byte;

GENET status 64

[Expand]

PGENETStatus64 = ^TGENETStatus64;

TGENETStatus64 = record


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