blob: 56c6e11fa83bea6ce8887de4f235c8501f1f6d69 [file] [log] [blame]
Paul Mundt36ddf312006-01-16 22:14:17 -08001/*
2 * arch/sh/kernel/cpu/clock.c - SuperH clock framework
3 *
Paul Mundtb1f6cfe2009-05-12 04:27:43 +09004 * Copyright (C) 2005 - 2009 Paul Mundt
Paul Mundt36ddf312006-01-16 22:14:17 -08005 *
6 * This clock framework is derived from the OMAP version by:
7 *
Paul Mundtb1f6cfe2009-05-12 04:27:43 +09008 * Copyright (C) 2004 - 2008 Nokia Corporation
Paul Mundt36ddf312006-01-16 22:14:17 -08009 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
10 *
Paul Mundt1d118562006-12-01 13:15:14 +090011 * Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com>
12 *
Paul Mundt0dae8952009-05-12 06:18:09 +090013 * With clkdev bits:
14 *
15 * Copyright (C) 2008 Russell King.
16 *
Paul Mundt36ddf312006-01-16 22:14:17 -080017 * This file is subject to the terms and conditions of the GNU General Public
18 * License. See the file "COPYING" in the main directory of this archive
19 * for more details.
20 */
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/module.h>
Paul Mundt237b98f2006-09-27 17:28:20 +090024#include <linux/mutex.h>
Paul Mundt36ddf312006-01-16 22:14:17 -080025#include <linux/list.h>
Francesco VIRLINZI4a550262009-03-11 07:42:05 +000026#include <linux/kobject.h>
27#include <linux/sysdev.h>
Paul Mundt36ddf312006-01-16 22:14:17 -080028#include <linux/seq_file.h>
29#include <linux/err.h>
Paul Mundt1d118562006-12-01 13:15:14 +090030#include <linux/platform_device.h>
Paul Mundtdb62e5b2007-04-26 12:17:20 +090031#include <linux/proc_fs.h>
Paul Mundt36ddf312006-01-16 22:14:17 -080032#include <asm/clock.h>
Paul Mundt253b0882009-05-13 17:38:11 +090033#include <asm/machvec.h>
Paul Mundt36ddf312006-01-16 22:14:17 -080034
35static LIST_HEAD(clock_list);
36static DEFINE_SPINLOCK(clock_lock);
Paul Mundt237b98f2006-09-27 17:28:20 +090037static DEFINE_MUTEX(clock_list_sem);
Paul Mundt36ddf312006-01-16 22:14:17 -080038
Paul Mundta02cb232009-05-12 03:50:44 +090039/* Used for clocks that always have same value as the parent clock */
40unsigned long followparent_recalc(struct clk *clk)
41{
42 return clk->parent->rate;
43}
44
Paul Mundtaa87aa32009-05-12 05:51:05 +090045int clk_reparent(struct clk *child, struct clk *parent)
46{
47 list_del_init(&child->sibling);
48 if (parent)
49 list_add(&child->sibling, &parent->children);
50 child->parent = parent;
51
52 /* now do the debugfs renaming to reattach the child
53 to the proper parent */
54
55 return 0;
56}
57
Paul Mundtb1f6cfe2009-05-12 04:27:43 +090058/* Propagate rate to children */
59void propagate_rate(struct clk *tclk)
60{
61 struct clk *clkp;
62
63 list_for_each_entry(clkp, &tclk->children, sibling) {
Paul Mundtd672fef2009-05-13 17:03:09 +090064 if (clkp->ops && clkp->ops->recalc)
Paul Mundtb1f6cfe2009-05-12 04:27:43 +090065 clkp->rate = clkp->ops->recalc(clkp);
Paul Mundtcc96eac2009-05-13 20:28:15 +090066 if (clkp->ops && clkp->ops->build_rate_table)
67 clkp->ops->build_rate_table(clkp);
68
Paul Mundtb1f6cfe2009-05-12 04:27:43 +090069 propagate_rate(clkp);
70 }
71}
72
Adrian Bunk4c1cfab2008-06-18 03:36:50 +030073static void __clk_disable(struct clk *clk)
Paul Mundt36ddf312006-01-16 22:14:17 -080074{
Paul Mundtae891a42009-05-12 05:30:10 +090075 if (clk->usecount == 0) {
76 printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
77 clk->name);
78 WARN_ON(1);
79 return;
80 }
81
82 if (!(--clk->usecount)) {
dmitry pervushin1929cb32007-04-24 13:39:09 +090083 if (likely(clk->ops && clk->ops->disable))
84 clk->ops->disable(clk);
Paul Mundt4ff29ff2009-05-12 05:14:53 +090085 if (likely(clk->parent))
86 __clk_disable(clk->parent);
dmitry pervushin1929cb32007-04-24 13:39:09 +090087 }
Paul Mundt36ddf312006-01-16 22:14:17 -080088}
89
90void clk_disable(struct clk *clk)
91{
92 unsigned long flags;
93
Paul Mundt4ff29ff2009-05-12 05:14:53 +090094 if (!clk)
95 return;
96
Paul Mundt36ddf312006-01-16 22:14:17 -080097 spin_lock_irqsave(&clock_lock, flags);
98 __clk_disable(clk);
99 spin_unlock_irqrestore(&clock_lock, flags);
100}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900101EXPORT_SYMBOL_GPL(clk_disable);
Paul Mundt36ddf312006-01-16 22:14:17 -0800102
Paul Mundtae891a42009-05-12 05:30:10 +0900103static int __clk_enable(struct clk *clk)
104{
105 int ret = 0;
106
107 if (clk->usecount++ == 0) {
108 if (clk->parent) {
109 ret = __clk_enable(clk->parent);
110 if (unlikely(ret))
111 goto err;
112 }
113
114 if (clk->ops && clk->ops->enable) {
115 ret = clk->ops->enable(clk);
116 if (ret) {
117 if (clk->parent)
118 __clk_disable(clk->parent);
119 goto err;
120 }
121 }
122 }
123
124 return ret;
125err:
126 clk->usecount--;
127 return ret;
128}
129
130int clk_enable(struct clk *clk)
131{
132 unsigned long flags;
133 int ret;
134
135 if (!clk)
136 return -EINVAL;
137
138 spin_lock_irqsave(&clock_lock, flags);
139 ret = __clk_enable(clk);
140 spin_unlock_irqrestore(&clock_lock, flags);
141
142 return ret;
143}
144EXPORT_SYMBOL_GPL(clk_enable);
145
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900146static LIST_HEAD(root_clks);
147
148/**
149 * recalculate_root_clocks - recalculate and propagate all root clocks
150 *
151 * Recalculates all root clocks (clocks with no parent), which if the
152 * clock's .recalc is set correctly, should also propagate their rates.
153 * Called at init.
154 */
155void recalculate_root_clocks(void)
156{
157 struct clk *clkp;
158
159 list_for_each_entry(clkp, &root_clks, sibling) {
Paul Mundtd672fef2009-05-13 17:03:09 +0900160 if (clkp->ops && clkp->ops->recalc)
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900161 clkp->rate = clkp->ops->recalc(clkp);
162 propagate_rate(clkp);
163 }
164}
165
Paul Mundt36ddf312006-01-16 22:14:17 -0800166int clk_register(struct clk *clk)
167{
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900168 if (clk == NULL || IS_ERR(clk))
169 return -EINVAL;
170
171 /*
172 * trap out already registered clocks
173 */
174 if (clk->node.next || clk->node.prev)
175 return 0;
176
Paul Mundt237b98f2006-09-27 17:28:20 +0900177 mutex_lock(&clock_list_sem);
Paul Mundt36ddf312006-01-16 22:14:17 -0800178
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900179 INIT_LIST_HEAD(&clk->children);
Paul Mundt4ff29ff2009-05-12 05:14:53 +0900180 clk->usecount = 0;
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900181
182 if (clk->parent)
183 list_add(&clk->sibling, &clk->parent->children);
184 else
185 list_add(&clk->sibling, &root_clks);
186
Paul Mundt36ddf312006-01-16 22:14:17 -0800187 list_add(&clk->node, &clock_list);
Paul Mundtd672fef2009-05-13 17:03:09 +0900188 if (clk->ops && clk->ops->init)
Paul Mundt4ff29ff2009-05-12 05:14:53 +0900189 clk->ops->init(clk);
Paul Mundt237b98f2006-09-27 17:28:20 +0900190 mutex_unlock(&clock_list_sem);
Paul Mundt36ddf312006-01-16 22:14:17 -0800191
192 return 0;
193}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900194EXPORT_SYMBOL_GPL(clk_register);
Paul Mundt36ddf312006-01-16 22:14:17 -0800195
196void clk_unregister(struct clk *clk)
197{
Paul Mundt237b98f2006-09-27 17:28:20 +0900198 mutex_lock(&clock_list_sem);
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900199 list_del(&clk->sibling);
Paul Mundt36ddf312006-01-16 22:14:17 -0800200 list_del(&clk->node);
Paul Mundt237b98f2006-09-27 17:28:20 +0900201 mutex_unlock(&clock_list_sem);
Paul Mundt36ddf312006-01-16 22:14:17 -0800202}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900203EXPORT_SYMBOL_GPL(clk_unregister);
Paul Mundt36ddf312006-01-16 22:14:17 -0800204
Paul Mundt4ff29ff2009-05-12 05:14:53 +0900205static void clk_enable_init_clocks(void)
206{
207 struct clk *clkp;
208
209 list_for_each_entry(clkp, &clock_list, node)
210 if (clkp->flags & CLK_ENABLE_ON_INIT)
211 clk_enable(clkp);
212}
213
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900214unsigned long clk_get_rate(struct clk *clk)
Paul Mundt36ddf312006-01-16 22:14:17 -0800215{
216 return clk->rate;
217}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900218EXPORT_SYMBOL_GPL(clk_get_rate);
Paul Mundt36ddf312006-01-16 22:14:17 -0800219
220int clk_set_rate(struct clk *clk, unsigned long rate)
221{
dmitry pervushin1929cb32007-04-24 13:39:09 +0900222 return clk_set_rate_ex(clk, rate, 0);
223}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900224EXPORT_SYMBOL_GPL(clk_set_rate);
dmitry pervushin1929cb32007-04-24 13:39:09 +0900225
226int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id)
227{
Paul Mundt36ddf312006-01-16 22:14:17 -0800228 int ret = -EOPNOTSUPP;
Paul Mundt100890c2009-05-13 17:05:51 +0900229 unsigned long flags;
230
231 spin_lock_irqsave(&clock_lock, flags);
Paul Mundt36ddf312006-01-16 22:14:17 -0800232
233 if (likely(clk->ops && clk->ops->set_rate)) {
dmitry pervushin1929cb32007-04-24 13:39:09 +0900234 ret = clk->ops->set_rate(clk, rate, algo_id);
Paul Mundt100890c2009-05-13 17:05:51 +0900235 if (ret != 0)
236 goto out_unlock;
237 } else {
238 clk->rate = rate;
239 ret = 0;
Paul Mundt36ddf312006-01-16 22:14:17 -0800240 }
241
Paul Mundt100890c2009-05-13 17:05:51 +0900242 if (clk->ops && clk->ops->recalc)
243 clk->rate = clk->ops->recalc(clk);
244
245 propagate_rate(clk);
246
247out_unlock:
248 spin_unlock_irqrestore(&clock_lock, flags);
249
Paul Mundt36ddf312006-01-16 22:14:17 -0800250 return ret;
251}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900252EXPORT_SYMBOL_GPL(clk_set_rate_ex);
Paul Mundt36ddf312006-01-16 22:14:17 -0800253
Francesco VIRLINZId680c762009-03-11 07:40:54 +0000254int clk_set_parent(struct clk *clk, struct clk *parent)
255{
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900256 unsigned long flags;
Francesco VIRLINZId680c762009-03-11 07:40:54 +0000257 int ret = -EINVAL;
Francesco VIRLINZId680c762009-03-11 07:40:54 +0000258
259 if (!parent || !clk)
260 return ret;
Paul Mundtaa87aa32009-05-12 05:51:05 +0900261 if (clk->parent == parent)
262 return 0;
Francesco VIRLINZId680c762009-03-11 07:40:54 +0000263
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900264 spin_lock_irqsave(&clock_lock, flags);
265 if (clk->usecount == 0) {
266 if (clk->ops->set_parent)
267 ret = clk->ops->set_parent(clk, parent);
Paul Mundtaa87aa32009-05-12 05:51:05 +0900268 else
269 ret = clk_reparent(clk, parent);
270
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900271 if (ret == 0) {
Paul Mundtaa87aa32009-05-12 05:51:05 +0900272 pr_debug("clock: set parent of %s to %s (new rate %ld)\n",
273 clk->name, clk->parent->name, clk->rate);
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900274 if (clk->ops->recalc)
275 clk->rate = clk->ops->recalc(clk);
276 propagate_rate(clk);
277 }
278 } else
279 ret = -EBUSY;
280 spin_unlock_irqrestore(&clock_lock, flags);
Francesco VIRLINZId680c762009-03-11 07:40:54 +0000281
Francesco VIRLINZId680c762009-03-11 07:40:54 +0000282 return ret;
283}
284EXPORT_SYMBOL_GPL(clk_set_parent);
285
286struct clk *clk_get_parent(struct clk *clk)
287{
288 return clk->parent;
289}
290EXPORT_SYMBOL_GPL(clk_get_parent);
291
Paul Mundtf6991b02007-07-20 13:29:09 +0900292long clk_round_rate(struct clk *clk, unsigned long rate)
293{
294 if (likely(clk->ops && clk->ops->round_rate)) {
295 unsigned long flags, rounded;
296
297 spin_lock_irqsave(&clock_lock, flags);
298 rounded = clk->ops->round_rate(clk, rate);
299 spin_unlock_irqrestore(&clock_lock, flags);
300
301 return rounded;
302 }
303
304 return clk_get_rate(clk);
305}
306EXPORT_SYMBOL_GPL(clk_round_rate);
307
Paul Mundt1d118562006-12-01 13:15:14 +0900308/*
Paul Mundt0dae8952009-05-12 06:18:09 +0900309 * Find the correct struct clk for the device and connection ID.
310 * We do slightly fuzzy matching here:
311 * An entry with a NULL ID is assumed to be a wildcard.
312 * If an entry has a device ID, it must match
313 * If an entry has a connection ID, it must match
314 * Then we take the most specific entry - with the following
315 * order of precidence: dev+con > dev only > con only.
316 */
317static struct clk *clk_find(const char *dev_id, const char *con_id)
318{
319 struct clk_lookup *p;
320 struct clk *clk = NULL;
321 int match, best = 0;
322
323 list_for_each_entry(p, &clock_list, node) {
324 match = 0;
325 if (p->dev_id) {
326 if (!dev_id || strcmp(p->dev_id, dev_id))
327 continue;
328 match += 2;
329 }
330 if (p->con_id) {
331 if (!con_id || strcmp(p->con_id, con_id))
332 continue;
333 match += 1;
334 }
335 if (match == 0)
336 continue;
337
338 if (match > best) {
339 clk = p->clk;
340 best = match;
341 }
342 }
343 return clk;
344}
345
346struct clk *clk_get_sys(const char *dev_id, const char *con_id)
347{
348 struct clk *clk;
349
350 mutex_lock(&clock_list_sem);
351 clk = clk_find(dev_id, con_id);
352 mutex_unlock(&clock_list_sem);
353
354 return clk ? clk : ERR_PTR(-ENOENT);
355}
356EXPORT_SYMBOL_GPL(clk_get_sys);
357
358/*
Paul Mundt1d118562006-12-01 13:15:14 +0900359 * Returns a clock. Note that we first try to use device id on the bus
360 * and clock name. If this fails, we try to use clock name only.
361 */
362struct clk *clk_get(struct device *dev, const char *id)
Paul Mundt36ddf312006-01-16 22:14:17 -0800363{
Paul Mundt0dae8952009-05-12 06:18:09 +0900364 const char *dev_id = dev ? dev_name(dev) : NULL;
Paul Mundt36ddf312006-01-16 22:14:17 -0800365 struct clk *p, *clk = ERR_PTR(-ENOENT);
Paul Mundt1d118562006-12-01 13:15:14 +0900366 int idno;
367
Paul Mundt0dae8952009-05-12 06:18:09 +0900368 clk = clk_get_sys(dev_id, id);
Paul Mundtf3f82902009-05-12 16:07:40 +0900369 if (clk && !IS_ERR(clk))
Paul Mundt0dae8952009-05-12 06:18:09 +0900370 return clk;
371
Paul Mundt1d118562006-12-01 13:15:14 +0900372 if (dev == NULL || dev->bus != &platform_bus_type)
373 idno = -1;
374 else
375 idno = to_platform_device(dev)->id;
Paul Mundt36ddf312006-01-16 22:14:17 -0800376
Paul Mundt237b98f2006-09-27 17:28:20 +0900377 mutex_lock(&clock_list_sem);
Paul Mundt36ddf312006-01-16 22:14:17 -0800378 list_for_each_entry(p, &clock_list, node) {
Paul Mundt1d118562006-12-01 13:15:14 +0900379 if (p->id == idno &&
380 strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
381 clk = p;
382 goto found;
383 }
384 }
385
386 list_for_each_entry(p, &clock_list, node) {
Paul Mundt36ddf312006-01-16 22:14:17 -0800387 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
388 clk = p;
389 break;
390 }
391 }
Paul Mundt1d118562006-12-01 13:15:14 +0900392
393found:
Paul Mundt237b98f2006-09-27 17:28:20 +0900394 mutex_unlock(&clock_list_sem);
Paul Mundt36ddf312006-01-16 22:14:17 -0800395
396 return clk;
397}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900398EXPORT_SYMBOL_GPL(clk_get);
Paul Mundt36ddf312006-01-16 22:14:17 -0800399
400void clk_put(struct clk *clk)
401{
402 if (clk && !IS_ERR(clk))
403 module_put(clk->owner);
404}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900405EXPORT_SYMBOL_GPL(clk_put);
Paul Mundt36ddf312006-01-16 22:14:17 -0800406
dmitry pervushindfbbbe92007-05-15 08:42:22 +0900407
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900408static int show_clocks(char *buf, char **start, off_t off,
409 int len, int *eof, void *data)
410{
411 struct clk *clk;
412 char *p = buf;
413
414 list_for_each_entry_reverse(clk, &clock_list, node) {
415 unsigned long rate = clk_get_rate(clk);
416
Magnus Damm152fe362008-07-17 19:05:54 +0900417 p += sprintf(p, "%-12s\t: %ld.%02ldMHz\t%s\n", clk->name,
418 rate / 1000000, (rate % 1000000) / 10000,
Paul Mundt4ff29ff2009-05-12 05:14:53 +0900419 (clk->usecount > 0) ? "enabled" : "disabled");
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900420 }
421
422 return p - buf;
423}
424
Francesco VIRLINZI4a550262009-03-11 07:42:05 +0000425#ifdef CONFIG_PM
426static int clks_sysdev_suspend(struct sys_device *dev, pm_message_t state)
427{
428 static pm_message_t prev_state;
429 struct clk *clkp;
430
431 switch (state.event) {
432 case PM_EVENT_ON:
433 /* Resumeing from hibernation */
Paul Mundtb68d8202009-05-12 03:45:08 +0900434 if (prev_state.event != PM_EVENT_FREEZE)
435 break;
Francesco VIRLINZI50cca712009-03-13 08:08:01 +0000436
Paul Mundtb68d8202009-05-12 03:45:08 +0900437 list_for_each_entry(clkp, &clock_list, node) {
438 if (likely(clkp->ops)) {
439 unsigned long rate = clkp->rate;
440
441 if (likely(clkp->ops->set_parent))
442 clkp->ops->set_parent(clkp,
443 clkp->parent);
444 if (likely(clkp->ops->set_rate))
445 clkp->ops->set_rate(clkp,
446 rate, NO_CHANGE);
447 else if (likely(clkp->ops->recalc))
448 clkp->rate = clkp->ops->recalc(clkp);
449 }
Francesco VIRLINZI4a550262009-03-11 07:42:05 +0000450 }
451 break;
452 case PM_EVENT_FREEZE:
453 break;
454 case PM_EVENT_SUSPEND:
455 break;
456 }
457
458 prev_state = state;
459 return 0;
460}
461
462static int clks_sysdev_resume(struct sys_device *dev)
463{
464 return clks_sysdev_suspend(dev, PMSG_ON);
465}
466
467static struct sysdev_class clks_sysdev_class = {
468 .name = "clks",
469};
470
471static struct sysdev_driver clks_sysdev_driver = {
472 .suspend = clks_sysdev_suspend,
473 .resume = clks_sysdev_resume,
474};
475
476static struct sys_device clks_sysdev_dev = {
477 .cls = &clks_sysdev_class,
478};
479
480static int __init clk_sysdev_init(void)
481{
482 sysdev_class_register(&clks_sysdev_class);
483 sysdev_driver_register(&clks_sysdev_class, &clks_sysdev_driver);
484 sysdev_register(&clks_sysdev_dev);
485
486 return 0;
487}
488subsys_initcall(clk_sysdev_init);
489#endif
490
Paul Mundt36ddf312006-01-16 22:14:17 -0800491int __init clk_init(void)
492{
Paul Mundt253b0882009-05-13 17:38:11 +0900493 int ret;
Paul Mundt36ddf312006-01-16 22:14:17 -0800494
Paul Mundt253b0882009-05-13 17:38:11 +0900495 ret = arch_clk_init();
496 if (unlikely(ret)) {
497 pr_err("%s: CPU clock registration failed.\n", __func__);
498 return ret;
Paul Mundt36ddf312006-01-16 22:14:17 -0800499 }
500
Paul Mundt253b0882009-05-13 17:38:11 +0900501 if (sh_mv.mv_clk_init) {
502 ret = sh_mv.mv_clk_init();
503 if (unlikely(ret)) {
504 pr_err("%s: machvec clock initialization failed.\n",
505 __func__);
506 return ret;
507 }
508 }
dmitry pervushindfbbbe92007-05-15 08:42:22 +0900509
Paul Mundt36ddf312006-01-16 22:14:17 -0800510 /* Kick the child clocks.. */
Paul Mundtb1f6cfe2009-05-12 04:27:43 +0900511 recalculate_root_clocks();
Paul Mundt36ddf312006-01-16 22:14:17 -0800512
Paul Mundt4ff29ff2009-05-12 05:14:53 +0900513 /* Enable the necessary init clocks */
514 clk_enable_init_clocks();
515
Paul Mundt36ddf312006-01-16 22:14:17 -0800516 return ret;
517}
518
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900519static int __init clk_proc_init(void)
Paul Mundt36ddf312006-01-16 22:14:17 -0800520{
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900521 struct proc_dir_entry *p;
522 p = create_proc_read_entry("clocks", S_IRUSR, NULL,
523 show_clocks, NULL);
524 if (unlikely(!p))
525 return -EINVAL;
Paul Mundt36ddf312006-01-16 22:14:17 -0800526
527 return 0;
528}
Paul Mundtdb62e5b2007-04-26 12:17:20 +0900529subsys_initcall(clk_proc_init);