devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
	linux-arm-kernel@lists.infradead.org
Cc: naveenkrishna.ch@gmail.com, linux-samsung-soc@vger.kernel.org,
	catalin.marinas@arm.com, robh@kernel.org,
	devicetree@vger.kernel.org, kgene.kim@samsung.com,
	gregkh@linuxfoundation.org,
	Mike Turquette <mturquette@linaro.org>
Subject: Re: [PATCH v4 4/8] clk: samsung: add initial clock support for Exynos7 SoC
Date: Sat, 13 Sep 2014 13:17:06 +0200	[thread overview]
Message-ID: <541427B2.4030108@gmail.com> (raw)
In-Reply-To: <1410535592-5782-6-git-send-email-ch.naveen@samsung.com>

Hi Naveen,

Please see my comments inline.

On 12.09.2014 17:26, Naveen Krishna Chatradhi wrote:
> Add initial clock support for Exynos7 SoC which is required
> to bring up platforms based on Exynos7.

[snip]

> +External clocks:
> +
> +There are several clocks that are generated outside the SoC. It
> +is expected that they are defined using standard clock bindings
> +with following clock-output-names:
> +
> + - "fin_pll" - PLL input clock from XXTI

In addition to just relying on clock names (which I hope to finally go
away from common clock framework some day) the binding should be defined
to take all input clocks using generic clock bindings (i.e. clocks and
clock-names). Even if the driver wouldn't use that yet, this would help
with determining initialization order of clock providers.

> +
> +Required Properties for Clock Controller:
> +
> + - compatible: clock controllers will use one of the following
> +	compatible strings to indicate the clock controller
> +	functionality.
> +
> +	- "samsung,exynos7-clock-topc"
> +	- "samsung,exynos7-clock-top0"
> +	- "samsung,exynos7-clock-peric0"
> +	- "samsung,exynos7-clock-peric1"
> +	- "samsung,exynos7-clock-peris"
> +
> + - reg: physical base address of the controller and the length of
> +	memory mapped region.
> +
> + - #clock-cells: should be 1.
> diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
> index 6fb4bc6..5da0ba9 100644
> --- a/drivers/clk/samsung/Makefile
> +++ b/drivers/clk/samsung/Makefile
> @@ -18,3 +18,4 @@ obj-$(CONFIG_S3C2412_COMMON_CLK)+= clk-s3c2412.o
>  obj-$(CONFIG_S3C2443_COMMON_CLK)+= clk-s3c2443.o
>  obj-$(CONFIG_ARCH_S3C64XX)	+= clk-s3c64xx.o
>  obj-$(CONFIG_ARCH_S5PV210)	+= clk-s5pv210.o clk-s5pv210-audss.o
> +obj-$(CONFIG_ARCH_EXYNOS7)	+= clk-exynos7.o

Please keep the entries sorted alphabetically.

> diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c
> new file mode 100644
> index 0000000..3ea8d0e
> --- /dev/null
> +++ b/drivers/clk/samsung/clk-exynos7.c

[snip]

> +static struct samsung_fixed_factor_clock topc_fixed_factor_clks[] __initdata = {
> +	FFACTOR(0, "ffac_topc_bus0_pll_div2", "mout_bus0_pll_ctrl", 1, 2, 0),
> +	FFACTOR(0, "ffac_topc_bus0_pll_div4",
> +				"ffac_topc_bus0_pll_div2", 1, 2, 0),

Please use a consistent way of breaking long lines. Here you have 3
tabs, but further in the driver I can see 1 tab or 2 tabs. I'd recommend
making them all 1 tab.

> +	FFACTOR(0, "ffac_topc_bus1_pll_div2", "mout_bus1_pll_ctrl", 1, 2, 0),
> +	FFACTOR(0, "ffac_topc_cc_pll_div2", "mout_cc_pll_ctrl", 1, 2, 0),
> +	FFACTOR(0, "ffac_topc_mfc_pll_div2", "mout_mfc_pll_ctrl", 1, 2, 0),
> +};

[snip]

> +static void __init exynos7_clk_topc_init(struct device_node *np)
> +{
> +	struct exynos_cmu_info cmu = {0};
> +
> +	cmu.pll_clks = topc_pll_clks;
> +	cmu.nr_pll_clks = ARRAY_SIZE(topc_pll_clks);
> +	cmu.mux_clks = topc_mux_clks;
> +	cmu.nr_mux_clks = ARRAY_SIZE(topc_mux_clks);
> +	cmu.div_clks = topc_div_clks;
> +	cmu.nr_div_clks = ARRAY_SIZE(topc_div_clks);
> +	cmu.fixed_factor_clks = topc_fixed_factor_clks;
> +	cmu.nr_fixed_factor_clks = ARRAY_SIZE(topc_fixed_factor_clks);
> +	cmu.clk_regs = topc_clk_regs;
> +	cmu.nr_clk_regs = ARRAY_SIZE(topc_clk_regs);

I wonder if you couldn't simply make this struct statically initialized
and marked as __initdata.

Otherwise looks good.

Best regards,
Tomasz

  reply	other threads:[~2014-09-13 11:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 15:26 [PATCH v4 0/8] arch: arm64: enable support for Samsung Exynos7 SoC Naveen Krishna Chatradhi
2014-09-12 15:26 ` Naveen Krishna Chatradhi
2014-09-13  5:19   ` Thomas Abraham
2014-09-12 15:26 ` [PATCH v4 1/8] clk: samsung: add support for 145xx and 1460x PLLs Naveen Krishna Chatradhi
2014-09-12 15:26 ` [PATCH v4 2/8] clk: samsung: Factor out the common code to clk.c Naveen Krishna Chatradhi
2014-09-13 11:20   ` Tomasz Figa
2014-09-22  4:23     ` Abhilash Kesavan
2014-09-12 15:26 ` [PATCH v4 3/8] clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info Naveen Krishna Chatradhi
2014-09-12 15:26 ` [PATCH v4 4/8] clk: samsung: add initial clock support for Exynos7 SoC Naveen Krishna Chatradhi
2014-09-13 11:17   ` Tomasz Figa [this message]
2014-09-22  4:24     ` Abhilash Kesavan
     [not found] ` <1410535592-5782-1-git-send-email-ch.naveen-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-09-12 15:26   ` [PATCH v4 5/8] arm64: dts: Add initial device tree support for EXYNOS7 Naveen Krishna Chatradhi
2014-09-19 11:26     ` Kukjin Kim
2014-09-12 15:26 ` [PATCH v4 6/8] arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support Naveen Krishna Chatradhi
2014-09-18 16:18   ` Catalin Marinas
2014-09-22  4:27     ` Abhilash Kesavan
2014-09-12 15:26 ` [PATCH v4 7/8] tty/serial: samsung: enable usage for 64-bit Exynos platforms Naveen Krishna Chatradhi
2014-09-12 15:26 ` [PATCH v4 8/8] arm64: dts: add <dt-bindings/> symlink Naveen Krishna Chatradhi

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=541427B2.4030108@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=ch.naveen@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=naveenkrishna.ch@gmail.com \
    --cc=robh@kernel.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).