#include "board.h"
Go to the source code of this file.
Defines | |
#define | GMACB_RETRY_MAX 300000 |
#define | GACB_RETRY_MAX 1000000 |
Functions | |
void | GMACB_DumpRegisters (GMacb *pMacb) |
Dump all the useful registers. | |
void | GMACB_SetupTimeout (GMacb *pMacb, uint32_t toMax) |
Setup the maximum timeout count of the driver. | |
void | GMACB_Init (GMacb *pMacb, sGmacd *pGmacd, uint8_t phyAddress) |
Initialize the MACB instance. | |
uint8_t | GMACB_ResetPhy (GMacb *pMacb) |
Issue a SW reset to reset all registers of the PHY. | |
uint8_t | GMACB_InitPhy (GMacb *pMacb, uint32_t mck, const Pin *pResetPins, uint32_t nbResetPins, const Pin *pGmacPins, uint32_t nbGmacPins) |
Do a HW initialize to the PHY ( via RSTC ) and set up clocks & PIOs This should be called only once to initialize the PHY pre-settings. The PHY address is reset status of CRS,RXD[3:0] (the emacPins' pullups). The COL pin is used to select MII mode on reset (pulled up for Reduced MII) The RXDV pin is used to select test mode on reset (pulled up for test mode) The above pins should be predefined for corresponding settings in resetPins The GMAC peripheral pins are configured after the reset done. | |
uint8_t | GMACB_AutoNegotiate (GMacb *pMacb) |
Issue a Auto Negotiation of the PHY. |
Definition in file gmacb_phy.c.
#define GACB_RETRY_MAX 1000000 |
Default max retry count
Definition at line 46 of file gmacb_phy.c.
#define GMACB_RETRY_MAX 300000 |
Default max retry count
Definition at line 43 of file gmacb_phy.c.
uint8_t GMACB_AutoNegotiate | ( | GMacb * | pMacb | ) |
Issue a Auto Negotiation of the PHY.
pMacb | Pointer to the MACB instance |
Set the Auto_negotiation Advertisement Register, MII advertising for Next page 100BaseTxFD and HD, 10BaseTFD and HD, IEEE 802.3
Definition at line 372 of file gmacb_phy.c.
void GMACB_DumpRegisters | ( | GMacb * | pMacb | ) |
Dump all the useful registers.
pMacb | Pointer to the MACB instance |
Definition at line 191 of file gmacb_phy.c.
Initialize the MACB instance.
pMacb | Pointer to the MACB instance | |
phyAddress | The PHY address used to access the PHY |
Definition at line 253 of file gmacb_phy.c.
uint8_t GMACB_InitPhy | ( | GMacb * | pMacb, | |
uint32_t | mck, | |||
const Pin * | pResetPins, | |||
uint32_t | nbResetPins, | |||
const Pin * | pGmacPins, | |||
uint32_t | nbGmacPins | |||
) |
Do a HW initialize to the PHY ( via RSTC ) and set up clocks & PIOs This should be called only once to initialize the PHY pre-settings. The PHY address is reset status of CRS,RXD[3:0] (the emacPins' pullups). The COL pin is used to select MII mode on reset (pulled up for Reduced MII) The RXDV pin is used to select test mode on reset (pulled up for test mode) The above pins should be predefined for corresponding settings in resetPins The GMAC peripheral pins are configured after the reset done.
pMacb | Pointer to the MACB instance | |
mck | Main clock setting to initialize clock | |
resetPins | Pointer to list of PIOs to configure before HW RESET (for PHY power on reset configuration latch) | |
nbResetPins | Number of PIO items that should be configured | |
emacPins | Pointer to list of PIOs for the EMAC interface | |
nbEmacPins | Number of PIO items that should be configured |
Definition at line 317 of file gmacb_phy.c.
uint8_t GMACB_ResetPhy | ( | GMacb * | pMacb | ) |
Issue a SW reset to reset all registers of the PHY.
pMacb | Pointer to the MACB instance |
Definition at line 267 of file gmacb_phy.c.
void GMACB_SetupTimeout | ( | GMacb * | pMacb, | |
uint32_t | toMax | |||
) |
Setup the maximum timeout count of the driver.
pMacb | Pointer to the MACB instance | |
toMax | Timeout maximum count. |
Definition at line 243 of file gmacb_phy.c.