diff options
author | Florian Fainelli <florian@openwrt.org> | 2009-08-03 21:32:31 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2009-08-03 21:32:31 +0000 |
commit | 25b42557da28fb6786653b854ca8b13a86c99ec1 (patch) | |
tree | 6e7d8b42ed35a1e4e08377e3527b8e7fa8ff2de9 /target/linux/ar7/patches-2.6.30/160-cpmac_up_and_running.patch | |
parent | 8d4aebadaf0166244fe3bb2f33f16d0afa758fe5 (diff) | |
download | master-31e0f0ae-25b42557da28fb6786653b854ca8b13a86c99ec1.tar.gz master-31e0f0ae-25b42557da28fb6786653b854ca8b13a86c99ec1.tar.bz2 master-31e0f0ae-25b42557da28fb6786653b854ca8b13a86c99ec1.zip |
add fixed PHY patches from 2.6.27, refresh patches
SVN-Revision: 17110
Diffstat (limited to 'target/linux/ar7/patches-2.6.30/160-cpmac_up_and_running.patch')
-rw-r--r-- | target/linux/ar7/patches-2.6.30/160-cpmac_up_and_running.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/ar7/patches-2.6.30/160-cpmac_up_and_running.patch b/target/linux/ar7/patches-2.6.30/160-cpmac_up_and_running.patch new file mode 100644 index 0000000000..8a37e3ace2 --- /dev/null +++ b/target/linux/ar7/patches-2.6.30/160-cpmac_up_and_running.patch @@ -0,0 +1,47 @@ +--- a/arch/mips/ar7/platform.c ++++ b/arch/mips/ar7/platform.c +@@ -33,6 +33,8 @@ + #include <linux/vlynq.h> + #include <linux/leds.h> + #include <linux/string.h> ++#include <linux/phy.h> ++#include <linux/phy_fixed.h> + + #include <asm/addrspace.h> + #include <asm/ar7/ar7.h> +@@ -205,6 +207,13 @@ static struct physmap_flash_data physmap + .width = 2, + }; + ++/* lets assume this is suitable for both high and low cpmacs links */ ++static struct fixed_phy_status fixed_phy_status __initdata = { ++ .link = 1, ++ .speed = 100, ++ .duplex = 1, ++}; ++ + static struct plat_cpmac_data cpmac_low_data = { + .reset_bit = 17, + .power_bit = 20, +@@ -506,6 +515,10 @@ static int __init ar7_register_devices(v + } + + if (ar7_has_high_cpmac()) { ++ res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status); ++ if (res && res != -ENODEV) ++ return res; ++ + cpmac_get_mac(1, cpmac_high_data.dev_addr); + res = platform_device_register(&cpmac_high); + if (res) +@@ -514,6 +527,10 @@ static int __init ar7_register_devices(v + cpmac_low_data.phy_mask = 0xffffffff; + } + ++ res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status); ++ if (res && res != -ENODEV) ++ return res; ++ + cpmac_get_mac(0, cpmac_low_data.dev_addr); + res = platform_device_register(&cpmac_low); + if (res) |