aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/sh/clk/core.c87
-rw-r--r--include/linux/sh_clk.h1
2 files changed, 0 insertions, 88 deletions
diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c
index 352036b1f9a2..db257a35e71a 100644
--- a/drivers/sh/clk/core.c
+++ b/drivers/sh/clk/core.c
@@ -25,7 +25,6 @@
25#include <linux/seq_file.h> 25#include <linux/seq_file.h>
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/debugfs.h>
29#include <linux/cpufreq.h> 28#include <linux/cpufreq.h>
30#include <linux/clk.h> 29#include <linux/clk.h>
31#include <linux/sh_clk.h> 30#include <linux/sh_clk.h>
@@ -225,9 +224,6 @@ int clk_reparent(struct clk *child, struct clk *parent)
225 list_add(&child->sibling, &parent->children); 224 list_add(&child->sibling, &parent->children);
226 child->parent = parent; 225 child->parent = parent;
227 226
228 /* now do the debugfs renaming to reattach the child
229 to the proper parent */
230
231 return 0; 227 return 0;
232} 228}
233 229
@@ -685,89 +681,6 @@ static int __init clk_syscore_init(void)
685subsys_initcall(clk_syscore_init); 681subsys_initcall(clk_syscore_init);
686#endif 682#endif
687 683
688/*
689 * debugfs support to trace clock tree hierarchy and attributes
690 */
691static struct dentry *clk_debugfs_root;
692
693static int clk_debugfs_register_one(struct clk *c)
694{
695 int err;
696 struct dentry *d;
697 struct clk *pa = c->parent;
698 char s[255];
699 char *p = s;
700
701 p += sprintf(p, "%p", c);
702 d = debugfs_create_dir(s, pa ? pa->dentry : clk_debugfs_root);
703 if (!d)
704 return -ENOMEM;
705 c->dentry = d;
706
707 d = debugfs_create_u8("usecount", S_IRUGO, c->dentry, (u8 *)&c->usecount);
708 if (!d) {
709 err = -ENOMEM;
710 goto err_out;
711 }
712 d = debugfs_create_u32("rate", S_IRUGO, c->dentry, (u32 *)&c->rate);
713 if (!d) {
714 err = -ENOMEM;
715 goto err_out;
716 }
717 d = debugfs_create_x32("flags", S_IRUGO, c->dentry, (u32 *)&c->flags);
718 if (!d) {
719 err = -ENOMEM;
720 goto err_out;
721 }
722 return 0;
723
724err_out:
725 debugfs_remove_recursive(c->dentry);
726 return err;
727}
728
729static int clk_debugfs_register(struct clk *c)
730{
731 int err;
732 struct clk *pa = c->parent;
733
734 if (pa && !pa->dentry) {
735 err = clk_debugfs_register(pa);
736 if (err)
737 return err;
738 }
739
740 if (!c->dentry) {
741 err = clk_debugfs_register_one(c);
742 if (err)
743 return err;
744 }
745 return 0;
746}
747
748static int __init clk_debugfs_init(void)
749{
750 struct clk *c;
751 struct dentry *d;
752 int err;
753
754 d = debugfs_create_dir("clock", NULL);
755 if (!d)
756 return -ENOMEM;
757 clk_debugfs_root = d;
758
759 list_for_each_entry(c, &clock_list, node) {
760 err = clk_debugfs_register(c);
761 if (err)
762 goto err_out;
763 }
764 return 0;
765err_out:
766 debugfs_remove_recursive(clk_debugfs_root);
767 return err;
768}
769late_initcall(clk_debugfs_init);
770
771static int __init clk_late_init(void) 684static int __init clk_late_init(void)
772{ 685{
773 unsigned long flags; 686 unsigned long flags;
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h
index 9237c299641c..a20831cf336a 100644
--- a/include/linux/sh_clk.h
+++ b/include/linux/sh_clk.h
@@ -52,7 +52,6 @@ struct clk {
52 52
53 unsigned long arch_flags; 53 unsigned long arch_flags;
54 void *priv; 54 void *priv;
55 struct dentry *dentry;
56 struct clk_mapping *mapping; 55 struct clk_mapping *mapping;
57 struct cpufreq_frequency_table *freq_table; 56 struct cpufreq_frequency_table *freq_table;
58 unsigned int nr_freqs; 57 unsigned int nr_freqs;