To configure the GMAC_SW Ethernet Subsystem for operation, the host must perform the following:
- Select the Interface (G/MII, RGMII, RMII) Mode
- Configure pads (PIN muxing), as per the interface selected.
- Enable the GMAC_SW Ethernet Subsystem Clocks
- Configure the PRCM registers CM_GMAC_CLKSTCTRL and CM_GMAC_GMAC_CLKCTRL to enable power and clocks to GMAC_SW Ethernet Subsystem.
- Apply Soft Reset to GMAC_SW Subsystem, CPSW_3G, CPGMAC_SL1/2, and CPDMA
- Initialize the HDPs (Header Description Pointer) and CPs (Completion Pointer) to NULL
- Configure the Interrupts
- Configure the CPSW_CONTROL register
- Configure the CPSW_STAT_PORT_EN register
- Configure the ALE
- Configure the MDIO
- Configure the CPDMA receive DMA controller
- Configure the CPDMA transmit DMA controller
- Configure the CPPI TX and RX Descriptors
- Configure CPGMAC_SL1 and CPGMAC_SL2, as per the desired mode of operations.
- Start up RX and TX DMA (Write to HDP of RX and TX)
- Wait for the completion of Transfer (HDP cleared to 0)