[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7hzgnal5yu.fsf@baylibre.com>
Date: Tue, 01 Feb 2022 11:52:41 -0800
From: Kevin Hilman <khilman@...libre.com>
To: Shunzhou Jiang <shunzhou.jiang@...ogic.com>,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: narmstrong@...libre.com, jbrunet@...libre.com,
martin.blumenstingl@...glemail.com, jianxin.pan@...ogic.com,
shunzhou.jiang@...ogic.com
Subject: Re: [PATCH 2/2] soc: s4: Add support for power domains controller
Hi Shunzhou,
Shunzhou Jiang <shunzhou.jiang@...ogic.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@...ogic.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
Powered by blists - more mailing lists