diff options
author | Rajendra Nayak <rnayak@ti.com> | 2011-02-25 18:06:47 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2011-02-25 18:06:47 -0500 |
commit | 68b921ad7f35e0323ce0d9fe94e5701a112f257c (patch) | |
tree | ec9af432b9a366604ce43370dfccc779ae2bc5f9 /arch/arm/mach-omap2/clockdomain44xx.c | |
parent | 4aef7a2a5aad52b60ac1a2f3cee055b8271b70d5 (diff) |
OMAP: clockdomain: Arch specific funcs for sleep/wakeup of clkdm
Define the following architecture specific funtions for omap2/3/4
.clkdm_sleep
.clkdm_wakeup
Convert the platform-independent framework to call these functions.
Also rename the api's by removing the omap2_ preamble.
Hence call omap2_clkdm_wakeup as clkdm_wakeup and
omap2_clkdm_sleep as clkdm_sleep.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
[paul@pwsan.com: fixed omap3_clkdm_clear_all_sleepdeps() and
omap2_clkdm_clear_all_wkdeps() to test against the correct
loop termination condition; thanks to Kevin Hilman for finding and
helping fix]
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain44xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clockdomain44xx.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c new file mode 100644 index 000000000000..9ccb406cf54f --- /dev/null +++ b/arch/arm/mach-omap2/clockdomain44xx.c | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * OMAP4 clockdomain control | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Texas Instruments, Inc. | ||
5 | * Copyright (C) 2008-2010 Nokia Corporation | ||
6 | * | ||
7 | * Derived from mach-omap2/clockdomain.c written by Paul Walmsley | ||
8 | * Rajendra Nayak <rnayak@ti.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include "clockdomain.h" | ||
16 | #include "cminst44xx.h" | ||
17 | |||
18 | static int omap4_clkdm_sleep(struct clockdomain *clkdm) | ||
19 | { | ||
20 | omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, | ||
21 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
22 | return 0; | ||
23 | } | ||
24 | |||
25 | static int omap4_clkdm_wakeup(struct clockdomain *clkdm) | ||
26 | { | ||
27 | omap4_cminst_clkdm_force_wakeup(clkdm->prcm_partition, | ||
28 | clkdm->cm_inst, clkdm->clkdm_offs); | ||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | struct clkdm_ops omap4_clkdm_operations = { | ||
33 | .clkdm_sleep = omap4_clkdm_sleep, | ||
34 | .clkdm_wakeup = omap4_clkdm_wakeup, | ||
35 | }; | ||