From: Scott Wood <scottwood@freescale.com>
To: Li Yang-R58472 <r58472@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Zhao Chenhui-B35336 <B35336@freescale.com>
Subject: Re: [PATCH 5/7] fsl_pmc: update device bindings
Date: Tue, 8 Nov 2011 14:39:58 -0600 [thread overview]
Message-ID: <4EB9939E.8070800@freescale.com> (raw)
In-Reply-To: <3F607A5180246847A760FD34122A1E052BC964@039-SN1MPN1-004.039d.mgd.msft.net>
On 11/08/2011 04:56 AM, Li Yang-R58472 wrote:
>>> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
>> b/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
>>> index 07256b7..d84b4f8 100644
>>> --- a/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
>>> +++ b/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
>>> @@ -9,22 +9,27 @@ Properties:
>>>
>>> "fsl,mpc8548-pmc" should be listed for any chip whose PMC is
>>> compatible. "fsl,mpc8536-pmc" should also be listed for any chip
>>> - whose PMC is compatible, and implies deep-sleep capability.
>>> + whose PMC is compatible, and implies deep-sleep capability and
>>> + wake on user defined packet(wakeup on ARP).
>>
>> Why does the PMC care? This is an ethernet controller feature, the PMC
>> is just keeping the wakeup-relevant parts of the ethernet controller
>> alive (whatever they happen to be).
>>
>> Do we have any chips that have ethernet controller support for wake on
>> user-defined packet, but a sleep mode that doesn't let it be used?
>
> I think it is more a PMC feature cause Ethernet controller on many
> SoCs have the filer feature, but only very limited SoCs can support
> using it as a wake-up source. The differences should be mostly in
> the PM controller block.
Have you tried waking from sleep with it on those other SoCs?
> Also the wake on user-defined packet feature was never mentioned in the Ethernet controller part of UM.
AFAICT all this "feature" is, is programming the Ethernet controller to
filter out some packets that we don't want to wake us up, and then
refraining from entering magic packet mode. What PMC registers are
programmed any differently for this?
It's in the PM part of the manual because that's where they generally
describe issues related to PM. They describe magic packet there too.
The set of devices which are still active during sleep is a different
issue from the conditions on which a device will request a wake.
I also don't trust our PM documentation very much. It's ambiguous just
what gets shut down in ordinary sleep mode. E.g. the mpc8544 manual
talks about "external interrupts", but in one place it looks like it
means external to the SoC:
> In sleep mode, all clocks internal to the e500 core are turned off, including the timer facilities clock. All
> I/O interfaces in the device logic are also shut down. Only the clocks to the MPC8544E PIC are still
> running so that an external interrupt can wake up the device.
But the note immediately below that seems to imply they're talking about
external to the core:
> Only external interrupts can wake the MPC8544E from sleep mode. Internal
> interrupt sources like the core interval timer or watchdog timer depend on
> an active clock for their operation and these are disabled in sleep mode.
>> Normally that shouldn't matter, but we already an unused binding for
>> this. :-)
>>
>> Please provide rationale for doing it this way. Ideally it should
>> probably use whatever http://devicetree.org/ClockBindings ends up being.
>
> I have looked into that binding. The binding was primarily defined for the Linux clock API which is not same as what we are doing here(set wakeup source).
> If in the future the clock API also covers wakeup related features, we can change to use it.
While Linux APIs can serve as an inspiration, they're not the basis of
device tree bindings. The device tree is not Linux-specific, and should
not change just because Linux changes, but rather should describe the
hardware. We want to get this right the first time.
What we are describing here is how a device's clock is connected to the PMC.
-Scott
next prev parent reply other threads:[~2011-11-08 20:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 12:36 [PATCH 5/7] fsl_pmc: update device bindings Zhao Chenhui
2011-11-04 20:05 ` Scott Wood
2011-11-04 20:19 ` Scott Wood
2011-11-08 10:56 ` Li Yang-R58472
2011-11-08 20:39 ` Scott Wood [this message]
2011-11-09 10:59 ` Li Yang-R58472
2011-11-09 17:15 ` Scott Wood
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=4EB9939E.8070800@freescale.com \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=B35336@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=r58472@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).