diff options
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/devices.c | 8 | ||||
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c index 7c08bc997..d55022f88 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c @@ -186,9 +186,7 @@ static struct resource ar71xx_mdio_resources[] = { } }; -static struct ag71xx_mdio_platform_data ar71xx_mdio_data = { - .phy_mask = 0xffffffff, -}; +static struct ag71xx_mdio_platform_data ar71xx_mdio_data; static struct platform_device ar71xx_mdio_device = { .name = "ag71xx-mdio", @@ -202,7 +200,11 @@ static struct platform_device ar71xx_mdio_device = { void __init ar71xx_add_device_mdio(u32 phy_mask) { + if (ar71xx_soc == AR71XX_SOC_AR7240) + ar71xx_mdio_data.is_ar7240 = 1; + ar71xx_mdio_data.phy_mask = phy_mask; + platform_device_register(&ar71xx_mdio_device); } diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h index c305a821d..52f41f47a 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h @@ -37,6 +37,7 @@ struct ag71xx_platform_data { struct ag71xx_mdio_platform_data { u32 phy_mask; + int is_ar7240; }; struct ar71xx_ehci_platform_data { |