RS485: fix inconsistencies in the meaning of some variables
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-pxa / clock-pxa2xx.c
blob1d5859d9a0e3299bfe55d82d21b9fe3ba123b94c
1 /*
2 * linux/arch/arm/mach-pxa/clock-pxa2xx.c
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #include <linux/module.h>
10 #include <linux/kernel.h>
11 #include <linux/init.h>
12 #include <linux/syscore_ops.h>
14 #include <mach/pxa2xx-regs.h>
16 #include "clock.h"
18 void clk_pxa2xx_cken_enable(struct clk *clk)
20 CKEN |= 1 << clk->cken;
23 void clk_pxa2xx_cken_disable(struct clk *clk)
25 CKEN &= ~(1 << clk->cken);
28 const struct clkops clk_pxa2xx_cken_ops = {
29 .enable = clk_pxa2xx_cken_enable,
30 .disable = clk_pxa2xx_cken_disable,
33 #ifdef CONFIG_PM
34 static uint32_t saved_cken;
36 static int pxa2xx_clock_suspend(void)
38 saved_cken = CKEN;
39 return 0;
42 static void pxa2xx_clock_resume(void)
44 CKEN = saved_cken;
46 #else
47 #define pxa2xx_clock_suspend NULL
48 #define pxa2xx_clock_resume NULL
49 #endif
51 struct syscore_ops pxa2xx_clock_syscore_ops = {
52 .suspend = pxa2xx_clock_suspend,
53 .resume = pxa2xx_clock_resume,