[RFC PATCH 02/14] ARM: vexpress: fix clocks definition to comply with new framework
Grant Likely
grant.likely at secretlab.ca
Thu Aug 19 05:25:27 EST 2010
On Wed, Aug 18, 2010 at 12:59 PM, Lorenzo Pieralisi
<lorenzo.pieralisi at arm.com> wrote:
> The new clock infrastructure introduced within the DT series of patches
> slightly changed how clocks are declared and initialized. Some clock
> definitions become platform specific.
>
> This patch fixes some typos on ARM Versatile Express clock definition
> and initialization that caused compile time errors.
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
I'll pick this one up and squash it into Jeremy's original versatile patch.
> ---
> arch/arm/mach-vexpress/include/mach/clkdev.h | 2 +-
> arch/arm/mach-vexpress/v2m.c | 13 ++++++++++++-
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-vexpress/include/mach/clkdev.h b/arch/arm/mach-vexpress/include/mach/clkdev.h
> index ad3f6e7..9e23cac 100644
> --- a/arch/arm/mach-vexpress/include/mach/clkdev.h
> +++ b/arch/arm/mach-vexpress/include/mach/clkdev.h
> @@ -9,7 +9,7 @@ struct clk_v2m {
> u32 config;
> };
>
> -const struct clk_ops clk_v2m_ops;
> +extern const struct clk_ops clk_v2m_ops;
>
> #define INIT_CLK_V2M(r,c) { .clk = INIT_CLK(clk_v2m_ops), \
> .rate = r, .config = c }
> diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
> index f22e272..06d6914 100644
> --- a/arch/arm/mach-vexpress/v2m.c
> +++ b/arch/arm/mach-vexpress/v2m.c
> @@ -285,12 +285,21 @@ static int clk_v2m_set_rate(struct clk *_clk, unsigned long rate)
> struct clk_v2m *clk = to_clk_v2m(_clk);
> int ret;
>
> - ret = v2m_cfg_write(clk->cofig, rate);
> + ret = v2m_cfg_write(clk->config, rate);
> if (!ret)
> clk->rate = rate;
> return ret;
> }
>
> +static void clk_v2m_put(struct clk *_clk)
> +{
> +}
> +
> +static int clk_v2m_get(struct clk *_clk)
> +{
> + return 1;
> +}
> +
> static unsigned long clk_v2m_get_rate(struct clk *clk)
> {
> return to_clk_v2m(clk)->rate;
> @@ -300,6 +309,8 @@ const struct clk_ops clk_v2m_ops = {
> .round_rate = clk_v2m_round_rate,
> .get_rate = clk_v2m_get_rate,
> .set_rate = clk_v2m_set_rate,
> + .get = clk_v2m_get,
> + .put = clk_v2m_put,
> };
>
> static struct clk_v2m osc1_clk =
> --
> 1.6.3.3
>
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the devicetree-discuss
mailing list