Xilinx Temac link detect
John.Linn at xilinx.com
Fri Mar 7 09:14:44 EST 2008
I couldn't find any example laying around, so I took a shot at it based
on other non-network examples we had. I've not personally done it so
bear that in mind.
I have not tried to compile any of this, just stole parts for places and
Hope it helps,
* FD of the IIC device opened.
struct mii_ioctl_data ioctl_data;
* Open the device.
Fdtemac = open("/dev/TBD", O_RDWR);
if(Fdtemac < 0)
printf("Cannot open the temac device\n");
/* setup the inputs to the ioctl call */
ioctl_data.phy_num = TBD;
ioctl_data.reg_num = TBD;
* Read the phy register
Register = ioctl(Fdtemac, SIOCGMIIREG, &ioctl_data);
if(Status < 0)
/* failure */
/* results should be in ioctl_data.val_out I think
More information about the Linuxppc-embedded