pxa25x.c (435b6e94b88af96c3f5b5798c087978c3793400c) | pxa25x.c (c95530c7798b760901c5d6212e528b03e323b8ac) |
---|---|
1/* 2 * linux/arch/arm/mach-pxa/pxa25x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA21x/25x/26x variants. --- 213 unchanged lines hidden (view full) --- 222}; 223 224static void __init pxa25x_init_pm(void) 225{ 226 pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns; 227} 228#endif 229 | 1/* 2 * linux/arch/arm/mach-pxa/pxa25x.c 3 * 4 * Author: Nicolas Pitre 5 * Created: Jun 15, 2001 6 * Copyright: MontaVista Software Inc. 7 * 8 * Code specific to PXA21x/25x/26x variants. --- 213 unchanged lines hidden (view full) --- 222}; 223 224static void __init pxa25x_init_pm(void) 225{ 226 pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns; 227} 228#endif 229 |
230/* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm 231 */ 232 233static int pxa25x_set_wake(unsigned int irq, unsigned int on) 234{ 235 int gpio = IRQ_TO_GPIO(irq); 236 uint32_t gpio_bit, mask = 0; 237 238 if (gpio >= 0 && gpio <= 15) { 239 gpio_bit = GPIO_bit(gpio); 240 mask = gpio_bit; 241 if (on) { 242 if (GRER(gpio) | gpio_bit) 243 PRER |= gpio_bit; 244 else 245 PRER &= ~gpio_bit; 246 247 if (GFER(gpio) | gpio_bit) 248 PFER |= gpio_bit; 249 else 250 PFER &= ~gpio_bit; 251 } 252 goto set_pwer; 253 } 254 255 if (irq == IRQ_RTCAlrm) { 256 mask = PWER_RTC; 257 goto set_pwer; 258 } 259 260 return -EINVAL; 261 262set_pwer: 263 if (on) 264 PWER |= mask; 265 else 266 PWER &=~mask; 267 268 return 0; 269} 270 |
|
230void __init pxa25x_init_irq(void) 231{ 232 pxa_init_irq_low(); 233 pxa_init_irq_gpio(85); | 271void __init pxa25x_init_irq(void) 272{ 273 pxa_init_irq_low(); 274 pxa_init_irq_gpio(85); |
275 pxa_init_irq_set_wake(pxa25x_set_wake); |
|
234} 235 236static struct platform_device *pxa25x_devices[] __initdata = { 237 &pxa_device_mci, 238 &pxa_device_udc, 239 &pxa_device_fb, 240 &pxa_device_ffuart, 241 &pxa_device_btuart, --- 30 unchanged lines hidden --- | 276} 277 278static struct platform_device *pxa25x_devices[] __initdata = { 279 &pxa_device_mci, 280 &pxa_device_udc, 281 &pxa_device_fb, 282 &pxa_device_ffuart, 283 &pxa_device_btuart, --- 30 unchanged lines hidden --- |