diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:20:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:20:10 -0400 |
commit | c6799ade4ae04b53a5f677e5289116155ff01574 (patch) | |
tree | 3601b5e2387e39d62c207e4268c6cc5c68f2a364 /arch/arm/mach-pxa | |
parent | b7405e16435f710edfae6ba32bef4ca20d3de145 (diff) | |
parent | 5cd47155155a32e5b944ac9fc3f3dc578e429aa0 (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: (82 commits)
[ARM] Add comments marking in-use ptrace numbers
[ARM] Move syscall saving out of the way of utrace
[ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro
[ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header
[ARM] mm 10: allow memory type to be specified with ioremap
[ARM] mm 9: add additional device memory types
[ARM] mm 8: define mem_types table L1 bit 4 to be for ARMv6
[ARM] iop: add missing parens in macro
[ARM] mm 7: remove duplicated __ioremap() prototypes
ARM: OMAP: fix OMAP1 mpuio suspend/resume oops
ARM: OMAP: MPUIO wake updates
ARM: OMAP: speed up gpio irq handling
ARM: OMAP: plat-omap changes for 2430 SDP
ARM: OMAP: gpio object shrinkage, cleanup
ARM: OMAP: /sys/kernel/debug/omap_gpio
ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon
ARM: OMAP: Enable 24xx GPIO autoidling
[ARM] 4318/2: DSM-G600 Board Support
[ARM] 4227/1: minor head.S fixups
[ARM] 4328/1: Move i.MX UART regs to driver
...
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/irq.c | 73 | ||||
-rw-r--r-- | arch/arm/mach-pxa/lpd270.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/lubbock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/ssp.c | 12 |
7 files changed, 85 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index b8cb79f899d5..64b08b744f9f 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -164,9 +164,9 @@ void pxa_set_cken(int clock, int enable) | |||
164 | local_irq_save(flags); | 164 | local_irq_save(flags); |
165 | 165 | ||
166 | if (enable) | 166 | if (enable) |
167 | CKEN |= clock; | 167 | CKEN |= (1 << clock); |
168 | else | 168 | else |
169 | CKEN &= ~clock; | 169 | CKEN &= ~(1 << clock); |
170 | 170 | ||
171 | local_irq_restore(flags); | 171 | local_irq_restore(flags); |
172 | } | 172 | } |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index f815678a9d63..4619d5fe606c 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/ptrace.h> | ||
19 | 18 | ||
20 | #include <asm/hardware.h> | 19 | #include <asm/hardware.h> |
21 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
@@ -39,11 +38,33 @@ static void pxa_unmask_low_irq(unsigned int irq) | |||
39 | ICMR |= (1 << (irq + PXA_IRQ_SKIP)); | 38 | ICMR |= (1 << (irq + PXA_IRQ_SKIP)); |
40 | } | 39 | } |
41 | 40 | ||
41 | static int pxa_set_wake(unsigned int irq, unsigned int on) | ||
42 | { | ||
43 | u32 mask; | ||
44 | |||
45 | switch (irq) { | ||
46 | case IRQ_RTCAlrm: | ||
47 | mask = PWER_RTC; | ||
48 | break; | ||
49 | #ifdef CONFIG_PXA27x | ||
50 | /* REVISIT can handle USBH1, USBH2, USB, MSL, USIM, ... */ | ||
51 | #endif | ||
52 | default: | ||
53 | return -EINVAL; | ||
54 | } | ||
55 | if (on) | ||
56 | PWER |= mask; | ||
57 | else | ||
58 | PWER &= ~mask; | ||
59 | return 0; | ||
60 | } | ||
61 | |||
42 | static struct irq_chip pxa_internal_chip_low = { | 62 | static struct irq_chip pxa_internal_chip_low = { |
43 | .name = "SC", | 63 | .name = "SC", |
44 | .ack = pxa_mask_low_irq, | 64 | .ack = pxa_mask_low_irq, |
45 | .mask = pxa_mask_low_irq, | 65 | .mask = pxa_mask_low_irq, |
46 | .unmask = pxa_unmask_low_irq, | 66 | .unmask = pxa_unmask_low_irq, |
67 | .set_wake = pxa_set_wake, | ||
47 | }; | 68 | }; |
48 | 69 | ||
49 | #if PXA_INTERNAL_IRQS > 32 | 70 | #if PXA_INTERNAL_IRQS > 32 |
@@ -71,6 +92,26 @@ static struct irq_chip pxa_internal_chip_high = { | |||
71 | 92 | ||
72 | #endif | 93 | #endif |
73 | 94 | ||
95 | /* Note that if an input/irq line ever gets changed to an output during | ||
96 | * suspend, the relevant PWER, PRER, and PFER bits should be cleared. | ||
97 | */ | ||
98 | #ifdef CONFIG_PXA27x | ||
99 | |||
100 | /* PXA27x: Various gpios can issue wakeup events. This logic only | ||
101 | * handles the simple cases, not the WEMUX2 and WEMUX3 options | ||
102 | */ | ||
103 | #define PXA27x_GPIO_NOWAKE_MASK \ | ||
104 | ((1 << 8) | (1 << 7) | (1 << 6) | (1 << 5) | (1 << 2)) | ||
105 | #define WAKEMASK(gpio) \ | ||
106 | (((gpio) <= 15) \ | ||
107 | ? ((1 << (gpio)) & ~PXA27x_GPIO_NOWAKE_MASK) \ | ||
108 | : ((gpio == 35) ? (1 << 24) : 0)) | ||
109 | #else | ||
110 | |||
111 | /* pxa 210, 250, 255, 26x: gpios 0..15 can issue wakeups */ | ||
112 | #define WAKEMASK(gpio) (((gpio) <= 15) ? (1 << (gpio)) : 0) | ||
113 | #endif | ||
114 | |||
74 | /* | 115 | /* |
75 | * PXA GPIO edge detection for IRQs: | 116 | * PXA GPIO edge detection for IRQs: |
76 | * IRQs are generated on Falling-Edge, Rising-Edge, or both. | 117 | * IRQs are generated on Falling-Edge, Rising-Edge, or both. |
@@ -84,9 +125,11 @@ static long GPIO_IRQ_mask[4]; | |||
84 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | 125 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) |
85 | { | 126 | { |
86 | int gpio, idx; | 127 | int gpio, idx; |
128 | u32 mask; | ||
87 | 129 | ||
88 | gpio = IRQ_TO_GPIO(irq); | 130 | gpio = IRQ_TO_GPIO(irq); |
89 | idx = gpio >> 5; | 131 | idx = gpio >> 5; |
132 | mask = WAKEMASK(gpio); | ||
90 | 133 | ||
91 | if (type == IRQT_PROBE) { | 134 | if (type == IRQT_PROBE) { |
92 | /* Don't mess with enabled GPIOs using preconfigured edges or | 135 | /* Don't mess with enabled GPIOs using preconfigured edges or |
@@ -106,14 +149,20 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | |||
106 | if (type & __IRQT_RISEDGE) { | 149 | if (type & __IRQT_RISEDGE) { |
107 | /* printk("rising "); */ | 150 | /* printk("rising "); */ |
108 | __set_bit (gpio, GPIO_IRQ_rising_edge); | 151 | __set_bit (gpio, GPIO_IRQ_rising_edge); |
109 | } else | 152 | PRER |= mask; |
153 | } else { | ||
110 | __clear_bit (gpio, GPIO_IRQ_rising_edge); | 154 | __clear_bit (gpio, GPIO_IRQ_rising_edge); |
155 | PRER &= ~mask; | ||
156 | } | ||
111 | 157 | ||
112 | if (type & __IRQT_FALEDGE) { | 158 | if (type & __IRQT_FALEDGE) { |
113 | /* printk("falling "); */ | 159 | /* printk("falling "); */ |
114 | __set_bit (gpio, GPIO_IRQ_falling_edge); | 160 | __set_bit (gpio, GPIO_IRQ_falling_edge); |
115 | } else | 161 | PFER |= mask; |
162 | } else { | ||
116 | __clear_bit (gpio, GPIO_IRQ_falling_edge); | 163 | __clear_bit (gpio, GPIO_IRQ_falling_edge); |
164 | PFER &= ~mask; | ||
165 | } | ||
117 | 166 | ||
118 | /* printk("edges\n"); */ | 167 | /* printk("edges\n"); */ |
119 | 168 | ||
@@ -131,12 +180,29 @@ static void pxa_ack_low_gpio(unsigned int irq) | |||
131 | GEDR0 = (1 << (irq - IRQ_GPIO0)); | 180 | GEDR0 = (1 << (irq - IRQ_GPIO0)); |
132 | } | 181 | } |
133 | 182 | ||
183 | static int pxa_set_gpio_wake(unsigned int irq, unsigned int on) | ||
184 | { | ||
185 | int gpio = IRQ_TO_GPIO(irq); | ||
186 | u32 mask = WAKEMASK(gpio); | ||
187 | |||
188 | if (!mask) | ||
189 | return -EINVAL; | ||
190 | |||
191 | if (on) | ||
192 | PWER |= mask; | ||
193 | else | ||
194 | PWER &= ~mask; | ||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | |||
134 | static struct irq_chip pxa_low_gpio_chip = { | 199 | static struct irq_chip pxa_low_gpio_chip = { |
135 | .name = "GPIO-l", | 200 | .name = "GPIO-l", |
136 | .ack = pxa_ack_low_gpio, | 201 | .ack = pxa_ack_low_gpio, |
137 | .mask = pxa_mask_low_irq, | 202 | .mask = pxa_mask_low_irq, |
138 | .unmask = pxa_unmask_low_irq, | 203 | .unmask = pxa_unmask_low_irq, |
139 | .set_type = pxa_gpio_irq_type, | 204 | .set_type = pxa_gpio_irq_type, |
205 | .set_wake = pxa_set_gpio_wake, | ||
140 | }; | 206 | }; |
141 | 207 | ||
142 | /* | 208 | /* |
@@ -245,6 +311,7 @@ static struct irq_chip pxa_muxed_gpio_chip = { | |||
245 | .mask = pxa_mask_muxed_gpio, | 311 | .mask = pxa_mask_muxed_gpio, |
246 | .unmask = pxa_unmask_muxed_gpio, | 312 | .unmask = pxa_unmask_muxed_gpio, |
247 | .set_type = pxa_gpio_irq_type, | 313 | .set_type = pxa_gpio_irq_type, |
314 | .set_wake = pxa_set_gpio_wake, | ||
248 | }; | 315 | }; |
249 | 316 | ||
250 | 317 | ||
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 8e27a64fa9f4..e3097664ffe1 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -234,7 +234,7 @@ static void lpd270_backlight_power(int on) | |||
234 | { | 234 | { |
235 | if (on) { | 235 | if (on) { |
236 | pxa_gpio_mode(GPIO16_PWM0_MD); | 236 | pxa_gpio_mode(GPIO16_PWM0_MD); |
237 | pxa_set_cken(CKEN0_PWM0, 1); | 237 | pxa_set_cken(CKEN_PWM0, 1); |
238 | PWM_CTRL0 = 0; | 238 | PWM_CTRL0 = 0; |
239 | PWM_PWDUTY0 = 0x3ff; | 239 | PWM_PWDUTY0 = 0x3ff; |
240 | PWM_PERVAL0 = 0x3ff; | 240 | PWM_PERVAL0 = 0x3ff; |
@@ -242,7 +242,7 @@ static void lpd270_backlight_power(int on) | |||
242 | PWM_CTRL0 = 0; | 242 | PWM_CTRL0 = 0; |
243 | PWM_PWDUTY0 = 0x0; | 243 | PWM_PWDUTY0 = 0x0; |
244 | PWM_PERVAL0 = 0x3FF; | 244 | PWM_PERVAL0 = 0x3FF; |
245 | pxa_set_cken(CKEN0_PWM0, 0); | 245 | pxa_set_cken(CKEN_PWM0, 0); |
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 055de7f4f00a..6377b2e29ff0 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -220,7 +220,7 @@ static struct resource pxa_ssp_resources[] = { | |||
220 | 220 | ||
221 | static struct pxa2xx_spi_master pxa_ssp_master_info = { | 221 | static struct pxa2xx_spi_master pxa_ssp_master_info = { |
222 | .ssp_type = PXA25x_SSP, | 222 | .ssp_type = PXA25x_SSP, |
223 | .clock_enable = CKEN3_SSP, | 223 | .clock_enable = CKEN_SSP, |
224 | .num_chipselect = 0, | 224 | .num_chipselect = 0, |
225 | }; | 225 | }; |
226 | 226 | ||
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 56d94d88d5ca..ed99a81b98f3 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -266,7 +266,7 @@ static void mainstone_backlight_power(int on) | |||
266 | { | 266 | { |
267 | if (on) { | 267 | if (on) { |
268 | pxa_gpio_mode(GPIO16_PWM0_MD); | 268 | pxa_gpio_mode(GPIO16_PWM0_MD); |
269 | pxa_set_cken(CKEN0_PWM0, 1); | 269 | pxa_set_cken(CKEN_PWM0, 1); |
270 | PWM_CTRL0 = 0; | 270 | PWM_CTRL0 = 0; |
271 | PWM_PWDUTY0 = 0x3ff; | 271 | PWM_PWDUTY0 = 0x3ff; |
272 | PWM_PERVAL0 = 0x3ff; | 272 | PWM_PERVAL0 = 0x3ff; |
@@ -274,7 +274,7 @@ static void mainstone_backlight_power(int on) | |||
274 | PWM_CTRL0 = 0; | 274 | PWM_CTRL0 = 0; |
275 | PWM_PWDUTY0 = 0x0; | 275 | PWM_PWDUTY0 = 0x0; |
276 | PWM_PERVAL0 = 0x3FF; | 276 | PWM_PERVAL0 = 0x3FF; |
277 | pxa_set_cken(CKEN0_PWM0, 0); | 277 | pxa_set_cken(CKEN_PWM0, 0); |
278 | } | 278 | } |
279 | } | 279 | } |
280 | 280 | ||
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 74eeada1e2fc..c64bab49efc4 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -140,9 +140,9 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
140 | extern void pxa_cpu_resume(void); | 140 | extern void pxa_cpu_resume(void); |
141 | 141 | ||
142 | if (state == PM_SUSPEND_STANDBY) | 142 | if (state == PM_SUSPEND_STANDBY) |
143 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER | CKEN16_LCD |CKEN0_PWM0; | 143 | CKEN = CKEN_MEMC | CKEN_OSTIMER | CKEN_LCD | CKEN_PWM0; |
144 | else | 144 | else |
145 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | 145 | CKEN = CKEN_MEMC | CKEN_OSTIMER; |
146 | 146 | ||
147 | /* ensure voltage-change sequencer not initiated, which hangs */ | 147 | /* ensure voltage-change sequencer not initiated, which hangs */ |
148 | PCFR &= ~PCFR_FVC; | 148 | PCFR &= ~PCFR_FVC; |
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 6cc202755fb4..71766ac0328b 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
@@ -52,13 +52,13 @@ struct ssp_info_ { | |||
52 | */ | 52 | */ |
53 | static const struct ssp_info_ ssp_info[PXA_SSP_PORTS] = { | 53 | static const struct ssp_info_ ssp_info[PXA_SSP_PORTS] = { |
54 | #if defined (CONFIG_PXA27x) | 54 | #if defined (CONFIG_PXA27x) |
55 | {IRQ_SSP, CKEN23_SSP1}, | 55 | {IRQ_SSP, CKEN_SSP1}, |
56 | {IRQ_SSP2, CKEN3_SSP2}, | 56 | {IRQ_SSP2, CKEN_SSP2}, |
57 | {IRQ_SSP3, CKEN4_SSP3}, | 57 | {IRQ_SSP3, CKEN_SSP3}, |
58 | #else | 58 | #else |
59 | {IRQ_SSP, CKEN3_SSP}, | 59 | {IRQ_SSP, CKEN_SSP}, |
60 | {IRQ_NSSP, CKEN9_NSSP}, | 60 | {IRQ_NSSP, CKEN_NSSP}, |
61 | {IRQ_ASSP, CKEN10_ASSP}, | 61 | {IRQ_ASSP, CKEN_ASSP}, |
62 | #endif | 62 | #endif |
63 | }; | 63 | }; |
64 | 64 | ||