All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todd Poynor <tpoynor@mvista.com>
To: akuster@dslextreme.com
Cc: linuxppc-dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: [RFC/Patch] ppc4xx_pm.c
Date: Fri, 26 Jul 2002 17:04:24 -0700	[thread overview]
Message-ID: <3D41E388.1090506@mvista.com> (raw)
In-Reply-To: 3D41DCB4.90706@dslextreme.com


 > +++ 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?

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


--
Todd


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

  reply	other threads:[~2002-07-27  0:04 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 [this message]
2002-07-27 17:00     ` akuster

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=3D41E388.1090506@mvista.com \
    --to=tpoynor@mvista.com \
    --cc=akuster@dslextreme.com \
    --cc=linuxppc-dev@lists.linuxppc.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 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.