summaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-06-26 13:59:15 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-06-26 13:59:15 +0000
commit3465540af9f9082591738d09b3a924e53ea851b4 (patch)
treea4ca45ff71b4a4f7a06baafff4c2cc76482ec234 /target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch
parenta425a7506c601c7d1ea6253f640acf10f4541d2c (diff)
downloadmaster-31e0f0ae-3465540af9f9082591738d09b3a924e53ea851b4.tar.gz
master-31e0f0ae-3465540af9f9082591738d09b3a924e53ea851b4.tar.bz2
master-31e0f0ae-3465540af9f9082591738d09b3a924e53ea851b4.zip
ixp4xx 2.6.26 support
SVN-Revision: 11583
Diffstat (limited to 'target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch')
-rw-r--r--target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch b/target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch
new file mode 100644
index 0000000000..ece08fd171
--- /dev/null
+++ b/target/linux/ixp4xx/patches-2.6.26/303-avila_gw23x7_phy_quirk.patch
@@ -0,0 +1,46 @@
+--- a/arch/arm/mach-ixp4xx/avila-setup.c
++++ b/arch/arm/mach-ixp4xx/avila-setup.c
+@@ -294,6 +294,7 @@
+
+ static void __init avila_gw2347_setup(void)
+ {
++ avila_npeb_data.quirks |= IXP4XX_ETH_QUIRK_GW23X7;
+ platform_device_register(&avila_npeb_device);
+
+ avila_gpio_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO;
+@@ -338,6 +339,7 @@
+
+ static void __init avila_gw2357_setup(void)
+ {
++ avila_npeb_data.quirks |= IXP4XX_ETH_QUIRK_GW23X7;
+ platform_device_register(&avila_npeb_device);
+
+ avila_gpio_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO;
+--- a/drivers/net/arm/ixp4xx_eth.c
++++ b/drivers/net/arm/ixp4xx_eth.c
+@@ -348,6 +348,14 @@
+ return;
+ }
+
++ if (port->plat->quirks & IXP4XX_ETH_QUIRK_GW23X7) {
++ mdio_write(dev, 1, 0x19,
++ (mdio_read(dev, 1, 0x19) & 0xfffe) | 0x8000);
++
++ printk(KERN_DEBUG "%s: phy_id of the DP83848 changed to 0\n",
++ dev->name);
++ }
++
+ /* restart auto negotiation */
+ bmcr = mdio_read(dev, phy_id, MII_BMCR);
+ bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
+--- a/include/asm-arm/arch-ixp4xx/platform.h
++++ b/include/asm-arm/arch-ixp4xx/platform.h
+@@ -104,6 +104,8 @@
+ u8 txreadyq;
+ u8 hwaddr[6];
+ u32 phy_mask;
++ u32 quirks;
++#define IXP4XX_ETH_QUIRK_GW23X7 0x00000001
+ };
+
+ /* Information about built-in HSS (synchronous serial) interfaces */