Board should export/expose resources in a general way so drivers can use
them in a common, transparent way. That's the point of a portable OS

If there's not a standard way in NuttX to export R/MII (I haven't looked at
it), maybe you need to create it

The PHY R/MII interface is exported via a socket ioctl() interface.

The PHY interface is typically controlled by the Ethernet driver using PHY hooks.  See, for example, arch/arm/src/stm32/stm32_eth.c, PHY ioctl functions .  It accessed by a user-space ioctl() command on a socket descriptor.  The network stack forwards device-related ioctl() commands to the Ethernet device driver ioctl() functionis.

I suggested using file_open() and file_ioctl() in a previous email.  That is wrong.  file_ioctl() cannot be used to access socket_ioctls().  You would have to use psock_ioctl().


Reply via email to