All of lore.kernel.org
 help / color / mirror / Atom feed
From: akuster <akuster@dslextreme.com>
To: Todd Poynor <tpoynor@mvista.com>
Cc: linuxppc-dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: [RFC/Patch] ppc4xx_pm.c
Date: Sat, 27 Jul 2002 10:00:33 -0700	[thread overview]
Message-ID: <3D42D1B1.20103@dslextreme.com> (raw)
In-Reply-To: 3D41E388.1090506@mvista.com


Todd Poynor wrote:
>  > +++ b/drivers/net/ibm_ocp/ibm_ocp_enet.c
>  >
>
>>      for (curr_emac = 0; curr_emac < emac_max; curr_emac++) {
>> +        if(ocp_get_pm(EMAC, curr_emac)){
>> +            mtdcr(DCRN_CPMFR,
>> +                  mfdcr(DCRN_CPMFR) & ~IBM_CPM_EMAC(ocp_get_pm(EMAC,
>> curr_emac)));
>> +        }
>>          ocp_enet_probe(curr_emac);
>>      }
>>
>> @@ -1193,6 +1199,17 @@
>>  static void __exit
>>  exit_ppc405_enet(void)
>>  {
>> +    int i;
>> +    struct ocp_dev *emac_dev;
>> +
>> +    for (i = 0; i < ocp_get_max(EMAC); i++) {
>> +        emac_dev = ocp_get_dev(EMAC, i);
>> +        if(ocp_get_pm(EMAC, i)){
>> +            mtdcr(DCRN_CPMFR, mfdcr(DCRN_CPMFR) |
>> IBM_CPM_EMAC(ocp_get_pm(EMAC, i)));
>> +            ocp_unregister(emac_dev);
>> +        }
>> +    }
>> +
>
>
> (1) Also do CPM on/off at open/close hooks, so that closed EMACs are
> powered down and powered back up when re-opened?

This idea should be applied to all ocp drivers.  I am not sure if
forcing (CPMFR) it the best method @ open/close or requesting/enabling
power down (CPMER).  mmm... gota think about :)

>
> (2) Move ocp_unregister() call outside "if(ocp_get_pm()" test.
Thanks

>
>


Armin


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

      reply	other threads:[~2002-07-27 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 22:30 [RFC/Patch] ppc4xx_pm.c akuster
2002-07-25 23:55 ` akuster
2002-07-26 23:35 ` akuster
2002-07-27  0:04   ` Todd Poynor
2002-07-27 17:00     ` akuster [this message]

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=3D42D1B1.20103@dslextreme.com \
    --to=akuster@dslextreme.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=tpoynor@mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.