aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/meilhaus/me8255_reg.h
diff options
context:
space:
mode:
authormerge <null@invalid>2009-01-22 13:55:32 +0000
committerAndy Green <agreen@octopus.localdomain>2009-01-22 13:55:32 +0000
commitaa6f5ffbdba45aa8e19e5048648fc6c7b25376d3 (patch)
treefbb786d0ac6f8a774fd834e9ce951197e60fbffa /drivers/staging/meilhaus/me8255_reg.h
parentf2d78193eae5dccd3d588d2c8ea0866efc368332 (diff)
MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141
pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/staging/meilhaus/me8255_reg.h')
-rw-r--r--drivers/staging/meilhaus/me8255_reg.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/staging/meilhaus/me8255_reg.h b/drivers/staging/meilhaus/me8255_reg.h
new file mode 100644
index 00000000000..d1dea1a447f
--- /dev/null
+++ b/drivers/staging/meilhaus/me8255_reg.h
@@ -0,0 +1,50 @@
+/**
+ * @file me8255_reg.h
+ *
+ * @brief 8255 counter register definitions.
+ * @note Copyright (C) 2006 Meilhaus Electronic GmbH (support@meilhaus.de)
+ * @author Guenter Gebhardt
+ */
+
+#ifndef _ME8255_REG_H_
+#define _ME8255_REG_H_
+
+#ifdef __KERNEL__
+
+#define ME8255_NUMBER_CHANNELS 8 /**< The number of channels per 8255 port. */
+
+#define ME1400AB_PORT_A_0 0x0000 /**< Port 0 offset. */
+#define ME1400AB_PORT_A_1 0x0001 /**< Port 1 offset. */
+#define ME1400AB_PORT_A_2 0x0002 /**< Port 2 offset. */
+#define ME1400AB_PORT_A_CTRL 0x0003 /**< Control register for 8255 A. */
+
+#define ME1400AB_PORT_B_0 0x0008 /**< Port 0 offset. */
+#define ME1400AB_PORT_B_1 0x0009 /**< Port 1 offset. */
+#define ME1400AB_PORT_B_2 0x000A /**< Port 2 offset. */
+#define ME1400AB_PORT_B_CTRL 0x000B /**< Control register for 8255 B. */
+
+#define ME1400CD_PORT_A_0 0x0000 /**< Port 0 offset. */
+#define ME1400CD_PORT_A_1 0x0001 /**< Port 1 offset. */
+#define ME1400CD_PORT_A_2 0x0002 /**< Port 2 offset. */
+#define ME1400CD_PORT_A_CTRL 0x0003 /**< Control register for 8255 A. */
+
+#define ME1400CD_PORT_B_0 0x0040 /**< Port 0 offset. */
+#define ME1400CD_PORT_B_1 0x0041 /**< Port 1 offset. */
+#define ME1400CD_PORT_B_2 0x0042 /**< Port 2 offset. */
+#define ME1400CD_PORT_B_CTRL 0x0043 /**< Control register for 8255 B. */
+
+#define ME8255_MODE_OOO 0x80 /**< Port 2 = Output, Port 1 = Output, Port 0 = Output */
+#define ME8255_MODE_IOO 0x89 /**< Port 2 = Input, Port 1 = Output, Port 0 = Output */
+#define ME8255_MODE_OIO 0x82 /**< Port 2 = Output, Port 1 = Input, Port 0 = Output */
+#define ME8255_MODE_IIO 0x8B /**< Port 2 = Input, Port 1 = Input, Port 0 = Output */
+#define ME8255_MODE_OOI 0x90 /**< Port 2 = Output, Port 1 = Output, Port 0 = Input */
+#define ME8255_MODE_IOI 0x99 /**< Port 2 = Input, Port 1 = Output, Port 0 = Input */
+#define ME8255_MODE_OII 0x92 /**< Port 2 = Output, Port 1 = Input, Port 0 = Input */
+#define ME8255_MODE_III 0x9B /**< Port 2 = Input, Port 1 = Input, Port 0 = Input */
+
+#define ME8255_PORT_0_OUTPUT 0x1 /**< If set in mirror then port 0 is in output mode. */
+#define ME8255_PORT_1_OUTPUT 0x2 /**< If set in mirror then port 1 is in output mode. */
+#define ME8255_PORT_2_OUTPUT 0x4 /**< If set in mirror then port 2 is in output mode. */
+
+#endif
+#endif