remove axis toolchain dependency for etrax
[openwrt.git] / target / linux / ixp4xx / patches-2.6.24 / 303-avila_gw23x7_phy_quirk.patch
1 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/avila-setup.c
2 ===================================================================
3 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/avila-setup.c
4 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/avila-setup.c
5 @@ -247,6 +247,7 @@ static void __init avila_gw2345_setup(vo
6
7 static void __init avila_gw2347_setup(void)
8 {
9 + avila_npeb_data.quirks |= IXP4XX_ETH_QUIRK_GW23X7;
10 platform_device_register(&avila_npeb_device);
11
12 avila_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO;
13 @@ -281,6 +282,7 @@ static void __init avila_gw2355_setup(vo
14
15 static void __init avila_gw2357_setup(void)
16 {
17 + avila_npeb_data.quirks |= IXP4XX_ETH_QUIRK_GW23X7;
18 platform_device_register(&avila_npeb_device);
19
20 avila_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO;
21 Index: linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
22 ===================================================================
23 --- linux-2.6.24.7.orig/drivers/net/arm/ixp4xx_eth.c
24 +++ linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
25 @@ -348,6 +348,14 @@ static void phy_reset(struct net_device
26 return;
27 }
28
29 + if (port->plat->quirks & IXP4XX_ETH_QUIRK_GW23X7) {
30 + mdio_write(dev, 1, 0x19,
31 + (mdio_read(dev, 1, 0x19) & 0xfffe) | 0x8000);
32 +
33 + printk(KERN_DEBUG "%s: phy_id of the DP83848 changed to 0\n",
34 + dev->name);
35 + }
36 +
37 /* restart auto negotiation */
38 bmcr = mdio_read(dev, phy_id, MII_BMCR);
39 bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
40 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/platform.h
41 ===================================================================
42 --- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/platform.h
43 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/platform.h
44 @@ -115,6 +115,8 @@ struct eth_plat_info {
45 u8 txreadyq;
46 u8 hwaddr[6];
47 u32 phy_mask;
48 + u32 quirks;
49 +#define IXP4XX_ETH_QUIRK_GW23X7 0x00000001
50 };
51
52 /* Information about built-in HSS (synchronous serial) interfaces */
This page took 0.053373 seconds and 5 git commands to generate.