VxWorks Reference Manual : Libraries
mb86960End - END-style Fujitsu MB86960 Ethernet network interface driver
mb86960EndLoad( ) - initialize the driver and device
mb86960InitParse( ) - parse the initialization string
mb86960MemInit( ) - initialize memory for the chip
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.
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.
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.
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.
end.h endLib.h etherMultiLib.h
mb86960End, muxLib, endLib Writing and Enhanced Network Driver
mb86960EndLoad( ) - initialize the driver and device
END_OBJ * mb86960EndLoad ( char * pInitString /* String to be parsed by the driver. */ )
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.
An END object pointer, or NULL on error, or 0 and the name of the device if the initString was NULL.
mb86960InitParse( ) - parse the initialization string
STATUS mb86960InitParse ( MB86960_END_CTRL * pDrvCtrl, /* device pointer */ char * pInitString /* information string */ )
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( ).
OK or ERROR for invalid arguments.
mb86960MemInit( ) - initialize memory for the chip
STATUS mb86960MemInit ( MB86960_END_CTRL * pDrvCtrl /* device to be initialized */ )
This routine is highly specific to the device.
OK or ERROR.