Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284340
b: refs/heads/master
c: 8d82f21
h: refs/heads/master
v: v3
  • Loading branch information
Eric Benard authored and David S. Miller committed Jan 13, 2012
1 parent 3f011e2 commit 39a4cbb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25cecd7e355bf90b8fea039bd06947bb3234e77d
refs/heads/master: 8d82f219c2d476811cd3157a39c7b5c1f045ebc3
9 changes: 6 additions & 3 deletions trunk/drivers/net/ethernet/freescale/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ fec_restart(struct net_device *ndev, int duplex)
} else {
#ifdef FEC_MIIGSK_ENR
if (id_entry->driver_data & FEC_QUIRK_USE_GASKET) {
u32 cfgr;
/* disable the gasket and wait */
writel(0, fep->hwp + FEC_MIIGSK_ENR);
while (readl(fep->hwp + FEC_MIIGSK_ENR) & 4)
Expand All @@ -486,9 +487,11 @@ fec_restart(struct net_device *ndev, int duplex)
* RMII, 50 MHz, no loopback, no echo
* MII, 25 MHz, no loopback, no echo
*/
writel((fep->phy_interface == PHY_INTERFACE_MODE_RMII) ?
1 : 0, fep->hwp + FEC_MIIGSK_CFGR);

cfgr = (fep->phy_interface == PHY_INTERFACE_MODE_RMII)
? BM_MIIGSK_CFGR_RMII : BM_MIIGSK_CFGR_MII;
if (fep->phy_dev && fep->phy_dev->speed == SPEED_10)
cfgr |= BM_MIIGSK_CFGR_FRCONT_10M;
writel(cfgr, fep->hwp + FEC_MIIGSK_CFGR);

/* re-enable the gasket */
writel(2, fep->hwp + FEC_MIIGSK_ENR);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/ethernet/freescale/fec.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
#define FEC_MIIGSK_CFGR 0x300 /* MIIGSK Configuration reg */
#define FEC_MIIGSK_ENR 0x308 /* MIIGSK Enable reg */

#define BM_MIIGSK_CFGR_MII 0x00
#define BM_MIIGSK_CFGR_RMII 0x01
#define BM_MIIGSK_CFGR_FRCONT_10M 0x40

#else

#define FEC_ECNTRL 0x000 /* Ethernet control reg */
Expand Down

0 comments on commit 39a4cbb

Please sign in to comment.