From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Mollie Wu <mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
Tetsuya Takinishi
<t.takinishi-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
andy.green-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org
Subject: Re: [PATCH 4/8] clk: Add clock driver for mb86s7x
Date: Mon, 14 Jul 2014 16:08:57 +0200 [thread overview]
Message-ID: <4408359.eoFHS4QiM2@wuerfel> (raw)
In-Reply-To: <1405233052-4688-1-git-send-email-mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Sunday 13 July 2014 14:30:52 Mollie Wu wrote:
> ---
> .../bindings/clock/fujitsu,mb86s7x_clk.txt | 32 ++
> drivers/clk/Makefile | 1 +
> drivers/clk/clk-mb86s7x.c | 352 +++++++++++++++++++++
> 3 files changed, 385 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/fujitsu,mb86s7x_clk.txt
> create mode 100644 drivers/clk/clk-mb86s7x.c
>
> diff --git a/Documentation/devicetree/bindings/clock/fujitsu,mb86s7x_clk.txt b/Documentation/devicetree/bindings/clock/fujitsu,mb86s7x_clk.txt
> new file mode 100644
> index 0000000..4a17d79
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/fujitsu,mb86s7x_clk.txt
> @@ -0,0 +1,32 @@
> +Fujitsu CRG11 clock driver bindings
> +-----------------------------------
> +
> +Required properties :
> +- compatible : Shall contain "fujitsu,mb86s7x_clk"
No wildcards in compatible strings please.
> +- #clock-cells : Shall be 0
> +- cntrlr : 0->ALW, 1->DDR3, 2->MAIN, 3->CA15, 4->HDMI, 5->DPHY
> +- domain : [0, 15]
> +- port : [0,7] -> Gateable Clock Ports. [8]->UngatedCLK
It would be good to be a bit more verbose here.
> +
> +struct clk *mb86s7x_clclk_register(struct device *cpu_dev)
> +{
> + struct clk_init_data init;
> + struct cl_clk *clc;
> +
> + clc = kzalloc(sizeof(*clc), GFP_KERNEL);
> + if (!clc) {
> + pr_err("could not allocate cl_clk\n");
> + return ERR_PTR(-ENOMEM);
> + }
> +
> + clc->hw.init = &init;
> + clc->cluster = topology_physical_package_id(cpu_dev->id);
> +
> + init.name = dev_name(cpu_dev);
> + init.ops = &clk_clc_ops;
> + init.flags = CLK_IS_ROOT | CLK_GET_RATE_NOCACHE;
> + init.num_parents = 0;
> +
> + return devm_clk_register(cpu_dev, &clc->hw);
> +}
> +
> +static int mb86s7x_clclk_of_init(void)
> +{
> + int cpu;
> + struct clk *clk;
> +
> + for_each_possible_cpu(cpu) {
> + struct device *cpu_dev = get_cpu_device(cpu);
> +
> + if (!cpu_dev) {
> + pr_err("failed to get cpu%d device\n", cpu);
> + continue;
> + }
> +
> + clk = mb86s7x_clclk_register(cpu_dev);
> + if (IS_ERR(clk)) {
> + pr_err("failed to register cpu%d clock\n", cpu);
> + continue;
> + }
> + if (clk_register_clkdev(clk, NULL, dev_name(cpu_dev))) {
> + pr_err("failed to register cpu%d clock lookup\n", cpu);
> + continue;
> + }
> + pr_debug("registered clk for %s\n", dev_name(cpu_dev));
> + }
> +
> + platform_device_register_simple("arm-bL-cpufreq-dt", -1, NULL, 0);
> +
> + return 0;
> +}
> +module_init(mb86s7x_clclk_of_init);
>
This looks weird: why don't you probe the clocks from DT like normal?
Why do you register a platform device here? Are you trying to hide the fact that
the cpufreq stuff still doesn't use proper DT probing?
Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-14 14:08 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <message-id-of-cover-letter>
2014-07-13 6:28 ` [PATCH 1/8] ARM: Add platform support for Fujitsu MB86S7X SoCs Mollie Wu
[not found] ` <1405232911-4569-1-git-send-email-mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-14 13:33 ` Arnd Bergmann
2014-07-15 17:37 ` Jassi Brar
[not found] ` <CAJe_Zhc9MVrX_Yi_u91qeSCWdO65MqEro=eQ1U_nWPfzM0ayjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-15 20:09 ` Arnd Bergmann
2014-07-17 13:32 ` Jassi Brar
[not found] ` <CAJe_Zhc91g1=CTJUBaFaqk9Np4u4oEqddZEx_zeVxn7EdMEjmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-17 13:48 ` Arnd Bergmann
2014-07-17 16:54 ` Jassi Brar
2014-07-17 17:12 ` Arnd Bergmann
2014-07-15 15:11 ` Rob Herring
[not found] ` <CAL_JsqKvwxjEDZPVwL646PhPKr7oemBzxr6cZ+X=uJQ2u_XZ8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-15 16:11 ` Nicolas Pitre
2014-07-15 18:03 ` Jassi Brar
2014-07-16 5:52 ` Andy Green
2014-07-15 17:05 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.11.1407151214070.3647-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2014-07-15 18:16 ` Jassi Brar
2014-07-13 6:29 ` [PATCH 2/8] mmc: sdhci: host: add new f_sdh30 Mollie Wu
2014-07-14 14:04 ` Arnd Bergmann
2014-07-16 9:35 ` Vincent.Yang
2014-07-16 10:10 ` Arnd Bergmann
2014-07-16 11:07 ` Vincent.Yang
2014-07-13 6:30 ` [PATCH 4/8] clk: Add clock driver for mb86s7x Mollie Wu
[not found] ` <1405233052-4688-1-git-send-email-mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-14 14:08 ` Arnd Bergmann [this message]
2014-07-16 7:09 ` Jassi Brar
2014-07-13 6:31 ` [PATCH 5/8] pinctrl: add driver for MB86S7x Mollie Wu
[not found] ` <1405233067-4725-1-git-send-email-mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-22 16:11 ` Linus Walleij
[not found] ` <CACRpkdb_NC7j=XkbMPv8YYLSeEd1AOpFqmD8x+ohC7ds3cPCfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-24 18:04 ` Jassi Brar
[not found] ` <CAJe_Zhc2gz8DZjzo-4YAucAZ2P=UamZ2MtTP1fHmxC0vspZJDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-08 12:42 ` Linus Walleij
2014-08-22 7:46 ` Jassi Brar
[not found] ` <CAJe_Zhe2VuzHtkojm9nxvDTjT4AL7Znvma+5T7JTadvFJ1vAJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-27 16:58 ` Jassi Brar
2014-09-03 9:17 ` Linus Walleij
2014-07-13 6:31 ` [PATCH 6/8] net: ethernet driver: Fujitsu OGMA Mollie Wu
2014-07-14 9:06 ` Tobias Klauser
2014-07-14 10:36 ` Andy Green
2014-07-14 13:50 ` Arnd Bergmann
2014-07-14 14:00 ` Andy Green
2014-07-13 6:32 ` [PATCH 7/8] mailbox: f_mhu: add driver for Fujitsu MHU controller Mollie Wu
[not found] ` <1405233128-4799-1-git-send-email-mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-16 17:37 ` Sudeep Holla
[not found] ` <53C6B83D.80602-5wv7dgnIgG8@public.gmane.org>
2014-07-17 6:25 ` Jassi Brar
2014-07-17 10:31 ` Sudeep Holla
[not found] ` <53C7A5F1.30209-5wv7dgnIgG8@public.gmane.org>
2014-07-17 12:56 ` Jassi Brar
[not found] ` <CAJe_ZhegVczzcRVikt=nWnwU3nGx2G2mNg9nGR3bF4FfHnPeEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-17 15:09 ` Sudeep Holla
[not found] ` <53C7E71C.8020501-5wv7dgnIgG8@public.gmane.org>
2014-07-17 17:07 ` Jassi Brar
[not found] ` <CAJe_ZhcROjhXebJetyJus43jNKoBU60jXXRLwnHwMdPJ7LPq7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-17 18:51 ` Sudeep Holla
[not found] ` <53C81B3E.2020503-5wv7dgnIgG8@public.gmane.org>
2014-07-18 9:06 ` Jassi Brar
2014-07-13 6:32 ` =?y?q?=5BPATCH=208/8=5D=20of=3A=20add=20Fujitsu=20vendor=20prefix?= Mollie Wu
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=4408359.eoFHS4QiM2@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=andy.green-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mollie.wu-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=t.takinishi-+CUm20s59erQFUHtdCDX3A@public.gmane.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).