aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lh7a40x
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-30 12:34:32 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-11-30 12:34:32 -0500
commit80a5931b518438cc61926673ccbb2b223d01d201 (patch)
tree8737144350a72cf806bc708fb0b660b29ac233e5 /arch/arm/mach-lh7a40x
parent846b368eb91da88ae35bf541d5604edcd5733bc3 (diff)
[ARM] lh7a40x: convert to simple clk API
lh7a40x only uses the clk API for the framebuffer, so there's no point having a complicated implementation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-lh7a40x')
-rw-r--r--arch/arm/mach-lh7a40x/clocks.c65
1 files changed, 4 insertions, 61 deletions
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c
index fcdac94a9510..6182f5410b4d 100644
--- a/arch/arm/mach-lh7a40x/clocks.c
+++ b/arch/arm/mach-lh7a40x/clocks.c
@@ -72,31 +72,15 @@ unsigned int pclkfreq_get (void)
72 72
73/* ----- */ 73/* ----- */
74 74
75static LIST_HEAD(clocks);
76static DECLARE_MUTEX(clocks_sem);
77
78struct clk *clk_get (struct device *dev, const char *id) 75struct clk *clk_get (struct device *dev, const char *id)
79{ 76{
80 struct clk *p; 77 return dev && strcmp(dev_name(dev), "cldc-lh7a40x") == 0
81 struct clk *clk = ERR_PTR(-ENOENT); 78 ? NULL : ERR_PTR(-ENOENT);
82
83 down (&clocks_sem);
84 list_for_each_entry (p, &clocks, node) {
85 if (strcmp (id, p->name) == 0
86 && try_module_get(p->owner)) {
87 clk = p;
88 break;
89 }
90 }
91 up (&clocks_sem);
92
93 return clk;
94} 79}
95EXPORT_SYMBOL(clk_get); 80EXPORT_SYMBOL(clk_get);
96 81
97void clk_put (struct clk *clk) 82void clk_put (struct clk *clk)
98{ 83{
99 module_put(clk->owner);
100} 84}
101EXPORT_SYMBOL(clk_put); 85EXPORT_SYMBOL(clk_put);
102 86
@@ -111,20 +95,9 @@ void clk_disable (struct clk *clk)
111} 95}
112EXPORT_SYMBOL(clk_disable); 96EXPORT_SYMBOL(clk_disable);
113 97
114int clk_use (struct clk *clk)
115{
116 return 0;
117}
118EXPORT_SYMBOL(clk_use);
119
120void clk_unuse (struct clk *clk)
121{
122}
123EXPORT_SYMBOL(clk_unuse);
124
125unsigned long clk_get_rate (struct clk *clk) 98unsigned long clk_get_rate (struct clk *clk)
126{ 99{
127 return clk->rate; 100 return 0;
128} 101}
129EXPORT_SYMBOL(clk_get_rate); 102EXPORT_SYMBOL(clk_get_rate);
130 103
@@ -136,36 +109,6 @@ EXPORT_SYMBOL(clk_round_rate);
136 109
137int clk_set_rate (struct clk *clk, unsigned long rate) 110int clk_set_rate (struct clk *clk, unsigned long rate)
138{ 111{
139 int ret = -EIO; 112 return -EIO;
140 return ret;
141} 113}
142EXPORT_SYMBOL(clk_set_rate); 114EXPORT_SYMBOL(clk_set_rate);
143
144static struct clk clcd_clk = {
145 .name = "CLCDCLK",
146 .rate = 0,
147};
148
149int clk_register (struct clk *clk)
150{
151 down (&clocks_sem);
152 list_add (&clk->node, &clocks);
153 up (&clocks_sem);
154 return 0;
155}
156EXPORT_SYMBOL(clk_register);
157
158void clk_unregister (struct clk *clk)
159{
160 down (&clocks_sem);
161 list_del (&clk->node);
162 up (&clocks_sem);
163}
164EXPORT_SYMBOL(clk_unregister);
165
166static int __init clk_init (void)
167{
168 clk_register(&clcd_clk);
169 return 0;
170}
171arch_initcall(clk_init);