* gianfar generic PHY assumptions.
@ 2005-11-17 21:50 David Updegraff
2005-11-17 23:07 ` Kumar Gala
2005-11-17 23:14 ` Matt Porter
0 siblings, 2 replies; 3+ messages in thread
From: David Updegraff @ 2005-11-17 21:50 UTC (permalink / raw)
To: linux-ppc-embedded
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
Hi.
This patch lets gianfar work on 83xx (or 85xx??) boards that have
Generic PHYs on them that do _NOT_ happen to have an IRQ line wired to
external_15. Surely reasonable that if we can't ID the PHY that its
probably not irq-wired the Freescale-ADS "way"...
It was critical for us; perhaps usefull for others.
-dbu.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1071 bytes --]
diff --git a/drivers/net/gianfar_phy.c b/drivers/net/gianfar_phy.c
index 7c965f2..1c08bd0 100644
--- a/drivers/net/gianfar_phy.c
+++ b/drivers/net/gianfar_phy.c
@@ -234,6 +234,19 @@ static int marvell_config_aneg(struct gf
return 0;
}
+/* Init for GENERIC: just here to make sure the gainfar driver does not assume
+ * that it has an interrupt. Since don't even know what model it is, seems
+ * unlikely that they have bothered to wire in an IRQ line exactly like the
+ * the platform/ files have assumed.
+ */
+static int genmii_init(struct gfar_mii_info *mii_info)
+{
+ struct gfar_private *priv = netdev_priv(mii_info->dev);
+ if (priv)
+ priv->einfo->board_flags &= ~FSL_GIANFAR_BRD_HAS_PHY_INTR;
+ return 0;
+}
+
static int genmii_config_aneg(struct gfar_mii_info *mii_info)
{
if (mii_info->autoneg) {
@@ -585,6 +598,7 @@ static struct phy_info phy_info_genmii=
.phy_id_mask = 0x00000000,
.name = "Generic MII",
.features = MII_BASIC_FEATURES,
+ .init = genmii_init,
.config_aneg = genmii_config_aneg,
.read_status = genmii_read_status,
};
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: gianfar generic PHY assumptions.
2005-11-17 21:50 gianfar generic PHY assumptions David Updegraff
@ 2005-11-17 23:07 ` Kumar Gala
2005-11-17 23:14 ` Matt Porter
1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2005-11-17 23:07 UTC (permalink / raw)
To: David Updegraff; +Cc: linux-ppc-embedded
On Thu, 17 Nov 2005, David Updegraff wrote:
> Hi.
>
> This patch lets gianfar work on 83xx (or 85xx??) boards that have
> Generic PHYs on them that do _NOT_ happen to have an IRQ line wired to
> external_15. Surely reasonable that if we can't ID the PHY that its
> probably not irq-wired the Freescale-ADS "way"...
>
> It was critical for us; perhaps usefull for others.
The way PHYs are handle in 2.6.15 is completely different and the patch
is not valid against the current tree.
- kumar
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gianfar generic PHY assumptions.
2005-11-17 21:50 gianfar generic PHY assumptions David Updegraff
2005-11-17 23:07 ` Kumar Gala
@ 2005-11-17 23:14 ` Matt Porter
1 sibling, 0 replies; 3+ messages in thread
From: Matt Porter @ 2005-11-17 23:14 UTC (permalink / raw)
To: David Updegraff; +Cc: linux-ppc-embedded
On Thu, Nov 17, 2005 at 03:50:59PM -0600, David Updegraff wrote:
> Hi.
>
> This patch lets gianfar work on 83xx (or 85xx??) boards that have
> Generic PHYs on them that do _NOT_ happen to have an IRQ line wired to
> external_15. Surely reasonable that if we can't ID the PHY that its
> probably not irq-wired the Freescale-ADS "way"...
>
> It was critical for us; perhaps usefull for others.
Aside from the fact that the patch doesn't apply against the
current kernel due to the change of gianfar to use the phy
layer...why wouldn't you just set the board_flags field
appropriately in your board port? If you don't use a phy interrupt
then don't set the flag claiming that you do. stx_gp3.c doesn't
make use of the phy interrupt functionality, as an example.
I looked at an older kernel and I'm not sure where you see external
15 being used. It seems to be EXT5 on all the Fscale boards.
-Matt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-17 23:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-17 21:50 gianfar generic PHY assumptions David Updegraff
2005-11-17 23:07 ` Kumar Gala
2005-11-17 23:14 ` Matt Porter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).