diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-01-18 18:03:15 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-08 12:50:13 -0500 |
commit | d7e8f1f9d655af2c7ea90738bf567aa6990159b3 (patch) | |
tree | 6ee9ce41a078c8f6501236c258a52ca0ed8c355d /arch/arm/plat-omap | |
parent | dbb674d57b5851a4fe3122ff4280e4cf87209198 (diff) |
[ARM] omap: convert OMAP1 to use clkdev
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/clkdev.h | 13 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/clock.h | 6 |
4 files changed, 19 insertions, 5 deletions
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 46d3b0b9ce69..fc7b6831f3eb 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -11,6 +11,7 @@ choice | |||
11 | 11 | ||
12 | config ARCH_OMAP1 | 12 | config ARCH_OMAP1 |
13 | bool "TI OMAP1" | 13 | bool "TI OMAP1" |
14 | select COMMON_CLKDEV | ||
14 | 15 | ||
15 | config ARCH_OMAP2 | 16 | config ARCH_OMAP2 |
16 | bool "TI OMAP2" | 17 | bool "TI OMAP2" |
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 6b3ef2a0b04e..6b88f7878a51 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -36,6 +36,7 @@ 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 | #ifndef CONFIG_COMMON_CLKDEV | ||
39 | /* | 40 | /* |
40 | * Returns a clock. Note that we first try to use device id on the bus | 41 | * Returns a clock. Note that we first try to use device id on the bus |
41 | * and clock name. If this fails, we try to use clock name only. | 42 | * and clock name. If this fails, we try to use clock name only. |
@@ -72,6 +73,7 @@ found: | |||
72 | return clk; | 73 | return clk; |
73 | } | 74 | } |
74 | EXPORT_SYMBOL(clk_get); | 75 | EXPORT_SYMBOL(clk_get); |
76 | #endif | ||
75 | 77 | ||
76 | int clk_enable(struct clk *clk) | 78 | int clk_enable(struct clk *clk) |
77 | { | 79 | { |
@@ -145,10 +147,12 @@ unsigned long clk_get_rate(struct clk *clk) | |||
145 | } | 147 | } |
146 | EXPORT_SYMBOL(clk_get_rate); | 148 | EXPORT_SYMBOL(clk_get_rate); |
147 | 149 | ||
150 | #ifndef CONFIG_COMMON_CLKDEV | ||
148 | void clk_put(struct clk *clk) | 151 | void clk_put(struct clk *clk) |
149 | { | 152 | { |
150 | } | 153 | } |
151 | EXPORT_SYMBOL(clk_put); | 154 | EXPORT_SYMBOL(clk_put); |
155 | #endif | ||
152 | 156 | ||
153 | /*------------------------------------------------------------------------- | 157 | /*------------------------------------------------------------------------- |
154 | * Optional clock functions defined in include/linux/clk.h | 158 | * Optional clock functions defined in include/linux/clk.h |
diff --git a/arch/arm/plat-omap/include/mach/clkdev.h b/arch/arm/plat-omap/include/mach/clkdev.h new file mode 100644 index 000000000000..730c49d1ebd8 --- /dev/null +++ b/arch/arm/plat-omap/include/mach/clkdev.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __MACH_CLKDEV_H | ||
2 | #define __MACH_CLKDEV_H | ||
3 | |||
4 | static inline int __clk_get(struct clk *clk) | ||
5 | { | ||
6 | return 1; | ||
7 | } | ||
8 | |||
9 | static inline void __clk_put(struct clk *clk) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | #endif | ||
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h index 5a7411e71f20..2af4bc24cfe9 100644 --- a/arch/arm/plat-omap/include/mach/clock.h +++ b/arch/arm/plat-omap/include/mach/clock.h | |||
@@ -136,11 +136,7 @@ extern const struct clkops clkops_null; | |||
136 | #define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ | 136 | #define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ |
137 | #define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */ | 137 | #define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */ |
138 | #define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */ | 138 | #define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */ |
139 | /* bits 13-20 are currently free */ | 139 | /* bits 13-24 are currently free */ |
140 | #define CLOCK_IN_OMAP310 (1 << 21) | ||
141 | #define CLOCK_IN_OMAP730 (1 << 22) | ||
142 | #define CLOCK_IN_OMAP1510 (1 << 23) | ||
143 | #define CLOCK_IN_OMAP16XX (1 << 24) | ||
144 | #define CLOCK_IN_OMAP242X (1 << 25) | 140 | #define CLOCK_IN_OMAP242X (1 << 25) |
145 | #define CLOCK_IN_OMAP243X (1 << 26) | 141 | #define CLOCK_IN_OMAP243X (1 << 26) |
146 | #define CLOCK_IN_OMAP343X (1 << 27) /* clocks common to all 343X */ | 142 | #define CLOCK_IN_OMAP343X (1 << 27) /* clocks common to all 343X */ |