diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2008-04-30 10:59:03 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2008-04-30 10:59:03 +0000 |
commit | 36e4fc9831e2a6c34062255152df310fee571479 (patch) | |
tree | 47709338b488d08e41d33b12764a76852c5071d6 /target/linux/ixp4xx/patches-2.6.25/303-avila_gw23x7_phy_quirk.patch | |
parent | 719fd8c757f3501dd1e0d4771922de1e50be4fe4 (diff) | |
download | mtk-20170518-36e4fc9831e2a6c34062255152df310fee571479.zip mtk-20170518-36e4fc9831e2a6c34062255152df310fee571479.tar.gz mtk-20170518-36e4fc9831e2a6c34062255152df310fee571479.tar.bz2 |
sync ixp4xx related patches with 2.6.24 and upgrade to 2.6.25
SVN-Revision: 10988
Diffstat (limited to 'target/linux/ixp4xx/patches-2.6.25/303-avila_gw23x7_phy_quirk.patch')
-rw-r--r-- | target/linux/ixp4xx/patches-2.6.25/303-avila_gw23x7_phy_quirk.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.25/303-avila_gw23x7_phy_quirk.patch b/target/linux/ixp4xx/patches-2.6.25/303-avila_gw23x7_phy_quirk.patch new file mode 100644 index 0000000..ffba2bb --- /dev/null +++ b/target/linux/ixp4xx/patches-2.6.25/303-avila_gw23x7_phy_quirk.patch @@ -0,0 +1,52 @@ +Index: linux-2.6.24.2/arch/arm/mach-ixp4xx/avila-setup.c +=================================================================== +--- linux-2.6.24.2.orig/arch/arm/mach-ixp4xx/avila-setup.c ++++ linux-2.6.24.2/arch/arm/mach-ixp4xx/avila-setup.c +@@ -276,6 +276,7 @@ static void __init avila_gw2345_setup(vo + + static void __init avila_gw2347_setup(void) + { ++ avila_npeb_data.quirks |= IXP4XX_ETH_QUIRK_GW23X7; + platform_device_register(&avila_npeb_device); + + avila_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO; +@@ -310,6 +311,7 @@ static void __init avila_gw2355_setup(vo + + static void __init avila_gw2357_setup(void) + { ++ avila_npeb_data.quirks |= IXP4XX_ETH_QUIRK_GW23X7; + platform_device_register(&avila_npeb_device); + + avila_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO; +Index: linux-2.6.24.2/drivers/net/arm/ixp4xx_eth.c +=================================================================== +--- linux-2.6.24.2.orig/drivers/net/arm/ixp4xx_eth.c ++++ linux-2.6.24.2/drivers/net/arm/ixp4xx_eth.c +@@ -347,6 +347,14 @@ static void phy_reset(struct net_device + 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); +Index: linux-2.6.24.2/include/asm-arm/arch-ixp4xx/platform.h +=================================================================== +--- linux-2.6.24.2.orig/include/asm-arm/arch-ixp4xx/platform.h ++++ linux-2.6.24.2/include/asm-arm/arch-ixp4xx/platform.h +@@ -115,6 +115,8 @@ struct eth_plat_info { + u8 txreadyq; + u8 hwaddr[6]; + u32 phy_mask; ++ u32 quirks; ++#define IXP4XX_ETH_QUIRK_GW23X7 0x00000001 + }; + + /* Information about built-in HSS (synchronous serial) interfaces */ |