Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
vme_pio2.h File Reference

Go to the source code of this file.

Data Structures

struct  pio2_io_bank
 
struct  pio2_cntr
 
struct  pio2_card
 

Macros

#define PIO2_CARDS_MAX   32
 
#define PIO2_VARIANT_LENGTH   5
 
#define PIO2_NUM_CHANNELS   32
 
#define PIO2_NUM_IRQS   11
 
#define PIO2_NUM_CNTRS   6
 
#define PIO2_REGS_SIZE   0x40
 
#define PIO2_REGS_DATA0   0x0
 
#define PIO2_REGS_DATA1   0x1
 
#define PIO2_REGS_DATA2   0x2
 
#define PIO2_REGS_DATA3   0x3
 
#define PIO2_REGS_INT_STAT0   0x8
 
#define PIO2_REGS_INT_STAT1   0x9
 
#define PIO2_REGS_INT_STAT2   0xa
 
#define PIO2_REGS_INT_STAT3   0xb
 
#define PIO2_REGS_INT_STAT_CNTR   0xc
 
#define PIO2_REGS_INT_MASK0   0x10
 
#define PIO2_REGS_INT_MASK1   0x11
 
#define PIO2_REGS_INT_MASK2   0x12
 
#define PIO2_REGS_INT_MASK3   0x13
 
#define PIO2_REGS_INT_MASK4   0x14
 
#define PIO2_REGS_INT_MASK5   0x15
 
#define PIO2_REGS_INT_MASK6   0x16
 
#define PIO2_REGS_INT_MASK7   0x17
 
#define PIO2_REGS_CTRL   0x18
 
#define PIO2_REGS_VME_VECTOR   0x19
 
#define PIO2_REGS_CNTR0   0x20
 
#define PIO2_REGS_CNTR1   0x22
 
#define PIO2_REGS_CNTR2   0x24
 
#define PIO2_REGS_CTRL_WRD0   0x26
 
#define PIO2_REGS_CNTR3   0x28
 
#define PIO2_REGS_CNTR4   0x2a
 
#define PIO2_REGS_CNTR5   0x2c
 
#define PIO2_REGS_CTRL_WRD1   0x2e
 
#define PIO2_REGS_ID   0x30
 
#define PIO2_CHANNEL0_BIT   (1 << 0)
 
#define PIO2_CHANNEL1_BIT   (1 << 1)
 
#define PIO2_CHANNEL2_BIT   (1 << 2)
 
#define PIO2_CHANNEL3_BIT   (1 << 3)
 
#define PIO2_CHANNEL4_BIT   (1 << 4)
 
#define PIO2_CHANNEL5_BIT   (1 << 5)
 
#define PIO2_CHANNEL6_BIT   (1 << 6)
 
#define PIO2_CHANNEL7_BIT   (1 << 7)
 
#define PIO2_CHANNEL8_BIT   (1 << 0)
 
#define PIO2_CHANNEL9_BIT   (1 << 1)
 
#define PIO2_CHANNEL10_BIT   (1 << 2)
 
#define PIO2_CHANNEL11_BIT   (1 << 3)
 
#define PIO2_CHANNEL12_BIT   (1 << 4)
 
#define PIO2_CHANNEL13_BIT   (1 << 5)
 
#define PIO2_CHANNEL14_BIT   (1 << 6)
 
#define PIO2_CHANNEL15_BIT   (1 << 7)
 
#define PIO2_CHANNEL16_BIT   (1 << 0)
 
#define PIO2_CHANNEL17_BIT   (1 << 1)
 
#define PIO2_CHANNEL18_BIT   (1 << 2)
 
#define PIO2_CHANNEL19_BIT   (1 << 3)
 
#define PIO2_CHANNEL20_BIT   (1 << 4)
 
#define PIO2_CHANNEL21_BIT   (1 << 5)
 
#define PIO2_CHANNEL22_BIT   (1 << 6)
 
#define PIO2_CHANNEL23_BIT   (1 << 7)
 
#define PIO2_CHANNEL24_BIT   (1 << 0)
 
#define PIO2_CHANNEL25_BIT   (1 << 1)
 
#define PIO2_CHANNEL26_BIT   (1 << 2)
 
#define PIO2_CHANNEL27_BIT   (1 << 3)
 
#define PIO2_CHANNEL28_BIT   (1 << 4)
 
#define PIO2_CHANNEL29_BIT   (1 << 5)
 
#define PIO2_CHANNEL30_BIT   (1 << 6)
 
#define PIO2_CHANNEL31_BIT   (1 << 7)
 
#define PIO2_COUNTER0   (1 << 0)
 
#define PIO2_COUNTER1   (1 << 1)
 
#define PIO2_COUNTER2   (1 << 2)
 
#define PIO2_COUNTER3   (1 << 3)
 
#define PIO2_COUNTER4   (1 << 4)
 
#define PIO2_COUNTER5   (1 << 5)
 
#define PIO2_VME_INT_MASK   0x7
 
#define PIO2_LED   (1 << 6)
 
#define PIO2_LOOP   (1 << 7)
 
#define PIO2_VME_VECTOR_SPUR   0x0
 
#define PIO2_VME_VECTOR_BANK0   0x1
 
#define PIO2_VME_VECTOR_BANK1   0x2
 
#define PIO2_VME_VECTOR_BANK2   0x3
 
#define PIO2_VME_VECTOR_BANK3   0x4
 
#define PIO2_VME_VECTOR_CNTR0   0x5
 
#define PIO2_VME_VECTOR_CNTR1   0x6
 
#define PIO2_VME_VECTOR_CNTR2   0x7
 
#define PIO2_VME_VECTOR_CNTR3   0x8
 
#define PIO2_VME_VECTOR_CNTR4   0x9
 
#define PIO2_VME_VECTOR_CNTR5   0xa
 
#define PIO2_VME_VECTOR_MASK   0xf0
 
#define PIO2_CNTR_SC_DEV0   0
 
#define PIO2_CNTR_SC_DEV1   (1 << 6)
 
#define PIO2_CNTR_SC_DEV2   (2 << 6)
 
#define PIO2_CNTR_SC_RDBACK   (3 << 6)
 
#define PIO2_CNTR_RW_LATCH   0
 
#define PIO2_CNTR_RW_LSB   (1 << 4)
 
#define PIO2_CNTR_RW_MSB   (2 << 4)
 
#define PIO2_CNTR_RW_BOTH   (3 << 4)
 
#define PIO2_CNTR_MODE0   0
 
#define PIO2_CNTR_MODE1   (1 << 1)
 
#define PIO2_CNTR_MODE2   (2 << 1)
 
#define PIO2_CNTR_MODE3   (3 << 1)
 
#define PIO2_CNTR_MODE4   (4 << 1)
 
#define PIO2_CNTR_MODE5   (5 << 1)
 
#define PIO2_CNTR_BCD   1
 

Enumerations

enum  pio2_bank_config { NOFIT, INPUT, OUTPUT, BOTH }
 
enum  pio2_int_config { NONE = 0, LOW2HIGH = 1, HIGH2LOW = 2, EITHER = 4 }
 

Functions

int pio2_cntr_reset (struct pio2_card *)
 
int pio2_gpio_reset (struct pio2_card *)
 
int __devinit pio2_gpio_init (struct pio2_card *)
 
void pio2_gpio_exit (struct pio2_card *)
 

Macro Definition Documentation

#define PIO2_CARDS_MAX   32

Definition at line 4 of file vme_pio2.h.

#define PIO2_CHANNEL0_BIT   (1 << 0)

Definition at line 74 of file vme_pio2.h.

#define PIO2_CHANNEL10_BIT   (1 << 2)

Definition at line 84 of file vme_pio2.h.

#define PIO2_CHANNEL11_BIT   (1 << 3)

Definition at line 85 of file vme_pio2.h.

#define PIO2_CHANNEL12_BIT   (1 << 4)

Definition at line 86 of file vme_pio2.h.

#define PIO2_CHANNEL13_BIT   (1 << 5)

Definition at line 87 of file vme_pio2.h.

#define PIO2_CHANNEL14_BIT   (1 << 6)

Definition at line 88 of file vme_pio2.h.

#define PIO2_CHANNEL15_BIT   (1 << 7)

Definition at line 89 of file vme_pio2.h.

#define PIO2_CHANNEL16_BIT   (1 << 0)

Definition at line 90 of file vme_pio2.h.

#define PIO2_CHANNEL17_BIT   (1 << 1)

Definition at line 91 of file vme_pio2.h.

#define PIO2_CHANNEL18_BIT   (1 << 2)

Definition at line 92 of file vme_pio2.h.

#define PIO2_CHANNEL19_BIT   (1 << 3)

Definition at line 93 of file vme_pio2.h.

#define PIO2_CHANNEL1_BIT   (1 << 1)

Definition at line 75 of file vme_pio2.h.

#define PIO2_CHANNEL20_BIT   (1 << 4)

Definition at line 94 of file vme_pio2.h.

#define PIO2_CHANNEL21_BIT   (1 << 5)

Definition at line 95 of file vme_pio2.h.

#define PIO2_CHANNEL22_BIT   (1 << 6)

Definition at line 96 of file vme_pio2.h.

#define PIO2_CHANNEL23_BIT   (1 << 7)

Definition at line 97 of file vme_pio2.h.

#define PIO2_CHANNEL24_BIT   (1 << 0)

Definition at line 98 of file vme_pio2.h.

#define PIO2_CHANNEL25_BIT   (1 << 1)

Definition at line 99 of file vme_pio2.h.

#define PIO2_CHANNEL26_BIT   (1 << 2)

Definition at line 100 of file vme_pio2.h.

#define PIO2_CHANNEL27_BIT   (1 << 3)

Definition at line 101 of file vme_pio2.h.

#define PIO2_CHANNEL28_BIT   (1 << 4)

Definition at line 102 of file vme_pio2.h.

#define PIO2_CHANNEL29_BIT   (1 << 5)

Definition at line 103 of file vme_pio2.h.

#define PIO2_CHANNEL2_BIT   (1 << 2)

Definition at line 76 of file vme_pio2.h.

#define PIO2_CHANNEL30_BIT   (1 << 6)

Definition at line 104 of file vme_pio2.h.

#define PIO2_CHANNEL31_BIT   (1 << 7)

Definition at line 105 of file vme_pio2.h.

#define PIO2_CHANNEL3_BIT   (1 << 3)

Definition at line 77 of file vme_pio2.h.

#define PIO2_CHANNEL4_BIT   (1 << 4)

Definition at line 78 of file vme_pio2.h.

#define PIO2_CHANNEL5_BIT   (1 << 5)

Definition at line 79 of file vme_pio2.h.

#define PIO2_CHANNEL6_BIT   (1 << 6)

Definition at line 80 of file vme_pio2.h.

#define PIO2_CHANNEL7_BIT   (1 << 7)

Definition at line 81 of file vme_pio2.h.

#define PIO2_CHANNEL8_BIT   (1 << 0)

Definition at line 82 of file vme_pio2.h.

#define PIO2_CHANNEL9_BIT   (1 << 1)

Definition at line 83 of file vme_pio2.h.

#define PIO2_CNTR_BCD   1

Definition at line 205 of file vme_pio2.h.

#define PIO2_CNTR_MODE0   0

Definition at line 198 of file vme_pio2.h.

#define PIO2_CNTR_MODE1   (1 << 1)

Definition at line 199 of file vme_pio2.h.

#define PIO2_CNTR_MODE2   (2 << 1)

Definition at line 200 of file vme_pio2.h.

#define PIO2_CNTR_MODE3   (3 << 1)

Definition at line 201 of file vme_pio2.h.

#define PIO2_CNTR_MODE4   (4 << 1)

Definition at line 202 of file vme_pio2.h.

#define PIO2_CNTR_MODE5   (5 << 1)

Definition at line 203 of file vme_pio2.h.

#define PIO2_CNTR_RW_BOTH   (3 << 4)

Definition at line 196 of file vme_pio2.h.

#define PIO2_CNTR_RW_LATCH   0

Definition at line 193 of file vme_pio2.h.

#define PIO2_CNTR_RW_LSB   (1 << 4)

Definition at line 194 of file vme_pio2.h.

#define PIO2_CNTR_RW_MSB   (2 << 4)

Definition at line 195 of file vme_pio2.h.

#define PIO2_CNTR_SC_DEV0   0

Definition at line 184 of file vme_pio2.h.

#define PIO2_CNTR_SC_DEV1   (1 << 6)

Definition at line 185 of file vme_pio2.h.

#define PIO2_CNTR_SC_DEV2   (2 << 6)

Definition at line 186 of file vme_pio2.h.

#define PIO2_CNTR_SC_RDBACK   (3 << 6)

Definition at line 187 of file vme_pio2.h.

#define PIO2_COUNTER0   (1 << 0)

Definition at line 126 of file vme_pio2.h.

#define PIO2_COUNTER1   (1 << 1)

Definition at line 127 of file vme_pio2.h.

#define PIO2_COUNTER2   (1 << 2)

Definition at line 128 of file vme_pio2.h.

#define PIO2_COUNTER3   (1 << 3)

Definition at line 129 of file vme_pio2.h.

#define PIO2_COUNTER4   (1 << 4)

Definition at line 130 of file vme_pio2.h.

#define PIO2_COUNTER5   (1 << 5)

Definition at line 131 of file vme_pio2.h.

#define PIO2_LED   (1 << 6)

Definition at line 139 of file vme_pio2.h.

#define PIO2_LOOP   (1 << 7)

Definition at line 140 of file vme_pio2.h.

#define PIO2_NUM_CHANNELS   32

Definition at line 8 of file vme_pio2.h.

#define PIO2_NUM_CNTRS   6

Definition at line 10 of file vme_pio2.h.

#define PIO2_NUM_IRQS   11

Definition at line 9 of file vme_pio2.h.

#define PIO2_REGS_CNTR0   0x20

Definition at line 55 of file vme_pio2.h.

#define PIO2_REGS_CNTR1   0x22

Definition at line 56 of file vme_pio2.h.

#define PIO2_REGS_CNTR2   0x24

Definition at line 57 of file vme_pio2.h.

#define PIO2_REGS_CNTR3   0x28

Definition at line 59 of file vme_pio2.h.

#define PIO2_REGS_CNTR4   0x2a

Definition at line 60 of file vme_pio2.h.

#define PIO2_REGS_CNTR5   0x2c

Definition at line 61 of file vme_pio2.h.

#define PIO2_REGS_CTRL   0x18

Definition at line 53 of file vme_pio2.h.

#define PIO2_REGS_CTRL_WRD0   0x26

Definition at line 58 of file vme_pio2.h.

#define PIO2_REGS_CTRL_WRD1   0x2e

Definition at line 62 of file vme_pio2.h.

#define PIO2_REGS_DATA0   0x0

Definition at line 14 of file vme_pio2.h.

#define PIO2_REGS_DATA1   0x1

Definition at line 15 of file vme_pio2.h.

#define PIO2_REGS_DATA2   0x2

Definition at line 16 of file vme_pio2.h.

#define PIO2_REGS_DATA3   0x3

Definition at line 17 of file vme_pio2.h.

#define PIO2_REGS_ID   0x30

Definition at line 64 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK0   0x10

Definition at line 33 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK1   0x11

Definition at line 34 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK2   0x12

Definition at line 35 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK3   0x13

Definition at line 36 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK4   0x14

Definition at line 37 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK5   0x15

Definition at line 38 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK6   0x16

Definition at line 39 of file vme_pio2.h.

#define PIO2_REGS_INT_MASK7   0x17

Definition at line 40 of file vme_pio2.h.

#define PIO2_REGS_INT_STAT0   0x8

Definition at line 22 of file vme_pio2.h.

#define PIO2_REGS_INT_STAT1   0x9

Definition at line 23 of file vme_pio2.h.

#define PIO2_REGS_INT_STAT2   0xa

Definition at line 24 of file vme_pio2.h.

#define PIO2_REGS_INT_STAT3   0xb

Definition at line 25 of file vme_pio2.h.

#define PIO2_REGS_INT_STAT_CNTR   0xc

Definition at line 32 of file vme_pio2.h.

#define PIO2_REGS_SIZE   0x40

Definition at line 12 of file vme_pio2.h.

#define PIO2_REGS_VME_VECTOR   0x19

Definition at line 54 of file vme_pio2.h.

#define PIO2_VARIANT_LENGTH   5

Definition at line 6 of file vme_pio2.h.

#define PIO2_VME_INT_MASK   0x7

Definition at line 138 of file vme_pio2.h.

#define PIO2_VME_VECTOR_BANK0   0x1

Definition at line 144 of file vme_pio2.h.

#define PIO2_VME_VECTOR_BANK1   0x2

Definition at line 145 of file vme_pio2.h.

#define PIO2_VME_VECTOR_BANK2   0x3

Definition at line 146 of file vme_pio2.h.

#define PIO2_VME_VECTOR_BANK3   0x4

Definition at line 147 of file vme_pio2.h.

#define PIO2_VME_VECTOR_CNTR0   0x5

Definition at line 148 of file vme_pio2.h.

#define PIO2_VME_VECTOR_CNTR1   0x6

Definition at line 149 of file vme_pio2.h.

#define PIO2_VME_VECTOR_CNTR2   0x7

Definition at line 150 of file vme_pio2.h.

#define PIO2_VME_VECTOR_CNTR3   0x8

Definition at line 151 of file vme_pio2.h.

#define PIO2_VME_VECTOR_CNTR4   0x9

Definition at line 152 of file vme_pio2.h.

#define PIO2_VME_VECTOR_CNTR5   0xa

Definition at line 153 of file vme_pio2.h.

#define PIO2_VME_VECTOR_MASK   0xf0

Definition at line 155 of file vme_pio2.h.

#define PIO2_VME_VECTOR_SPUR   0x0

Definition at line 143 of file vme_pio2.h.

Enumeration Type Documentation

Enumerator:
NOFIT 
INPUT 
OUTPUT 
BOTH 

Definition at line 209 of file vme_pio2.h.

Enumerator:
NONE 
LOW2HIGH 
HIGH2LOW 
EITHER 

Definition at line 210 of file vme_pio2.h.

Function Documentation

int pio2_cntr_reset ( struct pio2_card )

Definition at line 47 of file vme_pio2_cntr.c.

void pio2_gpio_exit ( struct pio2_card )

Definition at line 222 of file vme_pio2_gpio.c.

int __devinit pio2_gpio_init ( struct pio2_card )

Definition at line 189 of file vme_pio2_gpio.c.

int pio2_gpio_reset ( struct pio2_card )

Definition at line 144 of file vme_pio2_gpio.c.