All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
To: Lina Iyer <lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Cc: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>,
	Lorenzo Pieralisi
	<Lorenzo.Pieralisi-5wv7dgnIgG8@public.gmane.org>,
	"msivasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<msivasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v8 1/7] qcom: spm: Add Subsystem Power Manager driver
Date: Thu, 09 Oct 2014 17:53:32 +0100	[thread overview]
Message-ID: <5436BD8C.2050601@arm.com> (raw)
In-Reply-To: <1412718106-17049-2-git-send-email-lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>



On 07/10/14 22:41, Lina Iyer wrote:
> SPM is a hardware block that controls the peripheral logic surrounding
> the application cores (cpu/l$). When the core executes WFI instruction,
> the SPM takes over the putting the core in low power state as
> configured. The wake up for the SPM is an interrupt at the GIC, which
> then completes the rest of low power mode sequence and brings the core
> out of low power mode.
>
> The SPM has a set of control registers that configure the SPMs
> individually based on the type of the core and the runtime conditions.
> SPM is a finite state machine block to which a sequence is provided and
> it interprets the bytes  and executes them in sequence. Each low power
> mode that the core can enter into is provided to the SPM as a sequence.
>
> Configure the SPM to set the core (cpu or L2) into its low power mode,
> the index of the first command in the sequence is set in the SPM_CTL
> register. When the core executes ARM wfi instruction, it triggers the
> SPM state machine to start executing from that index. The SPM state
> machine waits until the interrupt occurs and starts executing the rest
> of the sequence until it hits the end of the sequence. The end of the
> sequence jumps the core out of its low power mode.
>
> Based on work by: Mahesh Sivasubramanian <msivasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
> Ai Li <ali-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>, Praveen Chidambaram <pchidamb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> Original tree available at -
> git://codeaurora.org/quic/la/kernel/msm-3.10.git
>
> Signed-off-by: Lina Iyer <lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>   .../devicetree/bindings/arm/msm/qcom,saw2.txt      |  31 ++-
>   drivers/soc/qcom/Kconfig                           |   8 +
>   drivers/soc/qcom/Makefile                          |   1 +
>   drivers/soc/qcom/spm.c                             | 223 +++++++++++++++++++++
>   4 files changed, 257 insertions(+), 6 deletions(-)
>   create mode 100644 drivers/soc/qcom/spm.c
>

[...]

> +
> +static struct spm_driver_data *spm_get_drv(struct platform_device *pdev)
> +{
> +       struct spm_driver_data *drv = NULL;
> +       struct device_node *cpu_node, *saw_node;
> +       u32 cpu;
> +
> +       for_each_possible_cpu(cpu) {
> +               if (drv)
> +                       break;
> +               cpu_node = of_get_cpu_node(cpu, NULL);

I have not looked at the patch in detail, just this caught my attention
as I removed most of these unnecessary parsing in ARM code. Unless you
need this before topology_init, you need not parse DT to get cpu_node.
You can use of_cpu_device_node_get instead.

Regards,
Sudeep

--
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

WARNING: multiple messages have this Message-ID (diff)
From: sudeep.holla@arm.com (Sudeep Holla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 1/7] qcom: spm: Add Subsystem Power Manager driver
Date: Thu, 09 Oct 2014 17:53:32 +0100	[thread overview]
Message-ID: <5436BD8C.2050601@arm.com> (raw)
In-Reply-To: <1412718106-17049-2-git-send-email-lina.iyer@linaro.org>



On 07/10/14 22:41, Lina Iyer wrote:
> SPM is a hardware block that controls the peripheral logic surrounding
> the application cores (cpu/l$). When the core executes WFI instruction,
> the SPM takes over the putting the core in low power state as
> configured. The wake up for the SPM is an interrupt at the GIC, which
> then completes the rest of low power mode sequence and brings the core
> out of low power mode.
>
> The SPM has a set of control registers that configure the SPMs
> individually based on the type of the core and the runtime conditions.
> SPM is a finite state machine block to which a sequence is provided and
> it interprets the bytes  and executes them in sequence. Each low power
> mode that the core can enter into is provided to the SPM as a sequence.
>
> Configure the SPM to set the core (cpu or L2) into its low power mode,
> the index of the first command in the sequence is set in the SPM_CTL
> register. When the core executes ARM wfi instruction, it triggers the
> SPM state machine to start executing from that index. The SPM state
> machine waits until the interrupt occurs and starts executing the rest
> of the sequence until it hits the end of the sequence. The end of the
> sequence jumps the core out of its low power mode.
>
> Based on work by: Mahesh Sivasubramanian <msivasub@codeaurora.org>,
> Ai Li <ali@codeaurora.org>, Praveen Chidambaram <pchidamb@codeaurora.org>
> Original tree available at -
> git://codeaurora.org/quic/la/kernel/msm-3.10.git
>
> Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
> ---
>   .../devicetree/bindings/arm/msm/qcom,saw2.txt      |  31 ++-
>   drivers/soc/qcom/Kconfig                           |   8 +
>   drivers/soc/qcom/Makefile                          |   1 +
>   drivers/soc/qcom/spm.c                             | 223 +++++++++++++++++++++
>   4 files changed, 257 insertions(+), 6 deletions(-)
>   create mode 100644 drivers/soc/qcom/spm.c
>

[...]

> +
> +static struct spm_driver_data *spm_get_drv(struct platform_device *pdev)
> +{
> +       struct spm_driver_data *drv = NULL;
> +       struct device_node *cpu_node, *saw_node;
> +       u32 cpu;
> +
> +       for_each_possible_cpu(cpu) {
> +               if (drv)
> +                       break;
> +               cpu_node = of_get_cpu_node(cpu, NULL);

I have not looked at the patch in detail, just this caught my attention
as I removed most of these unnecessary parsing in ARM code. Unless you
need this before topology_init, you need not parse DT to get cpu_node.
You can use of_cpu_device_node_get instead.

Regards,
Sudeep

  parent reply	other threads:[~2014-10-09 16:53 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 21:41 [PATCH v8 0/7] QCOM 8974 and 8084 cpuidle driver Lina Iyer
2014-10-07 21:41 ` Lina Iyer
2014-10-07 21:41 ` [PATCH v8 1/7] qcom: spm: Add Subsystem Power Manager driver Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-09  1:12   ` Stephen Boyd
2014-10-09  1:12     ` Stephen Boyd
2014-10-09 16:18     ` Lina Iyer
2014-10-09 16:18       ` Lina Iyer
2014-10-09 20:20       ` Stephen Boyd
2014-10-09 20:20         ` Stephen Boyd
     [not found]   ` <1412718106-17049-2-git-send-email-lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-10-09 16:53     ` Sudeep Holla [this message]
2014-10-09 16:53       ` Sudeep Holla
2014-10-09 17:12       ` Lina Iyer
2014-10-09 17:12         ` Lina Iyer
2014-10-09 17:23         ` Sudeep Holla
2014-10-09 17:23           ` Sudeep Holla
2014-10-09 17:25           ` Lina Iyer
2014-10-09 17:25             ` Lina Iyer
2014-10-07 21:41 ` [PATCH v8 2/7] arm: dts: qcom: Add power-controller device node for 8974 Krait CPUs Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-07 23:17   ` Stephen Boyd
2014-10-07 23:17     ` Stephen Boyd
2014-10-09 15:57     ` Lina Iyer
2014-10-09 15:57       ` Lina Iyer
2014-10-07 21:41 ` [PATCH v8 3/7] arm: dts: qcom: Add power-controller device node for 8084 " Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-07 21:41 ` [PATCH v8 4/7] qcom: pm: Add cpu low power mode functions Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-09  1:17   ` Stephen Boyd
2014-10-09  1:17     ` Stephen Boyd
2014-10-09 15:56     ` Lina Iyer
2014-10-09 15:56       ` Lina Iyer
2014-10-09 19:00       ` Stephen Boyd
2014-10-09 19:00         ` Stephen Boyd
2014-10-09 19:26         ` Stephen Boyd
2014-10-09 19:26           ` Stephen Boyd
2014-10-07 21:41 ` [PATCH v8 5/7] qcom: cpuidle: Add cpuidle driver for QCOM cpus Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-09  1:22   ` Stephen Boyd
2014-10-09  1:22     ` Stephen Boyd
2014-10-23 11:05   ` Daniel Lezcano
2014-10-23 11:05     ` Daniel Lezcano
2014-10-23 12:43     ` Lorenzo Pieralisi
2014-10-23 12:43       ` Lorenzo Pieralisi
2014-10-23 16:18       ` Lina Iyer
2014-10-23 16:18         ` Lina Iyer
2014-10-24  8:56       ` Daniel Lezcano
2014-10-24  8:56         ` Daniel Lezcano
2014-10-24 12:04         ` Lorenzo Pieralisi
2014-10-24 12:04           ` Lorenzo Pieralisi
2014-10-23 16:58     ` Lina Iyer
2014-10-23 16:58       ` Lina Iyer
2014-10-24  8:42       ` Daniel Lezcano
2014-10-24  8:42         ` Daniel Lezcano
2014-10-24 15:59         ` Lina Iyer
2014-10-24 15:59           ` Lina Iyer
2014-10-07 21:41 ` [PATCH v8 6/7] arm: dts: qcom: Add idle states device nodes for 8974 Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-07 21:41 ` [PATCH v8 7/7] arm: dts: qcom: Add idle states device nodes for 8084 Lina Iyer
2014-10-07 21:41   ` Lina Iyer
2014-10-23 15:31 ` [PATCH v8 0/7] QCOM 8974 and 8084 cpuidle driver Ivan T. Ivanov
2014-10-23 15:31   ` Ivan T. Ivanov
2014-10-23 15:54   ` Lina Iyer
2014-10-23 15:54     ` Lina Iyer
2014-10-24  4:21     ` Amit Kucheria
2014-10-24  4:21       ` Amit Kucheria
2014-10-24 10:01     ` Ivan T. Ivanov
2014-10-24 10:01       ` Ivan T. Ivanov
2014-10-24 14:30       ` Lina Iyer
2014-10-24 14:30         ` Lina Iyer
2014-10-24 15:10         ` Ivan T. Ivanov
2014-10-24 15:10           ` Ivan T. Ivanov

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=5436BD8C.2050601@arm.com \
    --to=sudeep.holla-5wv7dgnigg8@public.gmane.org \
    --cc=Lorenzo.Pieralisi-5wv7dgnIgG8@public.gmane.org \
    --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=lina.iyer-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=msivasub-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.