VxWorks Reference Manual : Libraries

mb86960End

NAME

mb86960End - END-style Fujitsu MB86960 Ethernet network interface driver

ROUTINES

mb86960EndLoad( ) - initialize the driver and device
mb86960InitParse( ) - parse the initialization string
mb86960MemInit( ) - initialize memory for the chip

DESCRIPTION

This module implements the Fujitsu MB86960 NICE Ethernet network interface driver.

This driver is non-generic and has only been run on the Fujitsu SPARClite Evaluation Board. It currently supports only unit number zero. The driver must be given several target-specific parameters, and some external support routines must be provided. These parameters, and the mechanisms used to communicate them to the driver, are detailed below.

BOARD LAYOUT

This device is on-board. No jumpering diagram is necessary.

The MB86960 Network Interface Controller with Encoder/Decoder (NICE) chip is a highly integrated monolithic device which incorporates both network controller, complete with buffer management and Manchester encoder/decoder.

TARGET-SPECIFIC PARAMETERS

The format of the parameter string is:

    unit:devBaseAddr:ivec

unit
A convenient holdover from the former model. It is only used in the string name for the driver.

devBaseAddr
The base Address of the chip registers.

ivec
This is the interrupt vector number of the hardware interrupt generated by this ethernet device. The driver uses intConnect( ) to attach an interrupt handler to this interrupt.

EXTERNAL SUPPORT REQUIREMENTS

This driver requires seven external support functions:

sys86960IntEnable( )
    void sysEnetIntEnable (int unit)
This routine provides a target-specific interface to enable Ethernet device interrupts for a given device unit. For this driver, value of unit must be 0.

sys86960IntDisable( )
    void sysEnetIntDisable (int unit)
This routine provides a target-specific interface to disable Ethernet device interrupts for a given device unit. For this driver, value of unit must be 0.

sysEnetAddrGet( )
    STATUS sysEnetAddrGet (int unit, char *enetAdrs)
This routine provides a target-specific interface to access a device Ethernet address. This routine should provide a six-byte Ethernet address in the enetAdrs parameter and return OK or ERROR.

In this driver the macros SYS_OUT_SHORT and SYS_IN_SHORT which call bsp-specific functions to access the chip register.

INCLUDES

end.h endLib.h etherMultiLib.h

SEE ALSO

mb86960End, muxLib, endLib Writing and Enhanced Network Driver


Libraries : Routines

mb86960EndLoad( )

NAME

mb86960EndLoad( ) - initialize the driver and device

SYNOPSIS

END_OBJ * mb86960EndLoad
    (
    char * pInitString /* String to be parsed by the driver. */
    )

DESCRIPTION

This routine initializes the driver and puts the device to an operational state. All of the device specific parameters are passed in via the initString, which expects a string of the following format:

unit:base_addr:int_vector:int_level

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, "fn") into the initString and returns 0.

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, or 0 and the name of the device if the initString was NULL.

SEE ALSO

mb86960End


Libraries : Routines

mb86960InitParse( )

NAME

mb86960InitParse( ) - parse the initialization string

SYNOPSIS

STATUS mb86960InitParse
    (
    MB86960_END_CTRL * pDrvCtrl,   /* device pointer */
    char *             pInitString /* information string */
    )

DESCRIPTION

This routine parses the input string, filling in values in the driver control structure.

The initialization string format is: unit:baseAddr:ivec

unit
Device unit number, a small integer. Must always be 0.

devBaseAddr
Base address of the device register set.

ivec
Interrupt vector number, used with sysIntConnect( ).

RETURNS

 OK or ERROR for invalid arguments.

SEE ALSO

mb86960End


Libraries : Routines

mb86960MemInit( )

NAME

mb86960MemInit( ) - initialize memory for the chip

SYNOPSIS

STATUS mb86960MemInit
    (
    MB86960_END_CTRL * pDrvCtrl /* device to be initialized */
    )

DESCRIPTION

This routine is highly specific to the device.

RETURNS

OK or ERROR.

SEE ALSO

mb86960End