aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fec.c
diff options
context:
space:
mode:
authorMike Cruse <mcruse@definium.net>2007-07-30 02:29:29 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-30 13:52:09 -0400
commitb8a94b3dece0cdfdb42460bab28c454f71d3fa1d (patch)
treecc6d3fc91dc7dd0f7222accd1faf6a51aca51579 /drivers/net/fec.c
parentf861d62e12d3f732a36634e9e6b3b7b0112fef60 (diff)
setup and detect 2nd phy on MCF5275 in FEC driver
Added code to recognize the second interface on M5275 boards. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/fec.c')
-rw-r--r--drivers/net/fec.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index ff7e449ad573..4e8df910c00d 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1427,6 +1427,29 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1427 *gpio_pehlpar = 0xc0; 1427 *gpio_pehlpar = 0xc0;
1428 } 1428 }
1429#endif 1429#endif
1430
1431#if defined(CONFIG_M527x)
1432 /* Set up gpio outputs for MII lines */
1433 {
1434 volatile u8 *gpio_par_fec;
1435 volatile u16 *gpio_par_feci2c;
1436
1437 gpio_par_feci2c = (volatile u16 *)(MCF_IPSBAR + 0x100082);
1438 /* Set up gpio outputs for FEC0 MII lines */
1439 gpio_par_fec = (volatile u8 *)(MCF_IPSBAR + 0x100078);
1440
1441 *gpio_par_feci2c |= 0x0f00;
1442 *gpio_par_fec |= 0xc0;
1443
1444#if defined(CONFIG_FEC2)
1445 /* Set up gpio outputs for FEC1 MII lines */
1446 gpio_par_fec = (volatile u8 *)(MCF_IPSBAR + 0x100079);
1447
1448 *gpio_par_feci2c |= 0x00a0;
1449 *gpio_par_fec |= 0xc0;
1450#endif /* CONFIG_FEC2 */
1451 }
1452#endif /* CONFIG_M527x */
1430} 1453}
1431 1454
1432static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) 1455static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)