From fa0857f9688ed09e55eb22c19a29bfdb47d01452 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 12 May 2009 03:50:44 +0900 Subject: [PATCH] --- yaml --- r: 146815 b: refs/heads/master c: a02cb230bb4fca04f091746c593de720a0e3a94a h: refs/heads/master i: 146813: adac9cedcb8c05cd92e05d8ec89bc4eb59bdad4c 146811: af8eae2bd119b242990afbe7d970130f1b07f7d6 146807: a06abb031d79854531d4eefbd723f29e64a5d6b3 146799: 7ef62ab7b7a8c8b1fd32b10c17320bd7c4181cd0 146783: 70dff1bbf9d1ca6ee9fb1bb950cae7ae7ff23676 146751: a9a14bbc673eb9cc269e7044669699ac446c6f9d 146687: d910d3f94b41d7ae62be9be95ffe224aba5d9a46 v: v3 --- [refs] | 2 +- trunk/arch/sh/include/asm/clock.h | 2 +- trunk/arch/sh/kernel/cpu/clock.c | 6 ++++++ trunk/arch/sh/kernel/cpu/sh2/clock-sh7619.c | 7 +------ trunk/arch/sh/kernel/cpu/sh2a/clock-sh7203.c | 7 +------ trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c | 7 +------ trunk/arch/sh/kernel/cpu/sh4a/clock-sh7763.c | 7 +------ 7 files changed, 12 insertions(+), 26 deletions(-) diff --git a/[refs] b/[refs] index 096cf8e76463..371aeaaeef28 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b68d8201433a91cabbcbeae48b53d8c1c426433a +refs/heads/master: a02cb230bb4fca04f091746c593de720a0e3a94a diff --git a/trunk/arch/sh/include/asm/clock.h b/trunk/arch/sh/include/asm/clock.h index d63352b375cc..241f1c1d9ce1 100644 --- a/trunk/arch/sh/include/asm/clock.h +++ b/trunk/arch/sh/include/asm/clock.h @@ -44,7 +44,7 @@ int __init arch_clk_init(void); /* arch/sh/kernel/cpu/clock.c */ int clk_init(void); - +unsigned long followparent_recalc(struct clk *clk); void clk_recalc_rate(struct clk *); int clk_register(struct clk *); diff --git a/trunk/arch/sh/kernel/cpu/clock.c b/trunk/arch/sh/kernel/cpu/clock.c index b022affb44cd..17f6c078e851 100644 --- a/trunk/arch/sh/kernel/cpu/clock.c +++ b/trunk/arch/sh/kernel/cpu/clock.c @@ -90,6 +90,12 @@ static void propagate_rate(struct clk *clk) } } +/* Used for clocks that always have same value as the parent clock */ +unsigned long followparent_recalc(struct clk *clk) +{ + return clk->parent->rate; +} + static void __clk_init(struct clk *clk) { /* diff --git a/trunk/arch/sh/kernel/cpu/sh2/clock-sh7619.c b/trunk/arch/sh/kernel/cpu/sh2/clock-sh7619.c index 26799139aa7a..4fe863170e31 100644 --- a/trunk/arch/sh/kernel/cpu/sh2/clock-sh7619.c +++ b/trunk/arch/sh/kernel/cpu/sh2/clock-sh7619.c @@ -57,13 +57,8 @@ static struct clk_ops sh7619_bus_clk_ops = { .recalc = bus_clk_recalc, }; -static unsigned long cpu_clk_recalc(struct clk *clk) -{ - return clk->parent->rate; -} - static struct clk_ops sh7619_cpu_clk_ops = { - .recalc = cpu_clk_recalc, + .recalc = followparent_recalc, }; static struct clk_ops *sh7619_clk_ops[] = { diff --git a/trunk/arch/sh/kernel/cpu/sh2a/clock-sh7203.c b/trunk/arch/sh/kernel/cpu/sh2a/clock-sh7203.c index f8c6933857b3..940986965102 100644 --- a/trunk/arch/sh/kernel/cpu/sh2a/clock-sh7203.c +++ b/trunk/arch/sh/kernel/cpu/sh2a/clock-sh7203.c @@ -66,13 +66,8 @@ static struct clk_ops sh7203_bus_clk_ops = { .recalc = bus_clk_recalc, }; -static unsigned long cpu_clk_recalc(struct clk *clk) -{ - return clk->parent->rate; -} - static struct clk_ops sh7203_cpu_clk_ops = { - .recalc = cpu_clk_recalc, + .recalc = followparent_recalc, }; static struct clk_ops *sh7203_clk_ops[] = { diff --git a/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c index 5b1427f1ed41..4bdae84aa6b0 100644 --- a/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c +++ b/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7722.c @@ -646,15 +646,10 @@ static void sh7722_mstpcr_disable(struct clk *clk) sh7722_mstpcr_start_stop(clk, 0); } -static unsigned long sh7722_mstpcr_recalc(struct clk *clk) -{ - return clk->parent->rate; -} - static struct clk_ops sh7722_mstpcr_clk_ops = { .enable = sh7722_mstpcr_enable, .disable = sh7722_mstpcr_disable, - .recalc = sh7722_mstpcr_recalc, + .recalc = followparent_recalc, }; #define MSTPCR(_name, _parent, regnr, bitnr) \ diff --git a/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7763.c b/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7763.c index 26630fb190c7..db51cffc5d5b 100644 --- a/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7763.c +++ b/trunk/arch/sh/kernel/cpu/sh4a/clock-sh7763.c @@ -49,13 +49,8 @@ static struct clk_ops sh7763_bus_clk_ops = { .recalc = bus_clk_recalc, }; -static unsigned long cpu_clk_recalc(struct clk *clk) -{ - return clk->parent->rate; -} - static struct clk_ops sh7763_cpu_clk_ops = { - .recalc = cpu_clk_recalc, + .recalc = followparent_recalc, }; static struct clk_ops *sh7763_clk_ops[] = {