From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>, linux-sh@vger.kernel.org
Cc: horms@verge.net.au, mturquette@linaro.org, geert@linux-m68k.org,
magnus.damm@gmail.com, devicetree@vger.kernel.org,
mark.rutland@arm.com
Subject: Re: [PATCH v7 1/2] clk: shmobile: div6: support selectable-input clocks
Date: Tue, 25 Nov 2014 14:19:45 +0200 [thread overview]
Message-ID: <1571106.tcuMiAsC17@avalon> (raw)
In-Reply-To: <1415375468-15378-2-git-send-email-ulrich.hecht+renesas@gmail.com>
Hi Ulrich,
Thank you for the patch.
On Friday 07 November 2014 16:51:07 Ulrich Hecht wrote:
> Support for setting the parent at initialization time based on the current
> hardware configuration in DIV6 clocks with selectable parents as found in
> the r8a73a4, r8a7740, sh73a0, and other SoCs.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> drivers/clk/shmobile/clk-div6.c | 113 ++++++++++++++++++++++++++++++++-----
> 1 file changed, 101 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/clk/shmobile/clk-div6.c
> b/drivers/clk/shmobile/clk-div6.c index f065f69..639241e 100644
> --- a/drivers/clk/shmobile/clk-div6.c
> +++ b/drivers/clk/shmobile/clk-div6.c
[snip]
> +static int cpg_div6_clock_set_parent(struct clk_hw *hw, u8 index)
> +{
> + struct div6_clock *clock = to_div6_clock(hw);
> + u8 hw_index;
> + u32 mask;
> +
> + if (index >= __clk_get_num_parents(hw->clk))
> + return -EINVAL;
Should this check be moved to the CCF core ?
> + mask = ~((BIT(clock->src_width) - 1) << clock->src_shift);
> + hw_index = clock->parents[index];
> +
> + clk_writel((clk_readl(clock->reg) & mask) |
> + (hw_index << clock->src_shift), clock->reg);
>
> return 0;
> }
[snip]
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-11-25 12:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 15:51 [PATCH v7 0/2] clk: shmobile: DIV6 clock variable parent support Ulrich Hecht
2014-11-07 15:51 ` [PATCH v7 1/2] clk: shmobile: div6: support selectable-input clocks Ulrich Hecht
2014-11-25 12:19 ` Laurent Pinchart [this message]
2014-11-07 15:51 ` [PATCH v7 2/2] clk: shmobile: document DIV6 clock parent bindings Ulrich Hecht
2014-11-10 9:16 ` [PATCH v7 0/2] clk: shmobile: DIV6 clock variable parent support Geert Uytterhoeven
2014-11-11 10:16 ` Magnus Damm
2014-11-12 10:56 ` Geert Uytterhoeven
2014-11-21 5:54 ` Magnus Damm
2014-11-21 7:38 ` Geert Uytterhoeven
2014-11-25 1:49 ` Mike Turquette
2014-11-25 10:39 ` Geert Uytterhoeven
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=1571106.tcuMiAsC17@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=horms@verge.net.au \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=ulrich.hecht+renesas@gmail.com \
/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).