aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/clock.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2006-06-22 17:18:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-22 17:18:21 -0400
commit92b7eb8ffc0741f1fd5fbd5458a466d608310442 (patch)
tree55b34b892da1a64f62d7ae922c75fa903247e208 /arch/arm/mach-s3c2410/clock.c
parent99c13853ffa26dd6527995b3f47548e075f201fb (diff)
[ARM] 3628/1: S3C24XX: add get_rate call to struct clk
Patch from Ben Dooks Add a get_rate call to allow an given clock to over-ride the clk_get_rate() call. This provides support for clocks which rely on division of their parent to correctly report their frequency when the parent can also change. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410/clock.c')
-rw-r--r--arch/arm/mach-s3c2410/clock.c7
1 files changed, 5 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}