VxWorks API Reference : Driver Libraries
bcm1250MacEnd - END style BCM1250 MAC Ethernet driver
bcm1250MacEndLoad( ) - initialize the driver and device
bcm1250MacEthMiiWrite( ) - write to phy register
bcm1250MacRxDmaShow( ) - display RX DMA register values
bcm1250MacTxDmaShow( ) - display TX DMA register values
bcm1250MacShow( ) - display mac register values
bcm1250MacPhyShow( ) - display phy register values
This module implements the Broadcom BCM1250 on-chip ethernet MACs. The BCM1250 ethernet DMA has two channels, but this module only supports channel 0. The dual DMA channel feature is intended for packet classification and quality of service applications.
The only external interface is the bcm1250MacEndLoad( ) routine, which has the initString as its only parameter. The initString parameter must be a colon- delimited string in the following format:
unit:hwunit:vecnum:flags:numRds0:numTds0
- unit
- This parameter defines which ethernet interface is being loaded.
- hwunit
- This parameter is no longer used, but must be present so the string can be parsed properly. Its value should be zero.
- vecnum
- This parameter specifies the interrupt vector number. This driver configures the MAC device to generate hardware interrupts for various events within the device; thus it contains an interrupt handler routine. The driver calls bcm1250IntConnect( ) to connect its interrupt handler to this interrupt vector.
- flags
- Device specific flags, for future use. Its value should be zero.
- numRds0
- This parameter specifies the number of receive DMA buffer descriptors for DMA channel 0.
- numTds0
- This parameter specifies the number of transmit DMA buffer descriptors for DMA channel 0.
When implemented, this driver requires the following system resources:
- one mutual exclusion semaphore
- one interrupt vector
- 68 bytes in the initialized data section (data)
- 0 bytes in the uninitialized data section (BSS)The driver allocates clusters of size 1520 bytes for receive frames and
and transmit frames.
endLib.h etherMultiLib.h bcm1250MacEnd.h
muxLib, endLib, netBufLib Writing and Enhanced Network Driver
bcm1250MacEndLoad( ) - initialize the driver and device
END_OBJ * bcm1250MacEndLoad ( char * initString /* String to be parsed by the driver. */ )
This routine initializes the driver and the device to the operational state. All of the device specific parameters are passed in initString, which expects a string of the following format:
The initialization string format is: "unit:hwunit:vecnum:flags:numRds0:numTds0:numRds1:numTds1"
The hwunit field is not used, but must be present to parse properly.
This routine can be called in two modes. If it is called with an empty but allocated string, it places the name of this device (that is, "sbe0", "sbe1", or "sbe2") into the initString and returns NULL.
If the string is allocated and not empty, the routine attempts to load the driver using the values specified in the string.
An END object pointer or NULL on error.
bcm1250MacEthMiiWrite( ) - write to phy register
#ifdef FUTURE_USE LOCAL void bcm1250MacEthMiiWrite ( DRV_CTRL * pDrvCtrl, /* driver control structure */ int phyAddr, /* physical interface chip address */ int regIdx, /* register in physical interface chip */ unsigned int regVal /* value to write to regIdx */ )
It first sends START and WRITE command, followed by address of physical interface chip, then register index. It then sends ACK and register value to be written.
N/A
bcm1250MacRxDmaShow( ) - display RX DMA register values
void bcm1250MacRxDmaShow ( int inst /* driver instance */ )
This routine prints the enet RX DMA registers to stdout
N/A
bcm1250MacTxDmaShow( ) - display TX DMA register values
void bcm1250MacTxDmaShow ( int inst /* driver instance */ )
This routine prints the enet TX DMA registers to stdout
N/A
bcm1250MacShow( ) - display mac register values
void bcm1250MacShow ( int inst /* driver instance */ )
This routine prints the enet MAC registers to stdout
N/A
bcm1250MacPhyShow( ) - display phy register values
void bcm1250MacPhyShow ( int inst /* driver instance */ )
This routine prints the enet PHY registers to stdout
N/A