public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Gregory Fong <gregory.0xf0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	bcm-kernel-feedback-list
	<bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH 0/7] soc: brcmstb: add system suspend support for STB SoCs
Date: Fri, 19 Jun 2015 15:41:23 -0700	[thread overview]
Message-ID: <20150619224123.GL4917@ld-irv-0074> (raw)
In-Reply-To: <CADtm3G7GQNuaZDoNe84YAh7pRV9s_2VhUuW8YpaCoNuozoyVZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

+ tglx, Kevin

On Thu, Jun 18, 2015 at 08:20:52PM -0700, Gregory Fong wrote:
> On Thu, Jun 18, 2015 at 5:11 PM, Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > This patch set introduces system suspend/resume support for Broadcom STB SoCs.
> > There are two suspend modes (S2 and S3) as well as a related low-power shutdown
> > mode (S5).
> >
> > Along with the core PM support, include a driver for the wakeup-timer, which
> > allows for simple testing of suspend/resume wakeup cycles.
> >
> > Brian
> >
> > Brian Norris (7):
> >   Documentation: dt: brcmstb: add system PM bindings
> >   Documentation: dt: brcmstb: add waketimer documentation
> >   soc: add stubs for brcmstb SoC's
> >   soc: brcmstb: add PM suspend/resume support (S2/S3/S5)
> >   soc: brcmstb: add wake-timer driver
> >   ARM: brcmstb: mask GIC IRQs on suspend
> >   ARM: dts: brcmstb: add BCM7445 system PM DT nodes
> >
> 
> I tested this series two ways: with the device tree built into the
> bootloader (BOLT) on BCM7445 and by using
> arch/arm/boot/dts/bcm7445-bcm97445svmb.dtb
> 
> With the device tree from BOLT, everything works fine.  Tested the
> waketimer for S2, S3, and S5.

Thanks for the testing!

> With the device tree in arch/arm/boot/dts/bcm7445-bcm97445svmb.dts, S2
> works, but S3 and S5 do not.  It comes back up but doesn't reach the
> prompt:
> 
> [    6.050808] PM: suspend of devices complete after 1.425 msecs
> [    6.051760] PM: late suspend of devices complete after 0.947 msecs
> [    6.052535] PM: noirq suspend of devices complete after 0.770 msecs
> [    6.052537] Disabling non-boot CPUs ...
> [    6.053005] CPU1: shutdown
> [    6.065914] CPU2: shutdown
> [    6.080756] CPU3: shutdown
> [    6.095214] Enabling non-boot CPUs ...
> [    6.111496] CPU1 is up
> [    6.126934] CPU2 is up
> [    6.142511] CPU3 is up
> [    6.145308] PM: noirq resume of devices complete after 2.772 msecs
> [    6.148022] PM: early resume of devices complete after 2.626 msecs
> [    6.151017] PM: resume of devices complete after 2.976 msecs
> [    6.212771] Restarting tasks ... done.
> [[[ output stops here ]]]

Right, I noticed this problem, but found that it was independent of the
core PM code. UART interrupts are dead, but nothing else is.

> I suspect there might be an issue somewhere in
> [PATCH 7/7] ARM: dts: brcmstb: add BCM7445 system PM DT nodes.

It's not a problem with patch 7, exactly, it's a problem with the
irqchip driver which handles the UART interrupt mask (irq-bcm7120-l2.c).
The problem is that with a trimmed down device tree (such as the one
found at arch/arm/boot/dts/bcm7445-bcm97445svmb.dtb), none of the child
interrupts of the 'irq0_intc' node are described -- we don't have device
tree nodes for them yet -- but we still require saving and restoring the
forwarding mask (see 'brcm,int-fwd-mask') in order for the UART
interrupts to continue operating.

This is all a problem because when irq_chip_generic::installed == 0, the
irq_{suspend,resume} functions never get called in irq-bcm7120-l2.c.

Anyway, I think this suggests that irq-bcm7120-l2.c needs a slightly
different semantics to its PM callbacks; they must be called regardless
of whether there are any child interrupts. I've cooked up some patches
for this and will send them shortly in reply to this thread.

Thanks,
Brian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in

  parent reply	other threads:[~2015-06-19 22:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  0:11 [PATCH 0/7] soc: brcmstb: add system suspend support for STB SoCs Brian Norris
2015-06-19  0:11 ` [PATCH 1/7] Documentation: dt: brcmstb: add system PM bindings Brian Norris
     [not found]   ` <1434672696-13632-2-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-12 19:58     ` Florian Fainelli
2015-06-19  0:11 ` [PATCH 2/7] Documentation: dt: brcmstb: add waketimer documentation Brian Norris
     [not found]   ` <1434672696-13632-3-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-19  2:09     ` Gregory Fong
2015-09-12 19:58   ` Florian Fainelli
2015-06-19  0:11 ` [PATCH 3/7] soc: add stubs for brcmstb SoC's Brian Norris
     [not found]   ` <1434672696-13632-4-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-12 20:16     ` Florian Fainelli
2015-06-19  0:11 ` [PATCH 4/7] soc: brcmstb: add PM suspend/resume support (S2/S3/S5) Brian Norris
     [not found]   ` <1434672696-13632-5-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-12 20:23     ` Florian Fainelli
2015-06-19  0:11 ` [PATCH 5/7] soc: brcmstb: add wake-timer driver Brian Norris
     [not found]   ` <1434672696-13632-6-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-19  2:20     ` Gregory Fong
     [not found]       ` <CADtm3G7qui2Yi6j-pFSGO9sGdHde1hy-c9wAWfQ38Dg8rKq2Qg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-19 17:36         ` Brian Norris
2015-09-12 20:00     ` Florian Fainelli
2015-06-19  0:11 ` [PATCH 6/7] ARM: brcmstb: mask GIC IRQs on suspend Brian Norris
2015-06-19  1:48   ` Gregory Fong
     [not found]   ` <1434672696-13632-7-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-12 19:53     ` Florian Fainelli
     [not found]       ` <55F482BC.4050202-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-14 17:29         ` Brian Norris
2015-09-14 17:42         ` Brian Norris
     [not found]           ` <20150914174209.GQ11487-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-09-14 17:43             ` Florian Fainelli
2015-06-19  0:11 ` [PATCH 7/7] ARM: dts: brcmstb: add BCM7445 system PM DT nodes Brian Norris
     [not found]   ` <1434672696-13632-8-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-12 19:58     ` Florian Fainelli
     [not found] ` <1434672696-13632-1-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-19  3:20   ` [PATCH 0/7] soc: brcmstb: add system suspend support for STB SoCs Gregory Fong
     [not found]     ` <CADtm3G7GQNuaZDoNe84YAh7pRV9s_2VhUuW8YpaCoNuozoyVZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-19 22:41       ` Brian Norris [this message]
2015-06-19 22:55         ` Brian Norris
2015-06-22 19:47 ` Brian Norris
2015-06-24  4:47   ` Florian Fainelli

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=20150619224123.GL4917@ld-irv-0074 \
    --to=computersforpeace-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gregory.0xf0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox