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