diff options
author | Pannaga Bhushan <p.bhushan@samsung.com> | 2010-05-19 04:25:32 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 05:03:47 -0400 |
commit | ea5f50706385b61c1c0d24271bbe7c6e93129fbc (patch) | |
tree | adfec8fe237681382d9a267bee0fc609f70e5567 /arch/arm/mach-s5pv210/include | |
parent | 1131379b48228afb32fa626fb27586a02246acf9 (diff) |
ARM: S5PV210: Add GPIOlib support
This patch adds GPIOlib support for S5PV210.
Signed-off-by: Pannaga Bhushan <p.bhushan@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s5pv210/include')
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/gpio.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-s5pv210/include/mach/gpio.h index 533b020e21e9..d6461ba2b71d 100644 --- a/arch/arm/mach-s5pv210/include/mach/gpio.h +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #define gpio_cansleep __gpio_cansleep | 18 | #define gpio_cansleep __gpio_cansleep |
19 | #define gpio_to_irq __gpio_to_irq | 19 | #define gpio_to_irq __gpio_to_irq |
20 | 20 | ||
21 | /* Practically, GPIO banks upto MP03 are the configurable gpio banks */ | ||
22 | |||
21 | /* GPIO bank sizes */ | 23 | /* GPIO bank sizes */ |
22 | #define S5PV210_GPIO_A0_NR (8) | 24 | #define S5PV210_GPIO_A0_NR (8) |
23 | #define S5PV210_GPIO_A1_NR (4) | 25 | #define S5PV210_GPIO_A1_NR (4) |
@@ -47,6 +49,10 @@ | |||
47 | #define S5PV210_GPIO_J3_NR (8) | 49 | #define S5PV210_GPIO_J3_NR (8) |
48 | #define S5PV210_GPIO_J4_NR (5) | 50 | #define S5PV210_GPIO_J4_NR (5) |
49 | 51 | ||
52 | #define S5PV210_GPIO_MP01_NR (8) | ||
53 | #define S5PV210_GPIO_MP02_NR (4) | ||
54 | #define S5PV210_GPIO_MP03_NR (8) | ||
55 | |||
50 | /* GPIO bank numbers */ | 56 | /* GPIO bank numbers */ |
51 | 57 | ||
52 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra | 58 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra |
@@ -85,6 +91,9 @@ enum s5p_gpio_number { | |||
85 | S5PV210_GPIO_J2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J1), | 91 | S5PV210_GPIO_J2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J1), |
86 | S5PV210_GPIO_J3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J2), | 92 | S5PV210_GPIO_J3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J2), |
87 | S5PV210_GPIO_J4_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J3), | 93 | S5PV210_GPIO_J4_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J3), |
94 | S5PV210_GPIO_MP01_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J4), | ||
95 | S5PV210_GPIO_MP02_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP01), | ||
96 | S5PV210_GPIO_MP03_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP02), | ||
88 | }; | 97 | }; |
89 | 98 | ||
90 | /* S5PV210 GPIO number definitions */ | 99 | /* S5PV210 GPIO number definitions */ |
@@ -115,13 +124,16 @@ enum s5p_gpio_number { | |||
115 | #define S5PV210_GPJ2(_nr) (S5PV210_GPIO_J2_START + (_nr)) | 124 | #define S5PV210_GPJ2(_nr) (S5PV210_GPIO_J2_START + (_nr)) |
116 | #define S5PV210_GPJ3(_nr) (S5PV210_GPIO_J3_START + (_nr)) | 125 | #define S5PV210_GPJ3(_nr) (S5PV210_GPIO_J3_START + (_nr)) |
117 | #define S5PV210_GPJ4(_nr) (S5PV210_GPIO_J4_START + (_nr)) | 126 | #define S5PV210_GPJ4(_nr) (S5PV210_GPIO_J4_START + (_nr)) |
127 | #define S5PV210_MP01(_nr) (S5PV210_GPIO_MP01_START + (_nr)) | ||
128 | #define S5PV210_MP02(_nr) (S5PV210_GPIO_MP02_START + (_nr)) | ||
129 | #define S5PV210_MP03(_nr) (S5PV210_GPIO_MP03_START + (_nr)) | ||
118 | 130 | ||
119 | /* the end of the S5PV210 specific gpios */ | 131 | /* the end of the S5PV210 specific gpios */ |
120 | #define S5PV210_GPIO_END (S5PV210_GPJ4(S5PV210_GPIO_J4_NR) + 1) | 132 | #define S5PV210_GPIO_END (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + 1) |
121 | #define S3C_GPIO_END S5PV210_GPIO_END | 133 | #define S3C_GPIO_END S5PV210_GPIO_END |
122 | 134 | ||
123 | /* define the number of gpios we need to the one after the GPJ4() range */ | 135 | /* define the number of gpios we need to the one after the MP03() range */ |
124 | #define ARCH_NR_GPIOS (S5PV210_GPJ4(S5PV210_GPIO_J4_NR) + \ | 136 | #define ARCH_NR_GPIOS (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + \ |
125 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | 137 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) |
126 | 138 | ||
127 | #include <asm-generic/gpio.h> | 139 | #include <asm-generic/gpio.h> |