From 5608c597c3b0b5652356c3a9cddda53b315070cb Mon Sep 17 00:00:00 2001 From: juhosg Date: Tue, 8 Dec 2009 10:29:27 +0000 Subject: ar71xx: add support for external mii_bus git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18692 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/files/arch/mips/ar71xx/devices.c | 3 +++ target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h | 1 + 2 files changed, 4 insertions(+) (limited to 'target/linux/ar71xx/files/arch') diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c index bed23938e..43212ed3b 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c @@ -628,6 +628,9 @@ void __init ar71xx_add_device_eth(unsigned int id) ar71xx_eth_instance); } + if (pdata->mii_bus_dev == NULL) + pdata->mii_bus_dev = &ar71xx_mdio_device.dev; + /* Reset the device */ ar71xx_device_stop(pdata->reset_bit); mdelay(100); 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 baded8b8b..145e79fce 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 @@ -25,6 +25,7 @@ struct ag71xx_platform_data { u32 reset_bit; u32 mii_if; u8 mac_addr[ETH_ALEN]; + struct device *mii_bus_dev; u8 has_gbit:1; u8 is_ar91xx:1; -- cgit v1.2.3