linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] clk: pxa: add missing pxa27x clocks for Irda and sa1100-rtc
Date: Mon, 12 Jan 2015 15:52:56 -0800	[thread overview]
Message-ID: <20150112235256.20842.68349@quantum> (raw)
In-Reply-To: <1419688528-760-5-git-send-email-robert.jarzmik@free.fr>

Quoting Robert Jarzmik (2014-12-27 05:55:28)
> Add 2 clocks which were erronously forgotten by the clock framework
> port, namely :
>  - sa1100-rtc
>  - irda for pxa2xx-ir:UARTCLK
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>

Acked-by: Michael Turquette <mturquette@linaro.org>

> ---
>  drivers/clk/pxa/clk-pxa27x.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/clk/pxa/clk-pxa27x.c b/drivers/clk/pxa/clk-pxa27x.c
> index 2b8343a..9a31b77 100644
> --- a/drivers/clk/pxa/clk-pxa27x.c
> +++ b/drivers/clk/pxa/clk-pxa27x.c
> @@ -353,6 +353,34 @@ static u8 clk_pxa27x_memory_get_parent(struct clk_hw *hw)
>  PARENTS(clk_pxa27x_memory) = { "osc_13mhz", "system_bus", "run" };
>  MUX_RO_RATE_RO_OPS(clk_pxa27x_memory, "memory");
>  
> +#define DUMMY_CLK(_con_id, _dev_id, _parent) \
> +       { .con_id = _con_id, .dev_id = _dev_id, .parent = _parent }
> +struct dummy_clk {
> +       const char *con_id;
> +       const char *dev_id;
> +       const char *parent;
> +};
> +static struct dummy_clk dummy_clks[] __initdata = {
> +       DUMMY_CLK(NULL, "pxa27x-gpio", "osc_32_768khz"),
> +       DUMMY_CLK(NULL, "sa1100-rtc", "osc_32_768khz"),
> +       DUMMY_CLK("UARTCLK", "pxa2xx-ir", "STUART"),
> +};
> +
> +static void __init pxa27x_dummy_clocks_init(void)
> +{
> +       struct clk *clk;
> +       struct dummy_clk *d;
> +       const char *name;
> +       int i;
> +
> +       for (i = 0; i < ARRAY_SIZE(dummy_clks); i++) {
> +               d = &dummy_clks[i];
> +               name = d->dev_id ? d->dev_id : d->con_id;
> +               clk = clk_register_fixed_factor(NULL, name, d->parent, 0, 1, 1);
> +               clk_register_clkdev(clk, d->con_id, d->dev_id);
> +       }
> +}
> +
>  static void __init pxa27x_base_clocks_init(void)
>  {
>         pxa27x_register_plls();
> @@ -365,6 +393,7 @@ static void __init pxa27x_base_clocks_init(void)
>  int __init pxa27x_clocks_init(void)
>  {
>         pxa27x_base_clocks_init();
> +       pxa27x_dummy_clocks_init();
>         return clk_pxa_cken_init(pxa27x_clocks, ARRAY_SIZE(pxa27x_clocks));
>  }
>  
> -- 
> 2.1.0
> 

  reply	other threads:[~2015-01-12 23:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-27 13:55 [PATCH 0/4] Transition of pxa25x and pxa27x to clock framework Robert Jarzmik
2014-12-27 13:55 ` [PATCH 1/4] arm: pxa: change clocks init sequence Robert Jarzmik
2015-01-12 23:48   ` Mike Turquette
2014-12-27 13:55 ` [PATCH 2/4] arm: pxa: Transition pxa25x and pxa27x to clk framework Robert Jarzmik
2015-01-12 23:50   ` Mike Turquette
2014-12-27 13:55 ` [PATCH 3/4] arm: pxa: move gpio11 clock to board files Robert Jarzmik
2015-01-12 23:51   ` Mike Turquette
2014-12-27 13:55 ` [PATCH 4/4] clk: pxa: add missing pxa27x clocks for Irda and sa1100-rtc Robert Jarzmik
2015-01-12 23:52   ` Mike Turquette [this message]
2015-01-16 12:42     ` Robert Jarzmik
2015-01-12 11:06 ` [PATCH 0/4] Transition of pxa25x and pxa27x to clock framework Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150112235256.20842.68349@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).