diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2009-05-28 17:16:04 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-05-28 17:16:04 -0400 |
commit | 748303850d589038f8ff9f5c7014afb006210b1f (patch) | |
tree | 5d22b37d7932e94ba956601bde157905e2bf525a /arch/arm/plat-omap | |
parent | 44169075e6eaa87bab6a296209d8d0610879b394 (diff) |
ARM: OMAP4: Clock stubs since CLKDEV not in yet.
This patch update the common clock.c file for OMAP4. The clk_get() and
clk_put() functions are moved to common place in arch/arm/common/clkdev.c
Since on current OMAP4 platform clk management is still not supported, the
platform file is stubbed with those functions.
Once the framework is ready, this WILL be replaced with a full
clkdev implementation.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 29efc279287a..0fcfcd68709c 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -36,10 +36,40 @@ static struct clk_functions *arch_clock; | |||
36 | * Standard clock functions defined in include/linux/clk.h | 36 | * Standard clock functions defined in include/linux/clk.h |
37 | *-------------------------------------------------------------------------*/ | 37 | *-------------------------------------------------------------------------*/ |
38 | 38 | ||
39 | /* This functions is moved to arch/arm/common/clkdev.c. For OMAP4 since | ||
40 | * clock framework is not up , it is defined here to avoid rework in | ||
41 | * every driver. Also dummy prcm reset function is added */ | ||
42 | |||
43 | /* Dummy hooks only for OMAP4.For rest OMAPs, common clkdev is used */ | ||
44 | #if defined(CONFIG_ARCH_OMAP4) | ||
45 | struct clk *clk_get(struct device *dev, const char *id) | ||
46 | { | ||
47 | return NULL; | ||
48 | } | ||
49 | EXPORT_SYMBOL(clk_get); | ||
50 | |||
51 | void clk_put(struct clk *clk) | ||
52 | { | ||
53 | } | ||
54 | EXPORT_SYMBOL(clk_put); | ||
55 | |||
56 | void omap2_clk_prepare_for_reboot(void) | ||
57 | { | ||
58 | } | ||
59 | EXPORT_SYMBOL(omap2_clk_prepare_for_reboot); | ||
60 | |||
61 | void omap_prcm_arch_reset(char mode) | ||
62 | { | ||
63 | } | ||
64 | EXPORT_SYMBOL(omap_prcm_arch_reset); | ||
65 | #endif | ||
39 | int clk_enable(struct clk *clk) | 66 | int clk_enable(struct clk *clk) |
40 | { | 67 | { |
41 | unsigned long flags; | 68 | unsigned long flags; |
42 | int ret = 0; | 69 | int ret = 0; |
70 | if (cpu_is_omap44xx()) | ||
71 | /* OMAP4 clk framework not supported yet */ | ||
72 | return 0; | ||
43 | 73 | ||
44 | if (clk == NULL || IS_ERR(clk)) | 74 | if (clk == NULL || IS_ERR(clk)) |
45 | return -EINVAL; | 75 | return -EINVAL; |
@@ -140,6 +170,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
140 | unsigned long flags; | 170 | unsigned long flags; |
141 | int ret = -EINVAL; | 171 | int ret = -EINVAL; |
142 | 172 | ||
173 | if (cpu_is_omap44xx()) | ||
174 | /* OMAP4 clk framework not supported yet */ | ||
175 | return 0; | ||
143 | if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) | 176 | if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) |
144 | return ret; | 177 | return ret; |
145 | 178 | ||