Commit f861d62e authored by Greg Ungerer's avatar Greg Ungerer Committed by Linus Torvalds

clean up reading of ICR register in FEC driver

On the MCF5272, there is no need to read the ICR before writing it :
the bit 4n+3 is a write-enable for the bits 4n,4n+1 and 4n+2.
Signed-off-by: default avatarPhilippe De Muyter <phdm@macqel.be>
Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cb84d6e7
...@@ -1270,7 +1270,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev) ...@@ -1270,7 +1270,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3); icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3);
*icrp = 0x00000ddd; *icrp = 0x00000ddd;
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
*icrp = (*icrp & 0x70777777) | 0x0d000000; *icrp = 0x0d000000;
} }
static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
...@@ -1332,7 +1332,7 @@ static void __inline__ fec_disable_phy_intr(void) ...@@ -1332,7 +1332,7 @@ static void __inline__ fec_disable_phy_intr(void)
{ {
volatile unsigned long *icrp; volatile unsigned long *icrp;
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
*icrp = (*icrp & 0x70777777) | 0x08000000; *icrp = 0x08000000;
} }
static void __inline__ fec_phy_ack_intr(void) static void __inline__ fec_phy_ack_intr(void)
...@@ -1340,7 +1340,7 @@ static void __inline__ fec_phy_ack_intr(void) ...@@ -1340,7 +1340,7 @@ static void __inline__ fec_phy_ack_intr(void)
volatile unsigned long *icrp; volatile unsigned long *icrp;
/* Acknowledge the interrupt */ /* Acknowledge the interrupt */
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
*icrp = (*icrp & 0x77777777) | 0x08000000; *icrp = 0x0d000000;
} }
static void __inline__ fec_localhw_setup(void) static void __inline__ fec_localhw_setup(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment