man4/ksc2915

Table of Contents

Name

ksc2915 - KSC 2915 device driver

Synopsis

KSC2915

Description

Device driver for Kinetic Systems 2915 PCI/CAMAC interface. This driver uses the IOTRANS and IODATA structures.

This driver is compiled in three versions.

The version for the Linux 2.0.x kernel is called f_ksc2915_20.o.

The version for the Linux 2.2.x kernel is called f_ksc2915_22.o.

The version for the Linux 2.4.x kernel is called f_ksc2915_24.o.

CAMAC I/O modes

CAMnrm

CAMAC normal I/O mode.
CAMscan

CAMAC scanned I/O mode.
CAMrpt

CAMAC repeat until Q is true mode. IOTRANS.Count is used for the number of times to repeat transaction. IOTRANS.Rcnt is used for the number of times transaction is actually repeated. The transactions is repeated until Q becomes true or Count is reached. The maximum value of Count is checked by the driver and is presently set at 10000.
The I/O list for this mode requires one IOTRANS and one IODATA. Operations involving data transfer use the value of IODATA.Current. The same IODATA is used each time.
CAMstop

CAMAC repeat until Q is false mode.
CAMdma_Qscan

DMA style CAMscan operation.
CAMdma_Qstop

DMA style CAMstop operation.
CAMdma_Qrpt

This mode is not implemented.
CAMdma_Qign

This mode is not implemented.

ioctl functions

These are the supported ioctl() function codes. Each ioctl() call is made using one of the listed codes. A pointer to a variable of type CAMAC_IOC is passed to the driver.

The crate(8) program provides an interface to many of these function codes.

CAMioRST

not used with 2915.
CAMioRINTcsr

read 2915 csr
CAMioRINTmcr

not used in 2915
CAMioRINTssr

read 2915 ssr
CAMioRINTtcr

read 2915 tcr
CAMioDOz

do crate initialize
CAMioDOc

do crate clear
CAMioINHset

set inhibit
CAMioINHclr

clear inhibit
CAMioREADcsr

read CSR reg
CAMioREADpat

read lam pattern reg
CAMioREADmask

read lam mask reg
CAMioRSTRcc

restore crate controller context
CAMioDIAGminor

read minor table
CAMioDIAGcrate

get crate 0 LAM table
CAMioDIAGcrate + <crate> gets information for crates 0 to 7

LAM ioctl functions

In addition to the functions described above these functions are provided to facilitate LAM service.
CAMioLAMset

subscribe to a LAM.
CAMioLAMclr

clear a LAM.

Module installation

The module is installed by insmod(8) .

The major device number may be set when the module is installed by "major=<major_dev_number>". The major device number defaults to 70 if not specified.

The interrupt number may be set when the module is installed by "interrupt=<int_number>". See the NOTES section below.

For example:
   /sbin/insmod f_ksc2915mod_20.o major=80

Nine device nodes need to be added to /dev for this device. Minor numbers 0-7 are used for LAM service. Minor number 255 is used for normal I/O service.

For example:
   mknod /dev/camaclam0 c 70 0

   mknod /dev/camaclam1 c 70 1

   mknod /dev/camaclam2 c 70 2

   mknod /dev/camaclam3 c 70 3

   mknod /dev/camaclam4 c 70 4

   mknod /dev/camaclam5 c 70 5

   mknod /dev/camaclam6 c 70 6

   mknod /dev/camaclam7 c 70 7

   mknod /dev/camac c 70 255

After the nodes are made write permissions should be changed as follows:
   chmod 666 /dev/camaclam0

   chmod 666 /dev/camaclam1

   chmod 666 /dev/camaclam2

   chmod 666 /dev/camaclam3

   chmod 666 /dev/camaclam4

   chmod 666 /dev/camaclam5

   chmod 666 /dev/camaclam6

   chmod 666 /dev/camaclam7

   chmod 666 /dev/camac

Notes

The interrupt module parameter was added because on certain boxes containing multiple pci busses the driver fails to detect the interrupt number correctly.

This is caused by not using the OS services properly to get this information and should be fixed. However, there isn’t time to fix this right now so we will do it this way for now.

If the card doesn’t process interrupts the best thing to do is cat /proc/interrupts, find the card in the list and note what interrupt the OS thinks it should be using, then add the interrupt directive to the command line when doing insmod or modprobe.

Manual page revision

$Id: ksc2915.4,v 1.4 2003/01/28 21:58:04 kitchen Exp $


Table of Contents