diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-11-30 20:24:37 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-15 03:10:10 -0500 |
commit | b3bf41be06634d69959a68a2b53e1ffc92f0d103 (patch) | |
tree | 7575fc3d60e9a2f99e74b2862e1b3a43b7df1f92 /arch/arm/plat-s3c64xx | |
parent | 13bbd88504bfa0d205fa4121322869d8d7e083d0 (diff) |
ARM: SAMSUNG: Reduce size of struct clk.
Reduce the size of struct clk by 12 bytes and make defining clocks with
common implementation functions easier by moving the set_rate, get_rate,
round_rate and set_parent calls into a new structure called 'struct clk_ops'
and using that instead.
This change does make a few clocks larger as they need their own clk_ops,
but this is outweighed by the number of clocks with either no ops or having
a common set of ops.
Update all the users of this.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c64xx')
-rw-r--r-- | arch/arm/plat-s3c64xx/s3c6400-clock.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c index 20af0c29979a..f85406a11385 100644 --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c | |||
@@ -165,9 +165,11 @@ static struct clk clk_arm = { | |||
165 | .name = "armclk", | 165 | .name = "armclk", |
166 | .id = -1, | 166 | .id = -1, |
167 | .parent = &clk_mout_apll.clk, | 167 | .parent = &clk_mout_apll.clk, |
168 | .get_rate = s3c64xx_clk_arm_get_rate, | 168 | .ops = &(struct clk_ops) { |
169 | .set_rate = s3c64xx_clk_arm_set_rate, | 169 | .get_rate = s3c64xx_clk_arm_get_rate, |
170 | .round_rate = s3c64xx_clk_arm_round_rate, | 170 | .set_rate = s3c64xx_clk_arm_set_rate, |
171 | .round_rate = s3c64xx_clk_arm_round_rate, | ||
172 | }, | ||
171 | }; | 173 | }; |
172 | 174 | ||
173 | static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk) | 175 | static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk) |
@@ -182,11 +184,15 @@ static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk) | |||
182 | return rate; | 184 | return rate; |
183 | } | 185 | } |
184 | 186 | ||
187 | static struct clk_ops clk_dout_ops = { | ||
188 | .get_rate = s3c64xx_clk_doutmpll_get_rate, | ||
189 | }; | ||
190 | |||
185 | static struct clk clk_dout_mpll = { | 191 | static struct clk clk_dout_mpll = { |
186 | .name = "dout_mpll", | 192 | .name = "dout_mpll", |
187 | .id = -1, | 193 | .id = -1, |
188 | .parent = &clk_mout_mpll.clk, | 194 | .parent = &clk_mout_mpll.clk, |
189 | .get_rate = s3c64xx_clk_doutmpll_get_rate, | 195 | .ops = &clk_dout_ops, |
190 | }; | 196 | }; |
191 | 197 | ||
192 | static struct clk *clkset_spi_mmc_list[] = { | 198 | static struct clk *clkset_spi_mmc_list[] = { |