From: "Heiko Stübner" <heiko@sntech.de>
To: Kever Yang <kever.yang@rock-chips.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>
Cc: dianders@chromium.org, sonnyrao@chromium.org,
addy.ke@rock-chips.com, cf@rock-chips.com, xjq@rock-chips.com,
hj@rock-chips.com, huangtao@rock-chips.com,
linux-rockchip@lists.infradead.org,
Russell King <linux@arm.linux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Olof Johansson <olof@lixom.net>,
Catalin Marinas <catalin.marinas@arm.com>,
Marc Carino <marc.ceeeee@gmail.com>,
Rohit Vaswani <rvaswani@codeaurora.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 2/6] ARM: rockchip: add option to access the pmu via a phandle in smp_operations
Date: Wed, 22 Oct 2014 17:00:29 +0200 [thread overview]
Message-ID: <31425128.N5J4K0nt32@diego> (raw)
In-Reply-To: <1413393785-26783-3-git-send-email-kever.yang@rock-chips.com>
Hi Kever,
Am Mittwoch, 15. Oktober 2014, 10:23:01 schrieb Kever Yang:
> From: Heiko Stuebner <heiko@sntech.de>
>
> Makes it possible to define a rockchip,pmu phandle in the cpus node directly
> referencing the pmu syscon instead of searching for specific compatible.
>
> The old way of finding the pmu stays of course available.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
I've tested the series again on all our supported platforms - no regressions.
The series itself also looks nice and ready to go to me, but I think we'll
need to give the devicetree maintainers some more days, if they want to
complain about our new rockchip,pmu property.
Heiko
> ---
>
> Changes in v5: None
> Changes in v4:
> - add rockchip,pmu property into cpus.txt
>
> Changes in v3:
> - add this patch
>
> Changes in v2: None
>
> Documentation/devicetree/bindings/arm/cpus.txt | 9 +++++++++
> arch/arm/mach-rockchip/platsmp.c | 13 +++++++++++++
> 2 files changed, 22 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/cpus.txt
> b/Documentation/devicetree/bindings/arm/cpus.txt index fc44634..b2aacbe
> 100644
> --- a/Documentation/devicetree/bindings/arm/cpus.txt
> +++ b/Documentation/devicetree/bindings/arm/cpus.txt
> @@ -227,6 +227,15 @@ nodes to be present and contain the properties
> described below. # List of phandles to idle state nodes supported
> by this cpu [3].
>
> + - rockchip,pmu
> + Usage: optional for systems that have an "enable-method"
> + property value of "rockchip,rk3066-smp"
> + While optional, it is the preferred way to get access to
> + the cpu-core power-domains.
> + Value type: <phandle>
> + Definition: Specifies the syscon node controlling the cpu core
> + power domains.
> +
> Example 1 (dual-cluster big.LITTLE system 32-bit):
>
> cpus {
> diff --git a/arch/arm/mach-rockchip/platsmp.c
> b/arch/arm/mach-rockchip/platsmp.c index 4c36fbf..57b53b3 100644
> --- a/arch/arm/mach-rockchip/platsmp.c
> +++ b/arch/arm/mach-rockchip/platsmp.c
> @@ -155,6 +155,19 @@ static int __init rockchip_smp_prepare_pmu(void)
> struct device_node *node;
> void __iomem *pmu_base;
>
> + /*
> + * This function is only called via smp_ops->smp_prepare_cpu().
> + * That only happens if a "/cpus" device tree node exists
> + * and has an "enable-method" property that selects the SMP
> + * operations defined herein.
> + */
> + node = of_find_node_by_path("/cpus");
> +
> + pmu = syscon_regmap_lookup_by_phandle(node, "rockchip,pmu");
> + of_node_put(node);
> + if (!IS_ERR(pmu))
> + return 0;
> +
> pmu = syscon_regmap_lookup_by_compatible("rockchip,rk3066-pmu");
> if (!IS_ERR(pmu))
> return 0;
next prev parent reply other threads:[~2014-10-22 15:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 17:22 [PATCH v5 0/6] add basic rk3288 smp support Kever Yang
2014-10-15 17:23 ` [PATCH v5 2/6] ARM: rockchip: add option to access the pmu via a phandle in smp_operations Kever Yang
2014-10-22 15:00 ` Heiko Stübner [this message]
2014-10-15 17:23 ` [PATCH v5 3/6] ARM: dts: rockchip: add pmu references to cpus nodes Kever Yang
2014-10-15 17:23 ` [PATCH v5 5/6] ARM: dts: rockchip: add intmem node for rk3288 smp support Kever Yang
2014-10-15 17:23 ` [PATCH v5 6/6] ARM: dts: rockchip: add reset for CPU nodes Kever Yang
[not found] ` <1413393785-26783-1-git-send-email-kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-10-20 21:36 ` [PATCH v5 0/6] add basic rk3288 smp support Kevin Hilman
2014-11-02 14:04 ` Heiko Stübner
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=31425128.N5J4K0nt32@diego \
--to=heiko@sntech.de \
--cc=addy.ke@rock-chips.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cf@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=galak@codeaurora.org \
--cc=hj@rock-chips.com \
--cc=huangtao@rock-chips.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kever.yang@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.ceeeee@gmail.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rvaswani@codeaurora.org \
--cc=sonnyrao@chromium.org \
--cc=xjq@rock-chips.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;
as well as URLs for NNTP newsgroup(s).