summaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-ks8695/regs-gpio.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-12 18:11:33 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-12 18:11:33 -0700
commitf7d02ae76ebbf5b8a9531fe150c49e126a397704 (patch)
treebcfdcab6e70658d55a3c843694e04e938bf9168f /include/asm-arm/arch-ks8695/regs-gpio.h
parent78db2ad6f4df9145bfd6aab1c0f1c56d615288ec (diff)
parent158304ef09a28c7f2dd37d78f536a4e09ba084a1 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits) [ARM] Use new get_irqnr_preamble [ARM] Ensure machine class menu is sorted alphabetically [ARM] 4333/2: KS8695: Micrel Development board [ARM] 4332/2: KS8695: Serial driver [ARM] 4331/3: Support for Micrel/Kendin KS8695 processor [ARM] 4371/1: AT91: Support for Atmel AT91SAM9RL-EK development board [ARM] 4372/1: Define byte sizes in asm-arm/sizes.h [ARM] 4370/3: AT91: Support for Atmel AT91SAM9RL processors. [ARM] Update mach-types [ARM] export symbol csum_partial_copy_from_user [ARM] iop13xx: msi support [ARM] stacktrace fix [ARM] Spinlock initializer cleanup [ARM] remove useless config option GENERIC_BUST_SPINLOCK [ARM] 4303/3: base kernel support for TI DaVinci [ARM] 4369/1: AT91: Fix circular dependency in header files [ARM] 4368/1: S3C24xx: build fix [ARM] 4364/1: AT91: LEDS on AT91SAM9261-EK [ARM] Fix iop32x/iop33x build [ARM] EBSA110: fix build errors caused by missing "const" ...
Diffstat (limited to 'include/asm-arm/arch-ks8695/regs-gpio.h')
-rw-r--r--include/asm-arm/arch-ks8695/regs-gpio.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/asm-arm/arch-ks8695/regs-gpio.h b/include/asm-arm/arch-ks8695/regs-gpio.h
new file mode 100644
index 000000000000..57fcf9fc82e4
--- /dev/null
+++ b/include/asm-arm/arch-ks8695/regs-gpio.h
@@ -0,0 +1,53 @@
+/*
+ * include/asm-arm/arch-ks8695/regs-gpio.h
+ *
+ * Copyright (C) 2007 Andrew Victor
+ *
+ * KS8695 - GPIO control registers and bit definitions.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef KS8695_GPIO_H
+#define KS8695_GPIO_H
+
+#define KS8695_GPIO_OFFSET (0xF0000 + 0xE600)
+#define KS8695_GPIO_VA (KS8695_IO_VA + KS8695_GPIO_OFFSET)
+#define KS8695_GPIO_PA (KS8695_IO_PA + KS8695_GPIO_OFFSET)
+
+
+#define KS8695_IOPM (0x00) /* I/O Port Mode Register */
+#define KS8695_IOPC (0x04) /* I/O Port Control Register */
+#define KS8695_IOPD (0x08) /* I/O Port Data Register */
+
+
+/* Port Mode Register */
+#define IOPM_(x) (1 << (x)) /* Mode for GPIO Pin x */
+
+/* Port Control Register */
+#define IOPC_IOTIM1EN (1 << 17) /* GPIO Pin for Timer1 Enable */
+#define IOPC_IOTIM0EN (1 << 16) /* GPIO Pin for Timer0 Enable */
+#define IOPC_IOEINT3EN (1 << 15) /* GPIO Pin for External/Soft Interrupt 3 Enable */
+#define IOPC_IOEINT3TM (7 << 12) /* GPIO Pin for External/Soft Interrupt 3 Trigger Mode */
+#define IOPC_IOEINT3_MODE(x) ((x) << 12)
+#define IOPC_IOEINT2EN (1 << 11) /* GPIO Pin for External/Soft Interrupt 2 Enable */
+#define IOPC_IOEINT2TM (7 << 8) /* GPIO Pin for External/Soft Interrupt 2 Trigger Mode */
+#define IOPC_IOEINT2_MODE(x) ((x) << 8)
+#define IOPC_IOEINT1EN (1 << 7) /* GPIO Pin for External/Soft Interrupt 1 Enable */
+#define IOPC_IOEINT1TM (7 << 4) /* GPIO Pin for External/Soft Interrupt 1 Trigger Mode */
+#define IOPC_IOEINT1_MODE(x) ((x) << 4)
+#define IOPC_IOEINT0EN (1 << 3) /* GPIO Pin for External/Soft Interrupt 0 Enable */
+#define IOPC_IOEINT0TM (7 << 0) /* GPIO Pin for External/Soft Interrupt 0 Trigger Mode */
+#define IOPC_IOEINT0_MODE(x) ((x) << 0)
+
+ /* Trigger Modes */
+#define IOPC_TM_LOW (0) /* Level Detection (Active Low) */
+#define IOPC_TM_HIGH (1) /* Level Detection (Active High) */
+#define IOPC_TM_RISING (2) /* Rising Edge Detection */
+#define IOPC_TM_FALLING (4) /* Falling Edge Detection */
+#define IOPC_TM_EDGE (6) /* Both Edge Detection */
+
+
+#endif