mbox series

[PATCHv1,0/2] Add FSYS2 power domain for MMC driver

Message ID 20200212120237.1332-1-linux.amoon@gmail.com (mailing list archive)
Headers show
Series Add FSYS2 power domain for MMC driver | expand

Message

Anand Moon Feb. 12, 2020, 12:02 p.m. UTC
This patches add the power domain for MMC driver,
but somehow the suspend/resume feature is broken
so any input on how to fix this.

Also on similar lines I tried to add power domain
FSYS for usb3 and usb2 nodes but this time
it failed to load the kernel, so how can I reslove
this issue.

-Anand

Anand Moon (2):
  ARM: dts: exynos: Add FSYS2 power domain to Exynos542x
  clk: samsung: exynos542x: Move FSYS2 subsystem clocks to its sub-CMU

 arch/arm/boot/dts/exynos5420.dtsi    | 10 ++++++++++
 drivers/clk/samsung/clk-exynos5420.c | 24 +++++++++++++++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)

Comments

Krzysztof Kozlowski Feb. 13, 2020, 10:17 a.m. UTC | #1
On Wed, Feb 12, 2020 at 12:02:35PM +0000, Anand Moon wrote:
> This patches add the power domain for MMC driver,
> but somehow the suspend/resume feature is broken
> so any input on how to fix this.

I think S2R was working on XU3-family after Marek's fixes, so you mean
that these patches break it?

Best regards,
Krzysztof


> 
> Also on similar lines I tried to add power domain
> FSYS for usb3 and usb2 nodes but this time
> it failed to load the kernel, so how can I reslove
> this issue.
> 
> -Anand
> 
> Anand Moon (2):
>   ARM: dts: exynos: Add FSYS2 power domain to Exynos542x
>   clk: samsung: exynos542x: Move FSYS2 subsystem clocks to its sub-CMU
> 
>  arch/arm/boot/dts/exynos5420.dtsi    | 10 ++++++++++
>  drivers/clk/samsung/clk-exynos5420.c | 24 +++++++++++++++++++++---
>  2 files changed, 31 insertions(+), 3 deletions(-)
> 
> -- 
> 2.25.0
>
Anand Moon Feb. 13, 2020, 1:28 p.m. UTC | #2
hi Krzysztof,

On Thu, 13 Feb 2020 at 15:47, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Wed, Feb 12, 2020 at 12:02:35PM +0000, Anand Moon wrote:
> > This patches add the power domain for MMC driver,
> > but somehow the suspend/resume feature is broken
> > so any input on how to fix this.
>
> I think S2R was working on XU3-family after Marek's fixes, so you mean
> that these patches break it?
>
Yes I my testing mmc driver failed to come up after suspend.

But I see below in power domain, Just to confirm.
#  cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain                          status          slaves
    /device                                             runtime status
----------------------------------------------------------------------
CAM                             off-0
FSYS2                           on
    /devices/platform/soc/10010000.clock-controller/exynos5-subcmu.6.auto
 active
    /devices/platform/soc/12200000.mmc                  active
    /devices/platform/soc/12220000.mmc                  active

# powerdebug -d
FSYS2:
current_state: on
active_time: 29016991 ms
total_idle_time: 4037 ms
Idle States:
             State            Time
             S0               4037
Devices:
         /devices/platform/soc/10010000.clock-controller/exynos5-subcmu.6.auto
         /devices/platform/soc/12200000.mmc
         /devices/platform/soc/12220000.mmc

> Best regards,
> Krzysztof
>
>

-Anand

> >
> > Also on similar lines I tried to add power domain
> > FSYS for usb3 and usb2 nodes but this time
> > it failed to load the kernel, so how can I reslove
> > this issue.
> >
> > -Anand
> >
> > Anand Moon (2):
> >   ARM: dts: exynos: Add FSYS2 power domain to Exynos542x
> >   clk: samsung: exynos542x: Move FSYS2 subsystem clocks to its sub-CMU
> >
> >  arch/arm/boot/dts/exynos5420.dtsi    | 10 ++++++++++
> >  drivers/clk/samsung/clk-exynos5420.c | 24 +++++++++++++++++++++---
> >  2 files changed, 31 insertions(+), 3 deletions(-)
> >
> > --
> > 2.25.0
> >
Krzysztof Kozlowski Feb. 13, 2020, 3:43 p.m. UTC | #3
On Thu, Feb 13, 2020 at 06:58:51PM +0530, Anand Moon wrote:
> hi Krzysztof,
> 
> On Thu, 13 Feb 2020 at 15:47, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > On Wed, Feb 12, 2020 at 12:02:35PM +0000, Anand Moon wrote:
> > > This patches add the power domain for MMC driver,
> > > but somehow the suspend/resume feature is broken
> > > so any input on how to fix this.
> >
> > I think S2R was working on XU3-family after Marek's fixes, so you mean
> > that these patches break it?
> >
> Yes I my testing mmc driver failed to come up after suspend.

Patches breaking systems should be clearly marked as work in progress,
e.g.  by using RFC instead of PATCH in the title.

This patchset cannot be applied.

You probably have to figure out some missing dependencies, e.g. in
clocks/power domains/pinctrl.

Best regards,
Krzysztof
Anand Moon Feb. 24, 2020, 5:49 a.m. UTC | #4
Hi Krzysztof,

On Thu, 13 Feb 2020 at 21:13, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Feb 13, 2020 at 06:58:51PM +0530, Anand Moon wrote:
> > hi Krzysztof,
> >
> > On Thu, 13 Feb 2020 at 15:47, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > >
> > > On Wed, Feb 12, 2020 at 12:02:35PM +0000, Anand Moon wrote:
> > > > This patches add the power domain for MMC driver,
> > > > but somehow the suspend/resume feature is broken
> > > > so any input on how to fix this.
> > >
> > > I think S2R was working on XU3-family after Marek's fixes, so you mean
> > > that these patches break it?
> > >
> > Yes I my testing mmc driver failed to come up after suspend.
>
> Patches breaking systems should be clearly marked as work in progress,
> e.g.  by using RFC instead of PATCH in the title.
>
> This patchset cannot be applied.
>
Ok

> You probably have to figure out some missing dependencies, e.g. in
> clocks/power domains/pinctrl.
>
I have tried to add some more missing code, but this FSYS2 power domain
power off during suspend and their is no resume after this. Do know why.

[root@alarm ~]# echo N | sudo tee /sys/module/printk/parameters/console_suspend
N
[root@alarm ~]# echo 1 > /sys/power/pm_debug_messages
[root@alarm ~]# time rtcwake -s 60 -m mem
rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Mon Feb 24 05:18:02 2020
[   81.955425] PM: suspend entry (deep)
[   81.961793] Filesystems sync: 0.003 seconds
[   81.978051] Freezing user space processes ... (elapsed 0.009 seconds) done.
[   81.993635] OOM killer disabled.
[   81.996531] Freezing remaining freezable tasks ... (elapsed 0.002
seconds) done.
[   82.229718] wake enabled for irq 160
[   82.445441] wake enabled for irq 164
[   82.461752] samsung-pinctrl 13400000.pinctrl: Setting external
wakeup interrupt mask: 0xffffffe7
[   82.481095] Disabling non-boot CPUs ...

My observation, all the device get suspended and USB device come alive
after resume.
since mmc device is in sill in suspended state it dose not resume.

So can we stop the FSYS2 power domain to getting disabled during suspend.
Or is their any other thing I am missing.
How to enable more debug print for power management ?
How can I debug future ?

-Anand