mbox series

[v2,0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE

Message ID 20210825150313.4033156-1-m.tretter@pengutronix.de (mailing list archive)
Headers show
Series soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE | expand

Message

Michael Tretter Aug. 25, 2021, 3:03 p.m. UTC
Hi,

This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].

Patch 1 of this series fixes the ZynqMP PMU FW power management
initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
called from the zynqmp_pm_domains driver, which handles power domains, instead
of the zynmp_power driver, which is responsible for suspend and shutdown. As a
side effect, PM_INIT_FINALIZE powers down all devices that have not been
requested, which might lead to misbehaving devices. Calling it from the
sync_state callback ensures that all consumers have probed and are able to
handle power management themselves.

Patches 2 to 4 are various cleanup patches to improve the readability and
debugging experience of the zynqmp_pm_domains driver.

Michael

[0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/

Changelog:

v2:

- move PM_INIT_FINALIZE to sync_state callback

Michael Tretter (4):
  soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
  soc: xilinx: cleanup debug and error messages
  soc: xilinx: use a properly named field instead of flags
  soc: xilinx: add a to_zynqmp_pm_domain macro

 drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
 drivers/soc/xilinx/zynqmp_power.c      |  1 -
 2 files changed, 51 insertions(+), 41 deletions(-)

Comments

Michal Simek Aug. 27, 2021, 8 a.m. UTC | #1
Hi,

On 8/25/21 5:03 PM, Michael Tretter wrote:
> Hi,
> 
> This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> 
> Patch 1 of this series fixes the ZynqMP PMU FW power management
> initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> called from the zynqmp_pm_domains driver, which handles power domains, instead
> of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> side effect, PM_INIT_FINALIZE powers down all devices that have not been
> requested, which might lead to misbehaving devices. Calling it from the
> sync_state callback ensures that all consumers have probed and are able to
> handle power management themselves.
> 
> Patches 2 to 4 are various cleanup patches to improve the readability and
> debugging experience of the zynqmp_pm_domains driver.
> 
> Michael
> 
> [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/
> 
> Changelog:
> 
> v2:
> 
> - move PM_INIT_FINALIZE to sync_state callback
> 
> Michael Tretter (4):
>   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
>   soc: xilinx: cleanup debug and error messages
>   soc: xilinx: use a properly named field instead of flags
>   soc: xilinx: add a to_zynqmp_pm_domain macro
> 
>  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
>  drivers/soc/xilinx/zynqmp_power.c      |  1 -
>  2 files changed, 51 insertions(+), 41 deletions(-)
> 

Rajan: Please test and ack.

It looks good to me.
Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Rajan Vaja Sept. 2, 2021, 6:55 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Michael Tretter <m.tretter@pengutronix.de>
> Sent: 25 August 2021 08:33 PM
> To: linux-arm-kernel@lists.infradead.org
> Cc: Michal Simek <michals@xilinx.com>; Rajan Vaja <RAJANV@xilinx.com>; Jolly
> Shah <JOLLYS@xilinx.com>; m.tretter@pengutronix.de
> Subject: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE
> 
> Hi,
> 
> This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> 
> Patch 1 of this series fixes the ZynqMP PMU FW power management
> initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> called from the zynqmp_pm_domains driver, which handles power domains, instead
> of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> side effect, PM_INIT_FINALIZE powers down all devices that have not been
> requested, which might lead to misbehaving devices. Calling it from the
> sync_state callback ensures that all consumers have probed and are able to
> handle power management themselves.
> 
> Patches 2 to 4 are various cleanup patches to improve the readability and
> debugging experience of the zynqmp_pm_domains driver.
> 
> Michael
> 
> [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-
> m.tretter@pengutronix.de/
> 
> Changelog:
> 
> v2:
> 
> - move PM_INIT_FINALIZE to sync_state callback
> 
> Michael Tretter (4):
>   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
>   soc: xilinx: cleanup debug and error messages
>   soc: xilinx: use a properly named field instead of flags
>   soc: xilinx: add a to_zynqmp_pm_domain macro
> 
>  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
>  drivers/soc/xilinx/zynqmp_power.c      |  1 -
>  2 files changed, 51 insertions(+), 41 deletions(-)
> 
> --
> 2.30.2

Acked-by: Rajan Vaja <rajan.vaja@xilinx.com>

Thanks,
Rajan
Michael Tretter Oct. 1, 2021, 9:07 a.m. UTC | #3
Hi,

On Fri, 27 Aug 2021 10:00:59 +0200, Michal Simek wrote:
> On 8/25/21 5:03 PM, Michael Tretter wrote:
> > This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> > 
> > Patch 1 of this series fixes the ZynqMP PMU FW power management
> > initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> > called from the zynqmp_pm_domains driver, which handles power domains, instead
> > of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> > side effect, PM_INIT_FINALIZE powers down all devices that have not been
> > requested, which might lead to misbehaving devices. Calling it from the
> > sync_state callback ensures that all consumers have probed and are able to
> > handle power management themselves.
> > 
> > Patches 2 to 4 are various cleanup patches to improve the readability and
> > debugging experience of the zynqmp_pm_domains driver.
> > 
> > Michael
> > 
> > [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/
> > 
> > Changelog:
> > 
> > v2:
> > 
> > - move PM_INIT_FINALIZE to sync_state callback
> > 
> > Michael Tretter (4):
> >   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
> >   soc: xilinx: cleanup debug and error messages
> >   soc: xilinx: use a properly named field instead of flags
> >   soc: xilinx: add a to_zynqmp_pm_domain macro
> > 
> >  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
> >  drivers/soc/xilinx/zynqmp_power.c      |  1 -
> >  2 files changed, 51 insertions(+), 41 deletions(-)
> > 
> 
> Rajan: Please test and ack.
> 
> It looks good to me.
> Acked-by: Michal Simek <michal.simek@xilinx.com>

Gentle ping.

Michael
Rajan Vaja Oct. 1, 2021, 9:22 a.m. UTC | #4
Hi Michael,

> -----Original Message-----
> From: Michael Tretter <m.tretter@pengutronix.de>
> Sent: 01 October 2021 02:38 PM
> To: Michal Simek <michals@xilinx.com>
> Cc: linux-arm-kernel@lists.infradead.org; Rajan Vaja <RAJANV@xilinx.com>; Jolly
> Shah <JOLLYS@xilinx.com>
> Subject: Re: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix
> PM_INIT_FINALIZE
> 
> Hi,
> 
> On Fri, 27 Aug 2021 10:00:59 +0200, Michal Simek wrote:
> > On 8/25/21 5:03 PM, Michael Tretter wrote:
> > > This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> > >
> > > Patch 1 of this series fixes the ZynqMP PMU FW power management
> > > initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> > > called from the zynqmp_pm_domains driver, which handles power domains,
> instead
> > > of the zynmp_power driver, which is responsible for suspend and shutdown.
> As a
> > > side effect, PM_INIT_FINALIZE powers down all devices that have not been
> > > requested, which might lead to misbehaving devices. Calling it from the
> > > sync_state callback ensures that all consumers have probed and are able to
> > > handle power management themselves.
> > >
> > > Patches 2 to 4 are various cleanup patches to improve the readability and
> > > debugging experience of the zynqmp_pm_domains driver.
> > >
> > > Michael
> > >
> > > [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-
> m.tretter@pengutronix.de/
> > >
> > > Changelog:
> > >
> > > v2:
> > >
> > > - move PM_INIT_FINALIZE to sync_state callback
> > >
> > > Michael Tretter (4):
> > >   soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
> > >   soc: xilinx: cleanup debug and error messages
> > >   soc: xilinx: use a properly named field instead of flags
> > >   soc: xilinx: add a to_zynqmp_pm_domain macro
> > >
> > >  drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
> > >  drivers/soc/xilinx/zynqmp_power.c      |  1 -
> > >  2 files changed, 51 insertions(+), 41 deletions(-)
> > >
> >
> > Rajan: Please test and ack.
> >
> > It looks good to me.
> > Acked-by: Michal Simek <michal.simek@xilinx.com>
> 
> Gentle ping.
[Rajan] I have already acked this one (https://www.spinics.net/lists/arm-kernel/msg918496.html). 

> 
> Michael
Michal Simek Oct. 18, 2021, 1:09 p.m. UTC | #5
On 8/25/21 17:03, Michael Tretter wrote:
> Hi,
> 
> This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0].
> 
> Patch 1 of this series fixes the ZynqMP PMU FW power management
> initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be
> called from the zynqmp_pm_domains driver, which handles power domains, instead
> of the zynmp_power driver, which is responsible for suspend and shutdown. As a
> side effect, PM_INIT_FINALIZE powers down all devices that have not been
> requested, which might lead to misbehaving devices. Calling it from the
> sync_state callback ensures that all consumers have probed and are able to
> handle power management themselves.
> 
> Patches 2 to 4 are various cleanup patches to improve the readability and
> debugging experience of the zynqmp_pm_domains driver.
> 
> Michael
> 
> [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/
> 
> Changelog:
> 
> v2:
> 
> - move PM_INIT_FINALIZE to sync_state callback
> 
> Michael Tretter (4):
>    soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver
>    soc: xilinx: cleanup debug and error messages
>    soc: xilinx: use a properly named field instead of flags
>    soc: xilinx: add a to_zynqmp_pm_domain macro
> 
>   drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++-----------
>   drivers/soc/xilinx/zynqmp_power.c      |  1 -
>   2 files changed, 51 insertions(+), 41 deletions(-)
> 

Applied.
M