RTEMS  5.0.0
Macros | Functions
gmac.c File Reference
#include "chip.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>

Macros

#define GMAC_NCFGR_GBE   (0x1u << 10)
 

Functions

uint8_t GMAC_IsIdle (Gmac *pGmac)
 
void GMAC_PHYMaintain (Gmac *pGmac, uint8_t bPhyAddr, uint8_t bRegAddr, uint8_t bRW, uint16_t wData)
 
uint16_t GMAC_PHYData (Gmac *pGmac)
 
uint8_t GMAC_SetMdcClock (Gmac *pGmac, uint32_t mck)
 Set MDC clock according to current board clock. Per 802.3, MDC should be less then 2.5MHz. More...
 
void GMAC_EnableMdio (Gmac *pGmac)
 Enable MDI with PHY. More...
 
void GMAC_DisableMdio (Gmac *pGmac)
 Enable MDI with PHY. More...
 
void GMAC_EnableMII (Gmac *pGmac)
 Enable MII mode for GMAC, called once after auto negotiate. More...
 
void GMAC_EnableGMII (Gmac *pGmac)
 Enable GMII mode for GMAC, called once after auto negotiate. More...
 
void GMAC_EnableRGMII (Gmac *pGmac, uint32_t duplex, uint32_t speed)
 Enable RGMII mode for GMAC, called once after auto negotiate. More...
 
void GMAC_SetLinkSpeed (Gmac *pGmac, uint8_t speed, uint8_t fullduplex)
 Setup the GMAC for the link : speed 100M/10M and Full/Half duplex. More...
 
uint32_t GMAC_SetLocalLoopBack (Gmac *pGmac)
 set local loop back More...
 
uint32_t GMAC_GetItMask (Gmac *pGmac, gmacQueList_t queueIdx)
 
uint32_t GMAC_GetTxStatus (Gmac *pGmac)
 
void GMAC_ClearTxStatus (Gmac *pGmac, uint32_t dwStatus)
 
uint32_t GMAC_GetRxStatus (Gmac *pGmac)
 
void GMAC_ClearRxStatus (Gmac *pGmac, uint32_t dwStatus)
 
void GMAC_ReceiveEnable (Gmac *pGmac, uint8_t bEnaDis)
 
void GMAC_TransmitEnable (Gmac *pGmac, uint8_t bEnaDis)
 
void GMAC_SetRxQueue (Gmac *pGmac, uint32_t dwAddr, gmacQueList_t queueIdx)
 
uint32_t GMAC_GetRxQueue (Gmac *pGmac, gmacQueList_t queueIdx)
 
void GMAC_SetTxQueue (Gmac *pGmac, uint32_t dwAddr, gmacQueList_t queueIdx)
 
uint32_t GMAC_GetTxQueue (Gmac *pGmac, gmacQueList_t queueIdx)
 
void GMAC_NetworkControl (Gmac *pGmac, uint32_t bmNCR)
 
uint32_t GMAC_GetNetworkControl (Gmac *pGmac)
 
void GMAC_EnableIt (Gmac *pGmac, uint32_t dwSources, gmacQueList_t queueIdx)
 
void GMAC_DisableAllQueueIt (Gmac *pGmac, uint32_t dwSources)
 
void GMAC_EnableAllQueueIt (Gmac *pGmac, uint32_t dwSources)
 
void GMAC_DisableIt (Gmac *pGmac, uint32_t dwSources, gmacQueList_t queueIdx)
 
uint32_t GMAC_GetItStatus (Gmac *pGmac, gmacQueList_t queueIdx)
 
void GMAC_SetAddress (Gmac *pGmac, uint8_t bIndex, uint8_t *pMacAddr)
 
void GMAC_SetAddress32 (Gmac *pGmac, uint8_t bIndex, uint32_t dwMacT, uint32_t dwMacB)
 
void GMAC_SetAddress64 (Gmac *pGmac, uint8_t bIndex, uint64_t ddwMac)
 
void GMAC_ClearStatistics (Gmac *pGmac)
 
void GMAC_IncreaseStatistics (Gmac *pGmac)
 
void GMAC_StatisticsWriteEnable (Gmac *pGmac, uint8_t bEnaDis)
 
void GMAC_Configure (Gmac *pGmac, uint32_t dwCfg)
 
void GMAC_SetDMAConfig (Gmac *pGmac, uint32_t dwDmaCfg, gmacQueList_t queueIdx)
 
uint32_t GMAC_GetDMAConfig (Gmac *pGmac, gmacQueList_t queueIdx)
 
uint32_t GMAC_GetConfigure (Gmac *pGmac)
 
void GMAC_TransmissionStart (Gmac *pGmac)
 
void GMAC_TransmissionHalt (Gmac *pGmac)
 
void GMAC_ClearScreener1Reg (Gmac *pGmac, gmacQueList_t queueIdx)
 
void GMAC_WriteScreener1Reg (Gmac *pGmac, gmacQueList_t queueIdx, uint32_t regVal)
 
void GMAC_ClearScreener2Reg (Gmac *pGmac, gmacQueList_t queueIdx)
 
void GMAC_WriteScreener2Reg (Gmac *pGmac, gmacQueList_t queueIdx, uint32_t regVal)
 
void GMAC_WriteEthTypeReg (Gmac *pGmac, gmacQueList_t queueIdx, uint16_t etherType)
 
void GMAC_WriteCompareReg (Gmac *pGmac, gmacQueList_t queueIdx, uint32_t c0Reg, uint16_t c1Reg)
 
void GMAC_EnableCbsQueA (Gmac *pGmac)
 
void GMAC_DisableCbsQueA (Gmac *pGmac)
 
void GMAC_EnableCbsQueB (Gmac *pGmac)
 
void GMAC_DisableCbsQueB (Gmac *pGmac)
 
void GMAC_ConfigIdleSlopeA (Gmac *pGmac, uint32_t idleSlopeA)
 
void GMAC_ConfigIdleSlopeB (Gmac *pGmac, uint32_t idleSlopeB)
 
void GMAC_SetTsuTmrIncReg (Gmac *pGmac, uint32_t nanoSec)
 
uint16_t GMAC_GetPtpEvtMsgRxdMsbSec (Gmac *pGmac)
 
uint32_t GMAC_GetPtpEvtMsgRxdLsbSec (Gmac *pGmac)
 
uint32_t GMAC_GetPtpEvtMsgRxdNanoSec (Gmac *pGmac)
 
void GMAC_SetTsuCompare (Gmac *pGmac, uint32_t seconds47, uint32_t seconds31, uint32_t nanosec)
 
void GMAC_SetTsuCompareNanoSec (Gmac *pGmac, uint32_t nanosec)
 
void GMAC_SetTsuCompareSec31 (Gmac *pGmac, uint32_t seconds31)
 
void GMAC_SetTsuCompareSec47 (Gmac *pGmac, uint16_t seconds47)
 
uint32_t GMAC_GetRxEvtFrameSec (Gmac *pGmac)
 
uint32_t GMAC_GetRxEvtFrameNsec (Gmac *pGmac)
 
uint32_t GMAC_GetRxPeerEvtFrameSec (Gmac *pGmac)
 
uint32_t GMAC_GetRxPeerEvtFrameNsec (Gmac *pGmac)
 
uint32_t GMAC_GetTxEvtFrameSec (Gmac *pGmac)
 
uint32_t GMAC_GetTxEvtFrameNsec (Gmac *pGmac)
 
uint32_t GMAC_GetTxPeerEvtFrameSec (Gmac *pGmac)
 
uint32_t GMAC_GetTxPeerEvtFrameNsec (Gmac *pGmac)