12 static inline void nsp32_write1(
unsigned int base,
16 outb(val, (base + index));
19 static inline unsigned char nsp32_read1(
unsigned int base,
22 return inb(base + index);
25 static inline void nsp32_write2(
unsigned int base,
29 outw(val, (base + index));
32 static inline unsigned short nsp32_read2(
unsigned int base,
35 return inw(base + index);
38 static inline void nsp32_write4(
unsigned int base,
42 outl(val, (base + index));
45 static inline unsigned long nsp32_read4(
unsigned int base,
48 return inl(base + index);
53 static inline void nsp32_mmio_write1(
unsigned long base,
57 volatile unsigned char *
ptr;
64 static inline unsigned char nsp32_mmio_read1(
unsigned long base,
67 volatile unsigned char *
ptr;
74 static inline void nsp32_mmio_write2(
unsigned long base,
78 volatile unsigned short *
ptr;
85 static inline unsigned short nsp32_mmio_read2(
unsigned long base,
88 volatile unsigned short *
ptr;
95 static inline void nsp32_mmio_write4(
unsigned long base,
99 volatile unsigned long *
ptr;
106 static inline unsigned long nsp32_mmio_read4(
unsigned long base,
109 volatile unsigned long *
ptr;
118 static inline unsigned char nsp32_index_read1(
unsigned int base,
125 static inline void nsp32_index_write1(
unsigned int base,
133 static inline unsigned short nsp32_index_read2(
unsigned int base,
140 static inline void nsp32_index_write2(
unsigned int base,
148 static inline unsigned long nsp32_index_read4(
unsigned int base,
157 return ((h << 16) | l);
160 static inline void nsp32_index_write4(
unsigned int base,
166 h = (val & 0xffff0000) >> 16;
167 l = (val & 0x0000ffff) >> 0;
176 static inline unsigned char nsp32_mmio_index_read1(
unsigned long base,
179 volatile unsigned short *index_ptr, *data_ptr;
185 return readb(data_ptr);
188 static inline void nsp32_mmio_index_write1(
unsigned long base,
192 volatile unsigned short *index_ptr, *data_ptr;
201 static inline unsigned short nsp32_mmio_index_read2(
unsigned long base,
204 volatile unsigned short *index_ptr, *data_ptr;
213 static inline void nsp32_mmio_index_write2(
unsigned long base,
217 volatile unsigned short *index_ptr, *data_ptr;
228 static inline void nsp32_multi_read4(
unsigned int base,
233 insl(base + reg, buf, count);
236 static inline void nsp32_fifo_read(
unsigned int base,
243 static inline void nsp32_multi_write4(
unsigned int base,
248 outsl(base + reg, buf, count);
251 static inline void nsp32_fifo_write(
unsigned int base,