aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2410/clock.c7
-rw-r--r--arch/arm/mach-s3c2410/clock.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index f553e5ee7477..c5c93c333ac6 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -148,8 +148,11 @@ unsigned long clk_get_rate(struct clk *clk)
148 if (clk->rate != 0) 148 if (clk->rate != 0)
149 return clk->rate; 149 return clk->rate;
150 150
151 while (clk->parent != NULL && clk->rate == 0) 151 if (clk->get_rate != NULL)
152 clk = clk->parent; 152 return (clk->get_rate)(clk);
153
154 if (clk->parent != NULL)
155 return clk_get_rate(clk->parent);
153 156
154 return clk->rate; 157 return clk->rate;
155} 158}
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h
index 1bee5708c354..9456c81eb5d3 100644
--- a/arch/arm/mach-s3c2410/clock.h
+++ b/arch/arm/mach-s3c2410/clock.h
@@ -22,6 +22,7 @@ struct clk {
22 22
23 int (*enable)(struct clk *, int enable); 23 int (*enable)(struct clk *, int enable);
24 int (*set_rate)(struct clk *c, unsigned long rate); 24 int (*set_rate)(struct clk *c, unsigned long rate);
25 unsigned long (*get_rate)(struct clk *c);
25 unsigned long (*round_rate)(struct clk *c, unsigned long rate); 26 unsigned long (*round_rate)(struct clk *c, unsigned long rate);
26 int (*set_parent)(struct clk *c, struct clk *parent); 27 int (*set_parent)(struct clk *c, struct clk *parent);
27}; 28};