linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/10] clk: sunxi: Add module 0 (storage) style clock support for A80
Date: Sat, 6 Dec 2014 18:13:22 +0100	[thread overview]
Message-ID: <20141206171322.GB12434@lukather> (raw)
In-Reply-To: <1417588565-26215-2-git-send-email-wens@csie.org>

Hi Chen-Yu,

Thanks for working on this

On Wed, Dec 03, 2014 at 02:35:56PM +0800, Chen-Yu Tsai wrote:
> The module 0 style clocks, or storage module clocks as named in the
> official SDK, are almost the same as the module 0 clocks on earlier
> Allwinner SoCs. The only difference is wider mux register bits.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  Documentation/devicetree/bindings/clock/sunxi.txt |  1 +
>  drivers/clk/sunxi/clk-mod0.c                      | 24 +++++++++++++++++++++++
>  2 files changed, 25 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
> index 9dc4f55..d0fb9c5 100644
> --- a/Documentation/devicetree/bindings/clock/sunxi.txt
> +++ b/Documentation/devicetree/bindings/clock/sunxi.txt
> @@ -58,6 +58,7 @@ Required properties:
>  	"allwinner,sun4i-a10-mmc-output-clk" - for the MMC output clock on A10
>  	"allwinner,sun4i-a10-mmc-sample-clk" - for the MMC sample clock on A10
>  	"allwinner,sun4i-a10-mod0-clk" - for the module 0 family of clocks
> +	"allwinner,sun9i-a80-mod0-clk" - for module 0 (storage) clocks on A80
>  	"allwinner,sun8i-a23-mbus-clk" - for the MBUS clock on A23
>  	"allwinner,sun7i-a20-out-clk" - for the external output clocks
>  	"allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31
> diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
> index 658d74f..d72063f 100644
> --- a/drivers/clk/sunxi/clk-mod0.c
> +++ b/drivers/clk/sunxi/clk-mod0.c
> @@ -93,6 +93,30 @@ static void __init sun4i_a10_mod0_setup(struct device_node *node)
>  }
>  CLK_OF_DECLARE(sun4i_a10_mod0, "allwinner,sun4i-a10-mod0-clk", sun4i_a10_mod0_setup);
>  
> +static const struct factors_data sun9i_a80_mod0_data __initconst = {
> +	.enable = 31,
> +	.mux = 24,
> +	.muxmask = BIT(3) | BIT(2) | BIT(1) | BIT(0),
> +	.table = &sun4i_a10_mod0_config,
> +	.getter = sun4i_a10_get_mod0_factors,
> +};
> +
> +static void __init sun9i_a80_mod0_setup(struct device_node *node)
> +{
> +	void __iomem *reg;
> +
> +	reg = of_io_request_and_map(node, 0, of_node_full_name(node));
> +	if (!reg) {
> +		pr_err("Could not get registers for mod0-clk: %s\n",
> +		       node->name);
> +		return;
> +	}
> +
> +	sunxi_factors_register(node, &sun9i_a80_mod0_data,
> +			       &sun4i_a10_mod0_lock, reg);

Is there any particular reason to use the mod0 lock there? Or since
only the A80 mod0 clocks are going to be used, it doesn't make any
difference?

(Which makes me wonder why do we the same spinlock for all the
instances of the mod0 clocks, but that's another story)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141206/e45bd20a/attachment-0001.sig>

  reply	other threads:[~2014-12-06 17:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  6:35 [PATCH 00/10] ARM: sun9i: Enable MMC support on Allwinner A80 Chen-Yu Tsai
2014-12-03  6:35 ` [PATCH 01/10] clk: sunxi: Add module 0 (storage) style clock support for A80 Chen-Yu Tsai
2014-12-06 17:13   ` Maxime Ripard [this message]
2014-12-07  1:13     ` [linux-sunxi] " Chen-Yu Tsai
2014-12-07 15:16       ` Maxime Ripard
2014-12-03  6:35 ` [PATCH 02/10] ARM: dts: sun9i: Add mmc module clock nodes " Chen-Yu Tsai
2014-12-06 17:24   ` Maxime Ripard
2014-12-07  1:11     ` Chen-Yu Tsai
2014-12-07 15:14       ` Maxime Ripard
2014-12-03  6:35 ` [PATCH 03/10] clk: sunxi: Add driver for A80 MMC config clocks/resets Chen-Yu Tsai
2014-12-06 18:01   ` Maxime Ripard
2014-12-07  1:30     ` Chen-Yu Tsai
2014-12-07 15:20       ` Maxime Ripard
2014-12-03  6:35 ` [PATCH 04/10] ARM: dts: sun9i: Add clock-indices property for bus gate clocks Chen-Yu Tsai
2014-12-03  6:36 ` [PATCH 05/10] ARM: dts: sun9i: Add mmc config clock nodes Chen-Yu Tsai
2014-12-07 15:00   ` Maxime Ripard
2014-12-07 16:00     ` Chen-Yu Tsai
2014-12-07 17:45       ` Maxime Ripard
2014-12-03  6:36 ` [PATCH 06/10] ARM: dts: sun9i: Add mmc controller nodes to the A80 dtsi Chen-Yu Tsai
2014-12-03  6:36 ` [PATCH 07/10] ARM: dts: sun9i: Add pinmux setting for mmc0 Chen-Yu Tsai
2014-12-07 15:01   ` Maxime Ripard
2014-12-03  6:36 ` [PATCH 08/10] ARM: dts: sun9i: Enable mmc0 on A80 Optimus Board Chen-Yu Tsai
2014-12-07 15:02   ` Maxime Ripard
2014-12-07 15:18     ` Chen-Yu Tsai
2014-12-07 15:35       ` Maxime Ripard
2014-12-03  6:36 ` [PATCH 09/10] ARM: dts: sun9i: Add pinmux settings for mmc2 Chen-Yu Tsai
2014-12-07 15:03   ` Maxime Ripard
2014-12-07 15:11     ` Chen-Yu Tsai
2014-12-07 17:46       ` Maxime Ripard
2014-12-03  6:36 ` [PATCH 10/10] ARM: dts: sun9i: Enable mmc2 on A80 Optimus Board Chen-Yu Tsai

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=20141206171322.GB12434@lukather \
    --to=maxime.ripard@free-electrons.com \
    --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).