|
|
@ -1405,6 +1405,24 @@ s32 synopGMAC_attach (synopGMACdevice * gmacdev, u64 macBase, u64 dmaBase, u32 p |
|
|
|
gmacdev->PhyBase = phyBase; |
|
|
|
#else |
|
|
|
gmacdev->PhyBase = phyBase; |
|
|
|
{ |
|
|
|
int i,j; |
|
|
|
u16 data; |
|
|
|
|
|
|
|
for (i = phyBase,j=0;j<32;i=(i+1)&0x1f,j++) |
|
|
|
{ |
|
|
|
synopGMAC_read_phy_reg(gmacdev->MacBase,i,2,&data); |
|
|
|
if(data != 0 && data != 0xffff) break; |
|
|
|
synopGMAC_read_phy_reg(gmacdev->MacBase,i,3,&data); |
|
|
|
if(data != 0 && data != 0xffff) break; |
|
|
|
} |
|
|
|
|
|
|
|
if(j==32) { |
|
|
|
TR("phy_detect: can't find PHY!\n"); |
|
|
|
} |
|
|
|
|
|
|
|
gmacdev->PhyBase = i; |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
/* Program/flash in the station/IP's Mac address */ |
|
|
|