Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / drivers / staging / meilhaus / me8255_reg.h
1 /**
2  * @file me8255_reg.h
3  *
4  * @brief 8255 counter register definitions.
5  * @note Copyright (C) 2006 Meilhaus Electronic GmbH (support@meilhaus.de)
6  * @author Guenter Gebhardt
7  */
8
9 #ifndef _ME8255_REG_H_
10 #define _ME8255_REG_H_
11
12 #ifdef __KERNEL__
13
14 #define ME8255_NUMBER_CHANNELS          8               /**< The number of channels per 8255 port. */
15
16 #define ME1400AB_PORT_A_0                       0x0000  /**< Port 0 offset. */
17 #define ME1400AB_PORT_A_1                       0x0001  /**< Port 1 offset. */
18 #define ME1400AB_PORT_A_2                       0x0002  /**< Port 2 offset. */
19 #define ME1400AB_PORT_A_CTRL            0x0003  /**< Control register for 8255 A. */
20
21 #define ME1400AB_PORT_B_0                       0x0008  /**< Port 0 offset. */
22 #define ME1400AB_PORT_B_1                       0x0009  /**< Port 1 offset. */
23 #define ME1400AB_PORT_B_2                       0x000A  /**< Port 2 offset. */
24 #define ME1400AB_PORT_B_CTRL            0x000B  /**< Control register for 8255 B. */
25
26 #define ME1400CD_PORT_A_0                       0x0000  /**< Port 0 offset. */
27 #define ME1400CD_PORT_A_1                       0x0001  /**< Port 1 offset. */
28 #define ME1400CD_PORT_A_2                       0x0002  /**< Port 2 offset. */
29 #define ME1400CD_PORT_A_CTRL            0x0003  /**< Control register for 8255 A. */
30
31 #define ME1400CD_PORT_B_0                       0x0040  /**< Port 0 offset. */
32 #define ME1400CD_PORT_B_1                       0x0041  /**< Port 1 offset. */
33 #define ME1400CD_PORT_B_2                       0x0042  /**< Port 2 offset. */
34 #define ME1400CD_PORT_B_CTRL            0x0043  /**< Control register for 8255 B. */
35
36 #define ME8255_MODE_OOO                         0x80    /**< Port 2 = Output, Port 1 = Output, Port 0 = Output */
37 #define ME8255_MODE_IOO                         0x89    /**< Port 2 = Input,  Port 1 = Output, Port 0 = Output */
38 #define ME8255_MODE_OIO                         0x82    /**< Port 2 = Output, Port 1 = Input,  Port 0 = Output */
39 #define ME8255_MODE_IIO                         0x8B    /**< Port 2 = Input,  Port 1 = Input,  Port 0 = Output */
40 #define ME8255_MODE_OOI                         0x90    /**< Port 2 = Output, Port 1 = Output, Port 0 = Input */
41 #define ME8255_MODE_IOI                         0x99    /**< Port 2 = Input,  Port 1 = Output, Port 0 = Input */
42 #define ME8255_MODE_OII                         0x92    /**< Port 2 = Output, Port 1 = Input,  Port 0 = Input */
43 #define ME8255_MODE_III                         0x9B    /**< Port 2 = Input,  Port 1 = Input,  Port 0 = Input */
44
45 #define ME8255_PORT_0_OUTPUT            0x1             /**< If set in mirror then port 0 is in output mode. */
46 #define ME8255_PORT_1_OUTPUT            0x2             /**< If set in mirror then port 1 is in output mode. */
47 #define ME8255_PORT_2_OUTPUT            0x4             /**< If set in mirror then port 2 is in output mode. */
48
49 #endif
50 #endif