Skip to content

Commit

Permalink
clean up reading of ICR register in FEC driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Ungerer authored and Linus Torvalds committed Jul 30, 2007
1 parent cb84d6e commit f861d62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3);
*icrp = 0x00000ddd;
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)
Expand Down Expand Up @@ -1332,15 +1332,15 @@ static void __inline__ fec_disable_phy_intr(void)
{
volatile unsigned long *icrp;
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
*icrp = (*icrp & 0x70777777) | 0x08000000;
*icrp = 0x08000000;
}

static void __inline__ fec_phy_ack_intr(void)
{
volatile unsigned long *icrp;
/* Acknowledge the interrupt */
icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
*icrp = (*icrp & 0x77777777) | 0x08000000;
*icrp = 0x0d000000;
}

static void __inline__ fec_localhw_setup(void)
Expand Down

0 comments on commit f861d62

Please sign in to comment.