XilinxProcessorIPLib/drivers/axiethernet/examples/avb/xavb_example.c
static int AvbConfigureGmii(XAxiEthernet *InstancePtr, XAvb *AvbInstancePtr)
{
	u32 EmmcReg;
	int Status;

	/*
	 * Set PHY to loopback.
	 */
	Status = AvbEnterPhyLoopBack(InstancePtr);
	if(Status != XST_SUCCESS) {
		XAvb_Stop(AvbInstancePtr);
		return XST_FAILURE;
	}

	/*
	 * Get the current contents of the EMAC config register and
	 * zero out speed bits
	 */
	EmmcReg = XAxiEthernet_ReadReg(InstancePtr->Config.BaseAddress,
							XAE_EMMC_OFFSET);
	EmmcReg = EmmcReg & (~XAE_EMMC_LINKSPEED_MASK);
	EmmcReg |= XAE_EMMC_LINKSPD_1000;
	XAxiEthernet_WriteReg(InstancePtr->Config.BaseAddress,
						XAE_EMMC_OFFSET,EmmcReg);

	/*
	 * Setting the operating speed of the MAC needs a delay.  There
	 * doesn't seem to be register to poll, so please consider this
	 * during your application design.
	 */
	AvbUtilPhyDelay(1);
	return XST_SUCCESS;

}
/*****************************************************************************/
/**
*
* This function configures the GMII interface and Axi Ethernet registers for
* 1000 Mbps speed configuration.
*
* @param	InstancePtr is a pointer to the Axi Ethernet driver instance
* @param	AvbInstancePtr is a pointer to the AVB instance.
*
* @return	- XST_SUCCESS if successful.
*		- XST_FAILURE, in case of failure...
*
* @note		None.
*
******************************************************************************/
This function configures the GMII interface and Axi Ethernet registers for
1000 Mbps speed configuration.
This function configures the GMII interface and Axi Ethernet registers for 1000 Mbps speed configuration .
static int AvbConfigureGmii(XAxiEthernet *InstancePtr, XAvb *AvbInstancePtr)
{
	u32 EmmcReg;
	int Status;
	Status = AvbEnterPhyLoopBack(InstancePtr);
	if(Status != XST_SUCCESS) {
		XAvb_Stop(AvbInstancePtr);
		return XST_FAILURE;
	}
	EmmcReg = XAxiEthernet_ReadReg(InstancePtr->Config.BaseAddress,
							XAE_EMMC_OFFSET);
	EmmcReg = EmmcReg & (~XAE_EMMC_LINKSPEED_MASK);
	EmmcReg |= XAE_EMMC_LINKSPD_1000;
	XAxiEthernet_WriteReg(InstancePtr->Config.BaseAddress,
						XAE_EMMC_OFFSET,EmmcReg);
	AvbUtilPhyDelay(1);
	return XST_SUCCESS;
}
static int AvbConfigureGmii ( XAxiEthernet * InstancePtr , XAvb * AvbInstancePtr ) { u32 EmmcReg ; int Status ; Status = AvbEnterPhyLoopBack ( InstancePtr ) ; if ( Status != XST_SUCCESS ) { XAvb_Stop ( AvbInstancePtr ) ; return XST_FAILURE ; } EmmcReg = XAxiEthernet_ReadReg ( InstancePtr -> Config . BaseAddress , XAE_EMMC_OFFSET ) ; EmmcReg = EmmcReg & ( ~ XAE_EMMC_LINKSPEED_MASK ) ; EmmcReg |= XAE_EMMC_LINKSPD_1000 ; XAxiEthernet_WriteReg ( InstancePtr -> Config . BaseAddress , XAE_EMMC_OFFSET , EmmcReg ) ; AvbUtilPhyDelay ( 1 ) ; return XST_SUCCESS ; }
This function configures the GMII interface and Axi Ethernet registers for
1000 Mbps speed configuration.
This function configures the GMII interface and Axi Ethernet registers for 1000 Mbps speed configuration .
/*
	 * Set PHY to loopback.
	 */ /*
	 * Get the current contents of the EMAC config register and
	 * zero out speed bits
	 */ /*
	 * Setting the operating speed of the MAC needs a delay.  There
	 * doesn't seem to be register to poll, so please consider this
	 * during your application design.
	 */