MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- -------- ------------------------------------------------------- 1.00a wsy 01/10/10 First release
#include "xemacps.h"
Functions | |
void | XEmacPs_StubHandler (void) |
int | XEmacPs_CfgInitialize (XEmacPs *InstancePtr, XEmacPs_Config *CfgPtr, u32 EffectiveAddress) |
void | XEmacPs_Start (XEmacPs *InstancePtr) |
void | XEmacPs_Stop (XEmacPs *InstancePtr) |
void | XEmacPs_Reset (XEmacPs *InstancePtr) |
int XEmacPs_CfgInitialize | ( | XEmacPs * | InstancePtr, | |
XEmacPs_Config * | CfgPtr, | |||
u32 | EffectiveAddress | |||
) |
Initialize a specific XEmacPs instance/driver. The initialization entails:
The PHY is setup independently from the device. Use the MII or whatever other interface may be present for setup.
InstancePtr | is a pointer to the instance to be worked on. | |
CfgPtr | is the device configuration structure containing required hardware build data. | |
EffectiveAddress | is the base address of the device. If address translation is not utilized, this parameter can be passed in using CfgPtr->Config.BaseAddress to specify the physical base address. |
void XEmacPs_Reset | ( | XEmacPs * | InstancePtr | ) |
Perform a graceful reset of the Ethernet MAC. Resets the DMA channels, the transmitter, and the receiver.
Steps to reset
All options are placed in their default state. Any frames in the descriptor lists will remain in the lists. The side effect of doing this is that after a reset and following a restart of the device, frames were in the list before the reset may be transmitted or received.
The upper layer software is responsible for re-configuring (if necessary) and restarting the MAC after the reset. Note also that driver statistics are not cleared on reset. It is up to the upper layer software to clear the statistics if needed.
When a reset is required, the driver notifies the upper layer software of this need through the ErrorHandler callback and specific status codes. The upper layer software is responsible for calling this Reset function and then re-configuring the device.
InstancePtr | is a pointer to the instance to be worked on. |
void XEmacPs_Start | ( | XEmacPs * | InstancePtr | ) |
Start the Ethernet controller as follows:
InstancePtr | is a pointer to the instance to be worked on. |
This function must not be preempted by an interrupt that may service the device.
void XEmacPs_Stop | ( | XEmacPs * | InstancePtr | ) |
Gracefully stop the Ethernet MAC as follows:
Device options currently in effect are not changed.
This function will disable all interrupts. Default interrupts settings that had been enabled will be restored when XEmacPs_Start() is called.
InstancePtr | is a pointer to the instance to be worked on. |
void XEmacPs_StubHandler | ( | void | ) |
This is a stub for the asynchronous callbacks. The stub is here in case the upper layer forgot to set the handler(s). On initialization, all handlers are set to this callback. It is considered an error for this handler to be invoked.
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.