From: Kevin Hilman <khilman@baylibre.com>
To: Shunzhou Jiang <shunzhou.jiang@amlogic.com>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: narmstrong@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com, jianxin.pan@amlogic.com,
shunzhou.jiang@amlogic.com
Subject: Re: [PATCH 2/2] soc: s4: Add support for power domains controller
Date: Tue, 01 Feb 2022 11:52:41 -0800 [thread overview]
Message-ID: <7hzgnal5yu.fsf@baylibre.com> (raw)
In-Reply-To: <20220126061018.705338-3-shunzhou.jiang@amlogic.com>
Hi Shunzhou,
Shunzhou Jiang <shunzhou.jiang@amlogic.com> writes:
> Add support s4 Power controller. In s4, power control
> registers are in secure domain, and should be accessed by smc.
>
> Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
Thank you for adding support for S4 power domains.
> ---
> drivers/soc/amlogic/meson-secure-pwrc.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c
> index 59bd195fa9c9..8fee01aabab6 100644
> --- a/drivers/soc/amlogic/meson-secure-pwrc.c
> +++ b/drivers/soc/amlogic/meson-secure-pwrc.c
> @@ -11,6 +11,7 @@
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <dt-bindings/power/meson-a1-power.h>
> +#include <dt-bindings/power/meson-s4-power.h>
> #include <linux/arm-smccc.h>
> #include <linux/firmware/meson/meson_sm.h>
> #include <linux/module.h>
> @@ -119,6 +120,17 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = {
> SEC_PD(RSA, 0),
> };
>
> +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = {
> + SEC_PD(S4_DOS_HEVC, 0),
> + SEC_PD(S4_DOS_VDEC, 0),
> + SEC_PD(S4_VPU_HDMI, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_USB_COMB, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_GE2D, 0),
> + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_DEMOD, 0),
> + SEC_PD(S4_AUDIO, 0),
> +};
We should avoid the GENPD_FLAG_ALWAYS_ON unless strictly necessary. If
you look at a1_pwrc_domains[] in this same driver, any use of this flag
has a comment for why it's needed, and it's usually because the domain
is used by low-level SoC/PM code not controlled by linux.
All of these appear to be domains that linux should have driver control,
so should not be set to always on.
Kevin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Shunzhou Jiang <shunzhou.jiang@amlogic.com>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: narmstrong@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com, jianxin.pan@amlogic.com,
shunzhou.jiang@amlogic.com
Subject: Re: [PATCH 2/2] soc: s4: Add support for power domains controller
Date: Tue, 01 Feb 2022 11:52:41 -0800 [thread overview]
Message-ID: <7hzgnal5yu.fsf@baylibre.com> (raw)
In-Reply-To: <20220126061018.705338-3-shunzhou.jiang@amlogic.com>
Hi Shunzhou,
Shunzhou Jiang <shunzhou.jiang@amlogic.com> writes:
> Add support s4 Power controller. In s4, power control
> registers are in secure domain, and should be accessed by smc.
>
> Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
Thank you for adding support for S4 power domains.
> ---
> drivers/soc/amlogic/meson-secure-pwrc.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c
> index 59bd195fa9c9..8fee01aabab6 100644
> --- a/drivers/soc/amlogic/meson-secure-pwrc.c
> +++ b/drivers/soc/amlogic/meson-secure-pwrc.c
> @@ -11,6 +11,7 @@
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <dt-bindings/power/meson-a1-power.h>
> +#include <dt-bindings/power/meson-s4-power.h>
> #include <linux/arm-smccc.h>
> #include <linux/firmware/meson/meson_sm.h>
> #include <linux/module.h>
> @@ -119,6 +120,17 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = {
> SEC_PD(RSA, 0),
> };
>
> +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = {
> + SEC_PD(S4_DOS_HEVC, 0),
> + SEC_PD(S4_DOS_VDEC, 0),
> + SEC_PD(S4_VPU_HDMI, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_USB_COMB, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_GE2D, 0),
> + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_DEMOD, 0),
> + SEC_PD(S4_AUDIO, 0),
> +};
We should avoid the GENPD_FLAG_ALWAYS_ON unless strictly necessary. If
you look at a1_pwrc_domains[] in this same driver, any use of this flag
has a comment for why it's needed, and it's usually because the domain
is used by low-level SoC/PM code not controlled by linux.
All of these appear to be domains that linux should have driver control,
so should not be set to always on.
Kevin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Shunzhou Jiang <shunzhou.jiang@amlogic.com>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: narmstrong@baylibre.com, jbrunet@baylibre.com,
martin.blumenstingl@googlemail.com, jianxin.pan@amlogic.com,
shunzhou.jiang@amlogic.com
Subject: Re: [PATCH 2/2] soc: s4: Add support for power domains controller
Date: Tue, 01 Feb 2022 11:52:41 -0800 [thread overview]
Message-ID: <7hzgnal5yu.fsf@baylibre.com> (raw)
In-Reply-To: <20220126061018.705338-3-shunzhou.jiang@amlogic.com>
Hi Shunzhou,
Shunzhou Jiang <shunzhou.jiang@amlogic.com> writes:
> Add support s4 Power controller. In s4, power control
> registers are in secure domain, and should be accessed by smc.
>
> Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
Thank you for adding support for S4 power domains.
> ---
> drivers/soc/amlogic/meson-secure-pwrc.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c
> index 59bd195fa9c9..8fee01aabab6 100644
> --- a/drivers/soc/amlogic/meson-secure-pwrc.c
> +++ b/drivers/soc/amlogic/meson-secure-pwrc.c
> @@ -11,6 +11,7 @@
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <dt-bindings/power/meson-a1-power.h>
> +#include <dt-bindings/power/meson-s4-power.h>
> #include <linux/arm-smccc.h>
> #include <linux/firmware/meson/meson_sm.h>
> #include <linux/module.h>
> @@ -119,6 +120,17 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = {
> SEC_PD(RSA, 0),
> };
>
> +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = {
> + SEC_PD(S4_DOS_HEVC, 0),
> + SEC_PD(S4_DOS_VDEC, 0),
> + SEC_PD(S4_VPU_HDMI, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_USB_COMB, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_GE2D, 0),
> + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(S4_DEMOD, 0),
> + SEC_PD(S4_AUDIO, 0),
> +};
We should avoid the GENPD_FLAG_ALWAYS_ON unless strictly necessary. If
you look at a1_pwrc_domains[] in this same driver, any use of this flag
has a comment for why it's needed, and it's usually because the domain
is used by low-level SoC/PM code not controlled by linux.
All of these appear to be domains that linux should have driver control,
so should not be set to always on.
Kevin
next prev parent reply other threads:[~2022-02-01 19:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 6:10 [PATCH 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang
2022-01-26 6:10 ` Shunzhou Jiang
2022-01-26 6:10 ` Shunzhou Jiang
2022-01-26 6:10 ` [PATCH 1/2] dt-bindings: power: add Amlogic s4 power domains bindings Shunzhou Jiang
2022-01-26 6:10 ` Shunzhou Jiang
2022-01-26 6:10 ` Shunzhou Jiang
2022-01-26 6:10 ` [PATCH 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang
2022-01-26 6:10 ` Shunzhou Jiang
2022-01-26 6:10 ` Shunzhou Jiang
2022-02-01 19:52 ` Kevin Hilman [this message]
2022-02-01 19:52 ` Kevin Hilman
2022-02-01 19:52 ` Kevin Hilman
[not found] ` <202202091001287547451@amlogic.com>
2022-02-09 20:30 ` Kevin Hilman
2022-02-09 20:30 ` Kevin Hilman
2022-02-09 20:30 ` Kevin Hilman
[not found] ` <2022021117375354230910@amlogic.com>
2022-02-11 18:52 ` Kevin Hilman
2022-02-11 18:52 ` Kevin Hilman
2022-02-11 18:52 ` Kevin Hilman
[not found] ` <2022021510112070486315@amlogic.com>
2022-02-19 0:32 ` Kevin Hilman
2022-02-19 0:32 ` Kevin Hilman
2022-02-19 0:32 ` Kevin Hilman
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=7hzgnal5yu.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=jbrunet@baylibre.com \
--cc=jianxin.pan@amlogic.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=shunzhou.jiang@amlogic.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 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.