mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antoine Tenart <antoine.tenart@free-electrons.com>
To: sebastian.hesselbarth@gmail.com
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>,
	zmxu@marvell.com, jszhang@marvell.com,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] ARM: berlin: register cpufreq-dt for the BG2Q
Date: Thu, 30 Jul 2015 14:35:51 +0200	[thread overview]
Message-ID: <1438259752-16320-3-git-send-email-antoine.tenart@free-electrons.com> (raw)
In-Reply-To: <1438259752-16320-1-git-send-email-antoine.tenart@free-electrons.com>

The BG2Q SoC uses cpufreq-dt for cpufreq. Register a platform device for
this.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 arch/arm/mach-berlin/berlin.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/mach-berlin/berlin.c b/arch/arm/mach-berlin/berlin.c
index ac181c6797ee..0de906374994 100644
--- a/arch/arm/mach-berlin/berlin.c
+++ b/arch/arm/mach-berlin/berlin.c
@@ -15,9 +15,21 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 
+static const struct of_device_id berlin2q_match[] = {
+	{ .compatible = "marvell,berlin2q" },
+	{ },
+};
+
+static void __init berlin_init_late(void)
+{
+	if (of_find_matching_node(NULL, berlin2q_match))
+		platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
+}
+
 static const char * const berlin_dt_compat[] = {
 	"marvell,berlin",
 	NULL,
@@ -25,6 +37,7 @@ static const char * const berlin_dt_compat[] = {
 
 DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
 	.dt_compat	= berlin_dt_compat,
+	.init_late	= berlin_init_late,
 	/*
 	 * with DT probing for L2CCs, berlin_init_machine can be removed.
 	 * Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
-- 
2.5.0


  parent reply	other threads:[~2015-07-30 12:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 12:35 [PATCH 0/3] ARM: berlin: add cpufreq support " Antoine Tenart
2015-07-30 12:35 ` [PATCH 1/3] clk: berlin: add cpuclk Antoine Tenart
2015-08-07 23:59   ` Stephen Boyd
2015-08-10 19:55   ` Sebastian Hesselbarth
2015-07-30 12:35 ` Antoine Tenart [this message]
2015-07-31  6:16   ` [PATCH 2/3] ARM: berlin: register cpufreq-dt for the BG2Q Jisheng Zhang
2015-08-10 20:22     ` Sebastian Hesselbarth
2015-08-11  2:44       ` Jisheng Zhang
2015-07-30 12:35 ` [PATCH 3/3] ARM: berlin: dts: add the cpufreq-dt bindings on " Antoine Tenart

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=1438259752-16320-3-git-send-email-antoine.tenart@free-electrons.com \
    --to=antoine.tenart@free-electrons.com \
    --cc=jszhang@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=zmxu@marvell.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

all inboxes | Powered by JetHome®