diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 13:09:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 13:09:45 -0400 |
commit | 7cc4e87f912bbefa440a51856b8d076e5d1f554a (patch) | |
tree | 1b8df8683f3de37d2e8211ffa8d151f60d59af62 /arch/arm/mach-ks8695/gpio.c | |
parent | 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1 (diff) | |
parent | 69fc7eed5f56bce15b239e5110de2575a6970df4 (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: (236 commits)
[ARM] 5300/1: fixup spitz reset during boot
[ARM] 5295/1: make ZONE_DMA optional
[ARM] 5239/1: Palm Zire 72 power management support
[ARM] 5298/1: Drop desc_handle_irq()
[ARM] 5297/1: [KS8695] Fix two compile-time warnings
[ARM] 5296/1: [KS8695] Replace macro's with trailing underscores.
[ARM] pxa: allow multi-machine PCMCIA builds
[ARM] pxa: add preliminary CPUFREQ support for PXA3xx
[ARM] pxa: add missing ACCR bit definitions to pxa3xx-regs.h
[ARM] pxa: rename cpu-pxa.c to cpufreq-pxa2xx.c
[ARM] pxa/zylonite: add support for USB OHCI
[ARM] ohci-pxa27x: use ioremap() and offset for register access
[ARM] ohci-pxa27x: introduce pxa27x_clear_otgph()
[ARM] ohci-pxa27x: use platform_get_{irq,resource} for the resource
[ARM] ohci-pxa27x: move OHCI controller specific registers into the driver
[ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers
[ARM] pxa: move I2S register and bit definitions into pxa2xx-i2s.c
[ARM] pxa: simplify DMA register definitions
[ARM] pxa: make additional DCSR bits valid for PXA3xx
[ARM] pxa: move i2c register and bit definitions into i2c-pxa.c
...
Fixed up conflicts in
arch/arm/mach-versatile/core.c
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-i2s.c
manually.
Diffstat (limited to 'arch/arm/mach-ks8695/gpio.c')
-rw-r--r-- | arch/arm/mach-ks8695/gpio.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c index 3624e65cd89b..9aecf0c4b8b1 100644 --- a/arch/arm/mach-ks8695/gpio.c +++ b/arch/arm/mach-ks8695/gpio.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <linux/debugfs.h> | 23 | #include <linux/debugfs.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/io.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | ||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
30 | 30 | ||
@@ -72,7 +72,7 @@ int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type) | |||
72 | 72 | ||
73 | /* set pin as input */ | 73 | /* set pin as input */ |
74 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | 74 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); |
75 | x &= ~IOPM_(pin); | 75 | x &= ~IOPM(pin); |
76 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); | 76 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); |
77 | 77 | ||
78 | local_irq_restore(flags); | 78 | local_irq_restore(flags); |
@@ -108,7 +108,7 @@ int __init_or_module gpio_direction_input(unsigned int pin) | |||
108 | 108 | ||
109 | /* set pin as input */ | 109 | /* set pin as input */ |
110 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | 110 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); |
111 | x &= ~IOPM_(pin); | 111 | x &= ~IOPM(pin); |
112 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); | 112 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); |
113 | 113 | ||
114 | local_irq_restore(flags); | 114 | local_irq_restore(flags); |
@@ -136,14 +136,14 @@ int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state) | |||
136 | /* set line state */ | 136 | /* set line state */ |
137 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | 137 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); |
138 | if (state) | 138 | if (state) |
139 | x |= (1 << pin); | 139 | x |= IOPD(pin); |
140 | else | 140 | else |
141 | x &= ~(1 << pin); | 141 | x &= ~IOPD(pin); |
142 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD); | 142 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD); |
143 | 143 | ||
144 | /* set pin as output */ | 144 | /* set pin as output */ |
145 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); | 145 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM); |
146 | x |= IOPM_(pin); | 146 | x |= IOPM(pin); |
147 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); | 147 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM); |
148 | 148 | ||
149 | local_irq_restore(flags); | 149 | local_irq_restore(flags); |
@@ -168,9 +168,9 @@ void gpio_set_value(unsigned int pin, unsigned int state) | |||
168 | /* set output line state */ | 168 | /* set output line state */ |
169 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | 169 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); |
170 | if (state) | 170 | if (state) |
171 | x |= (1 << pin); | 171 | x |= IOPD(pin); |
172 | else | 172 | else |
173 | x &= ~(1 << pin); | 173 | x &= ~IOPD(pin); |
174 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD); | 174 | __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD); |
175 | 175 | ||
176 | local_irq_restore(flags); | 176 | local_irq_restore(flags); |
@@ -189,7 +189,7 @@ int gpio_get_value(unsigned int pin) | |||
189 | return -EINVAL; | 189 | return -EINVAL; |
190 | 190 | ||
191 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | 191 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); |
192 | return (x & (1 << pin)) != 0; | 192 | return (x & IOPD(pin)) != 0; |
193 | } | 193 | } |
194 | EXPORT_SYMBOL(gpio_get_value); | 194 | EXPORT_SYMBOL(gpio_get_value); |
195 | 195 | ||
@@ -240,7 +240,7 @@ static int ks8695_gpio_show(struct seq_file *s, void *unused) | |||
240 | for (i = KS8695_GPIO_0; i <= KS8695_GPIO_15 ; i++) { | 240 | for (i = KS8695_GPIO_0; i <= KS8695_GPIO_15 ; i++) { |
241 | seq_printf(s, "%i:\t", i); | 241 | seq_printf(s, "%i:\t", i); |
242 | 242 | ||
243 | seq_printf(s, "%s\t", (mode & IOPM_(i)) ? "Output" : "Input"); | 243 | seq_printf(s, "%s\t", (mode & IOPM(i)) ? "Output" : "Input"); |
244 | 244 | ||
245 | if (i <= KS8695_GPIO_3) { | 245 | if (i <= KS8695_GPIO_3) { |
246 | if (ctrl & enable[i]) { | 246 | if (ctrl & enable[i]) { |
@@ -273,7 +273,7 @@ static int ks8695_gpio_show(struct seq_file *s, void *unused) | |||
273 | 273 | ||
274 | seq_printf(s, "\t"); | 274 | seq_printf(s, "\t"); |
275 | 275 | ||
276 | seq_printf(s, "%i\n", (data & IOPD_(i)) ? 1 : 0); | 276 | seq_printf(s, "%i\n", (data & IOPD(i)) ? 1 : 0); |
277 | } | 277 | } |
278 | return 0; | 278 | return 0; |
279 | } | 279 | } |