This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiling Ethernet PHY driver of PD83867 for ARM Linux

Hi,

I have a problem in compiling the Linux kernel with support for PD83867 PHY network chip.

I downloaded the driver code from here:

http://www.ti.com/tool/dp83867sw-linux

and finally succeeded in adding it into the kernel configuration through

make menuconfig

But then the compiler gives an error about missing structure members, like "mdio" in "pd83867.c" line 108:

#ifdef CONFIG_OF_MDIO
static int dp83867_of_init(struct phy_device *phydev)
{
	struct dp83867_private *dp83867 = phydev->priv;
	struct device *dev = &phydev->mdio.dev;
	struct device_node *of_node = dev->of_node;
	int ret;
...

Another missing member is reported in the same file "soft_reset" line 213:
static struct phy_driver dp83867_driver[] = {
	{
		.phy_id		= DP83867_PHY_ID,
		.phy_id_mask	= 0xfffffff0,
		.name		= "TI DP83867",
		.features	= PHY_GBIT_FEATURES,
		.flags		= PHY_HAS_INTERRUPT,

		.config_init	= dp83867_config_init,
		.soft_reset	= dp83867_phy_reset,

		/* IRQ related */
		.ack_interrupt	= dp83867_ack_interrupt,
		.config_intr	= dp83867_config_intr,
...
There were some other similar errors, too, I don't recall exactly.
When inspecting the kernel headers, those members really don't exist.

This sounds like a version mismatch between the driver and the kernel.
I have the sources for the newest kernel 3.10.10 and it compiles just fine without the PD83867 driver added.
The kernel source originally uses Marvel PHY driver and it works alright. Marvel code has no references to the "mdio" or "soft_reset".
How can I make the kernel to compile with the PD83867 driver included? I think this chip should be supported by the kernel and the driver code is from TI, right?

Am I using wrong driver source codes or do I need to somehow modify the kernel configuration to make it compile?

Best regards,
Ari