From: "Emilio López" <emilio@elopez.com.ar>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>,
kevin.z.m.zh@gmail.com, sunny@allwinnertech.com,
shuge@allwinnertech.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] clk: sunxi: Allow to specify the divider width from the dividers data
Date: Tue, 30 Jul 2013 21:27:33 -0300 [thread overview]
Message-ID: <51F859F5.70501@elopez.com.ar> (raw)
In-Reply-To: <1375195462-19566-3-git-send-email-maxime.ripard@free-electrons.com>
El 30/07/13 11:44, Maxime Ripard escribió:
> The divider width used to be hardcoded. Some A31 dividers are no longer
> with the hardcoded width, so we need to make it specific to each divider
> and set it in the dividers data.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Looks good to me,
Reviewed-by: Emilio López <emilio@elopez.com.ar>
> ---
> drivers/clk/sunxi/clk-sunxi.c | 24 +++++++++++++-----------
> 1 file changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
> index 3c91888..6e9cbc9 100644
> --- a/drivers/clk/sunxi/clk-sunxi.c
> +++ b/drivers/clk/sunxi/clk-sunxi.c
> @@ -277,26 +277,28 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
> * sunxi_divider_clk_setup() - Setup function for simple divider clocks
> */
>
> -#define SUNXI_DIVISOR_WIDTH 2
> -
> struct div_data {
> - u8 shift;
> - u8 pow;
> + u8 shift;
> + u8 pow;
> + u8 width;
> };
>
> static const __initconst struct div_data sun4i_axi_data = {
> - .shift = 0,
> - .pow = 0,
> + .shift = 0,
> + .pow = 0,
> + .width = 2,
> };
Is there a style rule governing the use of tabs/spaces on structs? Maybe
we should do this alignment cleanup on the full file some time.
>
> static const __initconst struct div_data sun4i_ahb_data = {
> - .shift = 4,
> - .pow = 1,
> + .shift = 4,
> + .pow = 1,
> + .width = 2,
> };
>
> static const __initconst struct div_data sun4i_apb0_data = {
> - .shift = 8,
> - .pow = 1,
> + .shift = 8,
> + .pow = 1,
> + .width = 2,
> };
>
> static void __init sunxi_divider_clk_setup(struct device_node *node,
> @@ -312,7 +314,7 @@ static void __init sunxi_divider_clk_setup(struct device_node *node,
> clk_parent = of_clk_get_parent_name(node, 0);
>
> clk = clk_register_divider(NULL, clk_name, clk_parent, 0,
> - reg, data->shift, SUNXI_DIVISOR_WIDTH,
> + reg, data->shift, data->width,
> data->pow ? CLK_DIVIDER_POWER_OF_TWO : 0,
> &clk_lock);
> if (clk) {
>
Thanks!
Emilio
next prev parent reply other threads:[~2013-07-31 0:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 14:44 [PATCH 0/4] Add support for the Allwinner A31 clocks Maxime Ripard
2013-07-30 14:44 ` [PATCH 1/4] clk: sunxi: Rename the structure to prepare the addition of sun6i Maxime Ripard
2013-07-31 0:14 ` Emilio López
2013-07-31 9:20 ` Maxime Ripard
2013-07-30 14:44 ` [PATCH 2/4] clk: sunxi: Allow to specify the divider width from the dividers data Maxime Ripard
2013-07-31 0:27 ` Emilio López [this message]
2013-07-30 14:44 ` [PATCH 3/4] clk: sunxi: Add A31 clocks support Maxime Ripard
2013-07-31 1:01 ` Emilio López
2013-07-31 10:14 ` Maxime Ripard
2013-08-12 12:53 ` Mark Rutland
2013-08-12 13:01 ` Emilio López
2013-08-12 13:54 ` Mark Rutland
2013-07-30 14:44 ` [PATCH 4/4] ARM: sun6i: Enable clock support in the DTSI Maxime Ripard
2013-07-31 1:36 ` Emilio López
2013-07-31 7:37 ` Maxime Ripard
[not found] ` <2013073116110750016327@gmail.com>
2013-07-31 11:37 ` Emilio López
2013-07-31 11:49 ` maxime.ripard
[not found] ` <2013073120102496855035@gmail.com>
2013-07-31 15:49 ` maxime.ripard
[not found] ` <2013080108343040654547@gmail.com>
2013-08-01 9:53 ` maxime.ripard
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=51F859F5.70501@elopez.com.ar \
--to=emilio@elopez.com.ar \
--cc=kevin.z.m.zh@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=mturquette@linaro.org \
--cc=shuge@allwinnertech.com \
--cc=sunny@allwinnertech.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