projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: s3c4510b_eth: drop unused !NET_MULTI driver
[oweals/u-boot.git]
/
drivers
/
net
/
4xx_enet.c
diff --git
a/drivers/net/4xx_enet.c
b/drivers/net/4xx_enet.c
index 45ff4f333ba6e44be3d969bad42006912fe868c0..9ab5c8028c0bc7dff770e03cb056e94694709336 100644
(file)
--- a/
drivers/net/4xx_enet.c
+++ b/
drivers/net/4xx_enet.c
@@
-97,10
+97,6
@@
#error "CONFIG_MII has to be defined!"
#endif
#error "CONFIG_MII has to be defined!"
#endif
-#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_NET_MULTI)
-#error "CONFIG_NET_MULTI has to be defined for NetConsole"
-#endif
-
#define EMAC_RESET_TIMEOUT 1000 /* 1000 ms reset timeout */
#define PHY_AUTONEGOTIATE_TIMEOUT 5000 /* 5000 ms autonegotiate timeout */
#define EMAC_RESET_TIMEOUT 1000 /* 1000 ms reset timeout */
#define PHY_AUTONEGOTIATE_TIMEOUT 5000 /* 5000 ms autonegotiate timeout */
@@
-1185,16
+1181,16
@@
static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)
}
#endif /* defined(CONFIG_PHY_RESET) */
}
#endif /* defined(CONFIG_PHY_RESET) */
- miiphy_read (dev->name, reg,
PHY
_BMSR, ®_short);
+ miiphy_read (dev->name, reg,
MII
_BMSR, ®_short);
/*
* Wait if PHY is capable of autonegotiation and autonegotiation is not complete
*/
/*
* Wait if PHY is capable of autonegotiation and autonegotiation is not complete
*/
- if ((reg_short &
PHY_BMSR_AUTN_
ABLE)
- && !(reg_short &
PHY_BMSR_AUTN_COMP
)) {
+ if ((reg_short &
BMSR_ANEGCAP
ABLE)
+ && !(reg_short &
BMSR_ANEGCOMPLETE
)) {
puts ("Waiting for PHY auto negotiation to complete");
i = 0;
puts ("Waiting for PHY auto negotiation to complete");
i = 0;
- while (!(reg_short &
PHY_BMSR_AUTN_COMP
)) {
+ while (!(reg_short &
BMSR_ANEGCOMPLETE
)) {
/*
* Timeout reached ?
*/
/*
* Timeout reached ?
*/
@@
-1207,7
+1203,7
@@
static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis)
putc ('.');
}
udelay (1000); /* 1 ms */
putc ('.');
}
udelay (1000); /* 1 ms */
- miiphy_read (dev->name, reg,
PHY
_BMSR, ®_short);
+ miiphy_read (dev->name, reg,
MII
_BMSR, ®_short);
}
puts (" done\n");
udelay (500000); /* another 500 ms (results in faster booting) */
}
puts (" done\n");
udelay (500000); /* another 500 ms (results in faster booting) */
@@
-1704,7
+1700,7
@@
int enetInt (struct eth_device *dev)
rc = 0;
}
rc = 0;
}
- /* handle MAL RX EOB interupt from a receive */
+ /* handle MAL RX EOB inter
r
upt from a receive */
/* check for EOB on valid channels */
if (uic_mal & UIC_MAL_RXEOB) {
mal_eob = mfdcr(MAL0_RXEOBISR);
/* check for EOB on valid channels */
if (uic_mal & UIC_MAL_RXEOB) {
mal_eob = mfdcr(MAL0_RXEOBISR);
@@
-2035,6
+2031,13
@@
int ppc_4xx_eth_initialize (bd_t * bis)
dev->send = ppc_4xx_eth_send;
dev->recv = ppc_4xx_eth_rx;
dev->send = ppc_4xx_eth_send;
dev->recv = ppc_4xx_eth_rx;
+ eth_register(dev);
+
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
+ miiphy_register(dev->name,
+ emac4xx_miiphy_read, emac4xx_miiphy_write);
+#endif
+
if (0 == virgin) {
/* set the MAL IER ??? names may change with new spec ??? */
#if defined(CONFIG_440SPE) || \
if (0 == virgin) {
/* set the MAL IER ??? names may change with new spec ??? */
#if defined(CONFIG_440SPE) || \
@@
-2072,13
+2075,6
@@
int ppc_4xx_eth_initialize (bd_t * bis)
dev);
virgin = 1;
}
dev);
virgin = 1;
}
-
- eth_register (dev);
-
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
- miiphy_register (dev->name,
- emac4xx_miiphy_read, emac4xx_miiphy_write);
-#endif
} /* end for each supported device */
return 0;
} /* end for each supported device */
return 0;