From 5b103d4c0a0524df6c11985660e48a69645aa778 Mon Sep 17 00:00:00 2001 From: matteo Date: Mon, 14 Jul 2008 10:50:30 +0000 Subject: ar7: initial 2.6.26 patches git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11824 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.26/150-cpmac_up_and_running.diff | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff (limited to 'target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff') diff --git a/target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff b/target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff new file mode 100644 index 000000000..d11bbf2e5 --- /dev/null +++ b/target/linux/ar7/patches-2.6.26/150-cpmac_up_and_running.diff @@ -0,0 +1,47 @@ +--- a/arch/mips/ar7/platform.c ++++ b/arch/mips/ar7/platform.c +@@ -33,6 +33,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -205,6 +207,13 @@ + .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 @@ + } + + 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 @@ + 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) -- cgit v1.2.3