From: David Gibson <dwg@au1.ibm.com>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Alexandre Bounine <Alexandre.Bounine@tundra.com>
Subject: Re: Fix problems with Holly's DT representation of ethernet PHYs
Date: Mon, 28 May 2007 09:36:37 +1000 [thread overview]
Message-ID: <20070527233637.GC23768@localhost.localdomain> (raw)
In-Reply-To: <1180101831.3360.38.camel@zod.rchland.ibm.com>
On Fri, May 25, 2007 at 09:03:51AM -0500, Josh Boyer wrote:
> On Fri, 2007-05-25 at 14:38 +1000, David Gibson wrote:
> >
> > Waah! Third time lucky?
>
> Not quite. :)
>
> > - Second, the PHYs give only "bcm54xx" as a compatible
> > property. This is unfortunate, because there are many bcm54xx PHY
> > models, and they have differences which can matter. We add a more
> > precise compatible string, giving the precise PHY model (bcm5461A in
> > this case).
>
> You don't actually do this. Instead, you specify a
> txc-rxc-delay-disable property.
Oops, forgot to update the patch description.
> > - PHY1: ethernet-phy@6000 {
> > - device_type = "ethernet-phy";
> > - compatible = "bcm54xx";
> > - reg = <6000 50>;
> > - phy-id = <1>;
> > + PHY1: ethernet-phy@1 {
> > + reg = <1>;
> > + txc-rxc-delay-disable;
> > };
>
> I would have rather we left the compatible = "bmc5461A" as well. Though
> perhaps a comment would suffice instead.
Hrm, I was tending to go with Kumar's point that it's kind of simpler
and safer to probe the PHY type directly.
> > Index: working-2.6/arch/powerpc/sysdev/tsi108_dev.c
> > ===================================================================
> > --- working-2.6.orig/arch/powerpc/sysdev/tsi108_dev.c 2007-05-25 14:34:00.000000000 +1000
> > +++ working-2.6/arch/powerpc/sysdev/tsi108_dev.c 2007-05-25 14:38:32.000000000 +1000
>
> > +
> > tsi_eth_data.regs = r[0].start;
> > tsi_eth_data.phyregs = res.start;
> > tsi_eth_data.phy = *phy_id;
> > tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0);
> > - if (of_device_is_compatible(phy, "bcm54xx"))
> > +
> > + if (of_get_property(phy, "txc-rxc-delay-disable", NULL))
> > tsi_eth_data.phy_type = TSI108_PHY_BCM54XX;
> > of_node_put(phy);
>
> At the very least this needs a comment explaining what exactly is being
> done here. Right now, it's looking for some magical property and
> setting the PHY type to a Broadcom PHY... very confusing to someone
> that hasn't followed the email thread.
Yeah, good point. And more specifically I should put a FIXME comment
in, saying that the ethernet driver itself should be changed to
implement this workaround in a different way, rather than based on
this phy_type field, since the workaround isn't really related to the
PHY type. I was assuming that cleanup would happen as part of the
port to phylib.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2007-05-27 23:36 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 4:16 Fix problems with Holly's DT representation of ethernet PHYs David Gibson
2007-05-24 4:22 ` Kumar Gala
2007-05-24 5:59 ` David Gibson
2007-05-24 9:13 ` Segher Boessenkool
2007-05-24 13:44 ` Josh Boyer
2007-05-25 4:23 ` David Gibson
2007-05-25 4:37 ` David Gibson
2007-05-25 4:38 ` David Gibson
2007-05-25 14:03 ` Josh Boyer
2007-05-27 23:36 ` David Gibson [this message]
2007-05-25 14:11 ` Segher Boessenkool
2007-05-27 23:30 ` David Gibson
2007-05-28 1:38 ` Benjamin Herrenschmidt
2007-05-28 11:07 ` Segher Boessenkool
2007-05-28 11:15 ` Benjamin Herrenschmidt
2007-05-28 11:06 ` Segher Boessenkool
2007-05-29 4:47 ` David Gibson
2007-05-24 9:11 ` Segher Boessenkool
2007-05-24 13:45 ` Josh Boyer
2007-05-25 2:04 ` David Gibson
-- strict thread matches above, loose matches on Subject: below --
2007-05-29 6:05 David Gibson
2007-05-29 6:43 ` Segher Boessenkool
2007-05-29 14:19 ` Josh Boyer
2007-05-29 14:49 ` Segher Boessenkool
2007-05-29 19:29 ` Josh Boyer
2007-05-30 11:17 ` Benjamin Herrenschmidt
2007-05-30 11:32 ` David Gibson
2007-05-30 11:36 ` Segher Boessenkool
2007-05-30 13:48 ` Josh Boyer
2007-05-30 15:28 ` Segher Boessenkool
2007-05-31 5:54 ` Zang Roy-r61911
2007-05-30 1:26 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070527233637.GC23768@localhost.localdomain \
--to=dwg@au1.ibm.com \
--cc=Alexandre.Bounine@tundra.com \
--cc=jwboyer@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).