[Avila] GPL NPE driver working with the GW2347 and its DP83848 phy?
Tim Harvey
tim_harvey at yahoo.com
Fri May 11 09:37:03 EDT 2007
Joel,
Yes, apparently the register change that the bootloader performs to set the
phy_addr gets whacked before linux loads. This is a patch against Christian
Hohnstaedt's GPL NPE driver in my 2.6.19 tree:
-------------
This patch adds detection for the DP83848 PHY used on the GW2347 and
sets the appropriate register to set its phy_id from 1 to 0
(unclear why this setting which is done in the bootloader does not 'stick')
--- orig/linux-2.6.19.x/drivers/net/ixp4xx/phy.c 2007-02-13
21:16:20.000000000 -0800
+++ new/linux-2.6.19.x/drivers/net/ixp4xx/phy.c 2007-03-25 22:15:55.000000000
-0700
@@ -109,5 +109,17 @@
mac->mii.reg_num_mask = 0x1f;
mac->mii.mdio_read = mdio_read_register;
mac->mii.mdio_write = mdio_write_register;
+
+ /* GW2347: check for DP83848 and if present set phy id from 1 to 0 */
+ if (phy_id == 0 &&
+ mdio_read_register(dev, 1, 0x02) == 0x2000 &&
+ mdio_read_register(dev, 1, 0x03) == 0x5c90) /* DP83848 PHY */
+ {
+ printk("%s: PHY[1] DP83848 detected - changing to phy id 0\n",
+ dev->name);
+ /* change phy id from 1 to 0 */
+ i = mdio_read_register(dev, 1, 0x19);
+ mdio_write_register(dev, 1, 0x19, (i & 0xfffe) | 0x8000);
+ }
}
---------------
--- Joel Lindsay <joel at waveteq.com> wrote:
> Tim,
>
> Did you resolve this. I am about to try using this driver with the GW2347.
>
> Joel
>
>
> ----- Original Message -----
> From: "Tim Harvey" <tim_harvey at yahoo.com>
> To: <avila at lists.unixstudios.net>
> Sent: Saturday, March 17, 2007 9:24 PM
> Subject: [Avila] GPL NPE driver working with the GW2347 and its DP83848 phy?
>
>
> Anyone else out there working with Christian Hohnstaedt's GPL ixp4xx NPE
> v0.3.1 driver on the GW2347 which uses a National DP83848 PHY? I'm finding
> that on the GW2347 the driver see's the phy as 'unresponsive' where it works
> fine on the GW2348 boards. I'm using this driver with a linux 2.6.19
> kernel.
>
> Tim
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
> For additional commands, e-mail: avila-help at lists.unixstudios.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avila-unsubscribe at lists.unixstudios.net
> For additional commands, e-mail: avila-help at lists.unixstudios.net
>
>
More information about the Avila
mailing list