VxWorks API Reference : Driver Libraries

bcm1250MacEnd

NAME

bcm1250MacEnd - END style BCM1250 MAC Ethernet driver

ROUTINES

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

DESCRIPTION

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.

EXTERNAL INTERFACE

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

TARGET-SPECIFIC PARAMETERS

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.

SYSTEM RESOURCE USAGE

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.

INCLUDES

endLib.h etherMultiLib.h bcm1250MacEnd.h

SEE ALSO

muxLib, endLib, netBufLib Writing and Enhanced Network Driver


Driver Libraries : Routines

bcm1250MacEndLoad( )

NAME

bcm1250MacEndLoad( ) - initialize the driver and device

SYNOPSIS

END_OBJ * bcm1250MacEndLoad
    (
    char * initString         /* String to be parsed by the driver. */
    )

DESCRIPTION

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.

RETURNS

An END object pointer or NULL on error.

SEE ALSO

bcm1250MacEnd


Driver Libraries : Routines

bcm1250MacEthMiiWrite( )

NAME

bcm1250MacEthMiiWrite( ) - write to phy register

SYNOPSIS

#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 */
    )

DESCRIPTION

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.

RETURNS

N/A

SEE ALSO

bcm1250MacEnd


Driver Libraries : Routines

bcm1250MacRxDmaShow( )

NAME

bcm1250MacRxDmaShow( ) - display RX DMA register values

SYNOPSIS

void bcm1250MacRxDmaShow
    (
    int inst                  /* driver instance */
    )

DESCRIPTION

This routine prints the enet RX DMA registers to stdout

RETURNS

N/A

SEE ALSO

bcm1250MacEnd


Driver Libraries : Routines

bcm1250MacTxDmaShow( )

NAME

bcm1250MacTxDmaShow( ) - display TX DMA register values

SYNOPSIS

void bcm1250MacTxDmaShow
    (
    int inst                  /* driver instance */
    )

DESCRIPTION

This routine prints the enet TX DMA registers to stdout

RETURNS

N/A

SEE ALSO

bcm1250MacEnd


Driver Libraries : Routines

bcm1250MacShow( )

NAME

bcm1250MacShow( ) - display mac register values

SYNOPSIS

void bcm1250MacShow
    (
    int inst                  /* driver instance */
    )

DESCRIPTION

This routine prints the enet MAC registers to stdout

RETURNS

N/A

SEE ALSO

bcm1250MacEnd


Driver Libraries : Routines

bcm1250MacPhyShow( )

NAME

bcm1250MacPhyShow( ) - display phy register values

SYNOPSIS

void bcm1250MacPhyShow
    (
    int inst                  /* driver instance */
    )

DESCRIPTION

This routine prints the enet PHY registers to stdout

RETURNS

N/A

SEE ALSO

bcm1250MacEnd