aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2006-09-18 18:23:07 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 05:25:47 -0400
commit72edd84a6b2db1a21d1ed07929cae560e276a0a6 (patch)
treeb67000e2bbf7447968c784cc3696a680ad66c47e /include/asm-arm
parent610300e8f4f833904096ca1233ffd9dbd73fb11f (diff)
[ARM] 3827/1: iop3xx: add common gpio module
Implement the gpio_line_{config,get,set} API for iop3xx. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-iop32x/iop321.h1
-rw-r--r--include/asm-arm/arch-iop33x/iop331.h1
-rw-r--r--include/asm-arm/hardware/iop3xx.h21
3 files changed, 23 insertions, 0 deletions
diff --git a/include/asm-arm/arch-iop32x/iop321.h b/include/asm-arm/arch-iop32x/iop321.h
index 34fe07f0a44e..1e57e0094767 100644
--- a/include/asm-arm/arch-iop32x/iop321.h
+++ b/include/asm-arm/arch-iop32x/iop321.h
@@ -216,6 +216,7 @@
216 * Peripherals that are shared between the iop32x and iop33x but 216 * Peripherals that are shared between the iop32x and iop33x but
217 * located at different addresses. 217 * located at different addresses.
218 */ 218 */
219#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c0 + (reg))
219#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg)) 220#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
220 221
221#include <asm/hardware/iop3xx.h> 222#include <asm/hardware/iop3xx.h>
diff --git a/include/asm-arm/arch-iop33x/iop331.h b/include/asm-arm/arch-iop33x/iop331.h
index 4ebcd7197c86..d12a95aa967a 100644
--- a/include/asm-arm/arch-iop33x/iop331.h
+++ b/include/asm-arm/arch-iop33x/iop331.h
@@ -221,6 +221,7 @@
221 * Peripherals that are shared between the iop32x and iop33x but 221 * Peripherals that are shared between the iop32x and iop33x but
222 * located at different addresses. 222 * located at different addresses.
223 */ 223 */
224#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780 + (reg))
224#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07d0 + (reg)) 225#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07d0 + (reg))
225 226
226#include <asm/hardware/iop3xx.h> 227#include <asm/hardware/iop3xx.h>
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h
index 98b7cbc405e6..f3c61d041fca 100644
--- a/include/asm-arm/hardware/iop3xx.h
+++ b/include/asm-arm/hardware/iop3xx.h
@@ -16,6 +16,22 @@
16#define __IOP3XX_H 16#define __IOP3XX_H
17 17
18/* 18/*
19 * IOP3XX GPIO handling
20 */
21#define GPIO_IN 0
22#define GPIO_OUT 1
23#define GPIO_LOW 0
24#define GPIO_HIGH 1
25#define IOP3XX_GPIO_LINE(x) (x)
26
27#ifndef __ASSEMBLY__
28extern void gpio_line_config(int line, int direction);
29extern int gpio_line_get(int line);
30extern void gpio_line_set(int line, int value);
31#endif
32
33
34/*
19 * IOP3XX processor registers 35 * IOP3XX processor registers
20 */ 36 */
21#define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000 37#define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000
@@ -81,6 +97,11 @@
81#define IOP3XX_PCIXSR (volatile u32 *)IOP3XX_REG_ADDR(0x01e4) 97#define IOP3XX_PCIXSR (volatile u32 *)IOP3XX_REG_ADDR(0x01e4)
82#define IOP3XX_PCIIRSR (volatile u32 *)IOP3XX_REG_ADDR(0x01ec) 98#define IOP3XX_PCIIRSR (volatile u32 *)IOP3XX_REG_ADDR(0x01ec)
83 99
100/* General Purpose I/O */
101#define IOP3XX_GPOE (volatile u32 *)IOP3XX_GPIO_REG(0x0004)
102#define IOP3XX_GPID (volatile u32 *)IOP3XX_GPIO_REG(0x0008)
103#define IOP3XX_GPOD (volatile u32 *)IOP3XX_GPIO_REG(0x000c)
104
84/* Timers */ 105/* Timers */
85#define IOP3XX_TU_TMR0 (volatile u32 *)IOP3XX_TIMER_REG(0x0000) 106#define IOP3XX_TU_TMR0 (volatile u32 *)IOP3XX_TIMER_REG(0x0000)
86#define IOP3XX_TU_TMR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0004) 107#define IOP3XX_TU_TMR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0004)