I am in the process of fixing the init of the pm for 4xx in ppc4xx_pm.c
so that it can be used and I and others have discussed having the
drivers enable/disable their own power managment bits at init & exit times.
So what I would like to do is have each core header define a default set
of what is required to be powered on and then have each driver enable
them selves. These changes would be done in two stages
1) fix ppc4xx_pm.c init and have the default pm bitmap set to all ocp
drivers on.
2) update ocp drivers to enable/disable their pm settings and remove
their enable bits from the default bitmap in the core headers.
armin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
I am in the process of fixing the init of the pm for 4xx in ppc4xx_pm.c
so that it can be used and I and others have discussed having the
drivers enable/disable their own power managment bits at init & exit times.
So what I would like to do is have each core header define a default set
of what is required to be powered on and then have each driver enable
them selves. These changes would be done in two stages
1) fix ppc4xx_pm.c init and have the default pm bitmap set to all ocp
drivers on.
These patches are the changes to the core header files and for ppc4xx_pm.c.
Please _note_ that if you enable the Power Managment in the config
that most kernels might hang if you use an ocp device since the drivers
are not updated yet. :)
If no one has an objection, then I will get it submitted
armin
I am in the process of fixing the init of the pm for 4xx in ppc4xx_pm.c
so that it can be used and I and others have discussed having the
drivers enable/disable their own power managment bits at init & exit times.
2) update ocp drivers to enable/disable their pm settings and remove
their enable bits from the default bitmap in the core headers.
Here are the ocp driver changes to help support enabling/disabling the
device clock. currently these wount work on the 440 until a soon to
follow on 440 patch is checked in
armin
@@ -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/
(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 :)