[PATCH 2/5] mpc52xx suspend: FEC (ethernet)

Grant Likely grant.likely at secretlab.ca
Fri Mar 16 00:35:07 EST 2007


On 3/15/07, Domen Puncer <domen.puncer at telargo.com> wrote:
> Suspend and resume for FEC on MPC52xx.
>
> Note that resume is a bit different for lite5200b low-power mode.
>
>
> Signed-off-by: Domen Puncer <domen.puncer at telargo.com>

This of course cannot be applied until a mpc5200 ethernet driver is
actually in mainline.  :-)

Haven't tested, but I don't see anything evil here, other than the
"ugly hack"  :-)

g.

> +int mpc52xx_fec_resume(struct of_device *op)
> +{
> +       struct net_device *ndev = dev_get_drvdata(&op->dev);
> +       struct fec_priv *priv = ndev->priv;
> +       struct mpc52xx_fec *fec = priv->fec;
> +
> +       /* XXX ugly hack */
> +       /* not deep-sleep (but low-power), so re-init hw */
> +       if (*(unsigned long *)CONFIG_KERNEL_START != 0x60000000) {
> +               *(unsigned long *)CONFIG_KERNEL_START = 0x60000000; // restore

Please avoid c++ style comments; even within ugly hacks.  :-)

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195



More information about the Linuxppc-embedded mailing list