summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/arch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-12-08 10:29:27 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-12-08 10:29:27 +0000
commit5608c597c3b0b5652356c3a9cddda53b315070cb (patch)
tree91864b9fa4ca31774965dd23c96b2536f12ad64d /target/linux/ar71xx/files/arch
parent1fec1f6c5434bdefe15e05a12fa60af8e76be2b5 (diff)
ar71xx: add support for external mii_bus
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18692 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/devices.c3
-rw-r--r--target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/platform.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c b/target/linux/ar71xx/files/arch/mips/ar71xx/devices.c
index bed23938ea..43212ed3bf 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 baded8b8b9..145e79fcea 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;