30 #include <linux/module.h>
31 #include <linux/kernel.h>
32 #include <linux/list.h>
33 #include <linux/errno.h>
36 #include <linux/device.h>
42 #if defined(CONFIG_DEBUG_FS)
46 #include <mach/hardware.h>
51 #include <plat/clock.h>
54 #include <linux/serial_core.h>
69 static int __init s3c_wdt_reset_init(
void)
72 if (IS_ERR(s3c2410_wdtclk))
89 if (IS_ERR(clk) || clk ==
NULL)
96 if ((clk->
usage++) == 0)
107 if (IS_ERR(clk) || clk ==
NULL)
112 if ((--clk->
usage) == 0)
122 if (IS_ERR_OR_NULL(clk))
129 return (clk->
ops->get_rate)(clk);
139 if (!IS_ERR_OR_NULL(clk) && clk->
ops && clk->
ops->round_rate)
140 return (clk->
ops->round_rate)(clk,
rate);
150 if (IS_ERR_OR_NULL(clk))
164 ret = (clk->
ops->set_rate)(clk, rate);
180 if (IS_ERR_OR_NULL(clk) || IS_ERR_OR_NULL(parent))
185 if (clk->
ops && clk->
ops->set_parent)
186 ret = (clk->
ops->set_parent)(clk, parent);
284 clk->
enable = clk_null_enable;
307 for (; nr_clks > 0; nr_clks--, clks++) {
311 __func__, clk, clk->
name);
331 for (; nr_clks > 0; nr_clks--, clkp++) {
352 for (; nr_clks > 0; nr_clks--, clkp++)
360 printk(
KERN_INFO "S3C24XX Clocks, Copyright 2004 Simtec Electronics\n");
387 #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
390 static struct dentry *clk_debugfs_root;
392 static int clk_debugfs_register_one(
struct clk *
c)
426 static int clk_debugfs_register(
struct clk *c)
431 if (pa && !pa->dent) {
432 err = clk_debugfs_register(pa);
438 err = clk_debugfs_register_one(c);
445 static int __init clk_debugfs_init(
void)
454 clk_debugfs_root =
d;
457 err = clk_debugfs_register(c);