VxWorks Reference Manual : Libraries
iOlicomEnd - END style Intel Olicom PCMCIA network interface driver
iOlicomEndLoad( ) - initialize the driver and device
iOlicomIntHandle( ) - interrupt service for card interrupts
This module implements the Olicom (Intel 82595TX) network interface driver. The physical device is a PCMCIA card. This driver also houses code to manage a Vadem PCMCIA Interface controller on the ARM PID board, which is strictly a subsystem in it's own right.
This network interface driver does not include support for trailer protocols or data chaining. However, buffer loaning has been implemented in an effort to boost performance.
The device resides on a PCMCIA card and is soft configured. No jumpering diagram is necessary.
This driver provides the END external interface with the following exceptions. The only external interface is the iOlicomEndLoad( ) routine. All of the paramters are passed as strings in a colon (:) separated list to the load function as an initString. The iOlicomEndLoad( ) function uses strtok( ) to parse the string.
The string contains the target specific parameters like this:
"io_baseA:attr_baseA:mem_baseA:io_baseB:attr_baseB:mem_baseB: \
ctrl_base:intVectA:intLevelA:intVectB:intLevelB: \
txBdNum:rxBdNum:pShMem:shMemSize"
- I/O base address A
This is the first parameter passed to the driver init string. This parameter indicates the base address of the PCMCIA I/O space for socket A.
- Attribute base address A
This is the second parameter passed to the driver init string. This parameter indicates the base address of the PCMCIA attribute space for socket A. On the PID board, this should be the offset of the beginning of the attribute space from the beginning of the memory space.
- Memory base address A
This is the third parameter passed to the driver init string. This parameter indicates the base address of the PCMCIA memory space for socket A.
- I/O base address B
This is the fourth parameter passed to the driver init string. This parameter indicates the base address of the PCMCIA I/O space for socket B.
- Attribute base address B
This is the fifth parameter passed to the driver init string. This parameter indicates the base address of the PCMCIA attribute space for socket B. On the PID board, this should be the offset of the beginning of the attribute space from the beginning of the memory space.
- Memory base address B
This is the sixth parameter passed to the driver init string. This parameter indicates the base address of the PCMCIA memory space for socket B.
- PCMCIA controller base address
This is the seventh parameter passed to the driver init string. This parameter indicates the base address of the Vadem PCMCIA controller.
- interrupt vectors and levels
These are the eighth, ninth, tenth and eleventh parameters passed to the driver init string.
The mapping of IRQs generated at the Card/PCMCIA level to interrupt levels and vectors is system dependent. Furthermore the slot holding the PCMCIA card is not initially known. The interrupt levels and vectors for both socket A and socket B must be passed to iOlicomEndLoad( ), allowing the driver to select the required parameters later.
- number of transmit and receive buffer descriptors
These are the twelfth and thirteenth parameters passed to the driver init string.
The number of transmit and receive buffer descriptors (BDs) used is configurable by the user upon attaching the driver. There must be a minimum of two transmit and two receive BDs, and there is a maximum of twenty transmit and twenty receive BDs. If this parameter is "NULL" a default value of 16 BDs will be used.
- offset
This is the fourteenth parameter passed to the driver in the init string.
This parameter defines the offset which is used to solve alignment problem.
- base address of buffer pool
This is the fifteenth parameter passed to the driver in the init string.
This parameter is used to notify the driver that space for the transmit and receive buffers need not be allocated, but should be taken from a private memory space provided by the user at the given address. The user should be aware that memory used for buffers must be 4-byte aligned but need not be non-cacheable. If this parameter is "NONE", space for buffers will be obtained by calling malloc( ) in iOlicomEndLoad( ).
- mem size of buffer pool
This is the sixteenth parameter passed to the driver in the init string.
The memory size parameter specifies the size of the pre-allocated memory region. If memory base is specified as NONE (-1), the driver ignores this parameter.
- Ethernet address
This parameter is obtained from the Card Information Structure on the Olicom PCMCIA card.
This driver requires three external support function:
- void sysLanIntEnable (int level)
This routine provides a target-specific interface for enabling Ethernet device interrupts at a specified interrupt level. This routine is called each time that the iOlicomStart( ) routine is called.
- void sysLanIntDisable (int level)
This routine provides a target-specific interface for disabling Ethernet device interrupts. The driver calls this routine from the iOlicomStop( ) routine each time a unit is disabled.
- void sysBusIntAck(void)
This routine acknowledge the interrupt if it's necessary.
iOlicomEnd, muxLib, endLib Intel 82595TX ISA/PCMCIA High Integration Ethernet Controller User Manual, Vadem VG-468 PC Card Socket Controller Data Manual.
iOlicomEndLoad( ) - initialize the driver and device
END_OBJ * iOlicomEndLoad ( 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 the initString.
This routine can be called in two modes. If it is called with an empty, but allocated string then it places the name of this device (i.e. oli) into the initString and returns 0.
If the string is allocated then the routine attempts to perform its load functionality.
An END object pointer or NULL on error or 0 and the name of the device if the initString was NULL.
iOlicomIntHandle( ) - interrupt service for card interrupts
void iOlicomIntHandle ( END_DEVICE * pDrvCtrl /* pointer to END_DEVICE structure */ )
This routine is called when an interrupt has been detected from the Olicom card.
N/A.