9
0
Fork 0

svn_rev_087

generic/at91_dm9161_init_phy.diff
This commit is contained in:
Sascha Hauer 2007-07-05 18:01:21 +02:00 committed by Sascha Hauer
parent 9363a81b8b
commit 15f6fd3ba2
1 changed files with 3 additions and 4 deletions

View File

@ -128,13 +128,12 @@ UCHAR dm9161_InitPhy (AT91PS_EMAC p_mac)
{
UCHAR ret = TRUE;
unsigned short IntValue;
unsigned int timeout = 4000;
at91rm9200_EmacEnableMDIO (p_mac);
if (!dm9161_GetLinkSpeed (p_mac)) {
/* Try another time */
ret = dm9161_GetLinkSpeed (p_mac);
}
while (!dm9161_GetLinkSpeed (p_mac) && timeout--)
udelay(1000);
/* Disable PHY Interrupts */
at91rm9200_EmacReadPhy (p_mac, DM9161_MDINTR, &IntValue);