Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Greg Ungerer and committed by
Linus Torvalds
f861d62e cb84d6e7

+3 -3
+3 -3
drivers/net/fec.c
··· 1270 1270 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3); 1271 1271 *icrp = 0x00000ddd; 1272 1272 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); 1273 - *icrp = (*icrp & 0x70777777) | 0x0d000000; 1273 + *icrp = 0x0d000000; 1274 1274 } 1275 1275 1276 1276 static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) ··· 1332 1332 { 1333 1333 volatile unsigned long *icrp; 1334 1334 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); 1335 - *icrp = (*icrp & 0x70777777) | 0x08000000; 1335 + *icrp = 0x08000000; 1336 1336 } 1337 1337 1338 1338 static void __inline__ fec_phy_ack_intr(void) ··· 1340 1340 volatile unsigned long *icrp; 1341 1341 /* Acknowledge the interrupt */ 1342 1342 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); 1343 - *icrp = (*icrp & 0x77777777) | 0x08000000; 1343 + *icrp = 0x0d000000; 1344 1344 } 1345 1345 1346 1346 static void __inline__ fec_localhw_setup(void)