From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] ppc4xx: Add support for GPCS, SGMII and M88E1112 PHY
Date: Sat, 30 Aug 2008 19:56:20 +0200 [thread overview]
Message-ID: <200808301956.20939.sr@denx.de> (raw)
In-Reply-To: <f8328f7c0808300934n3fb87837p29ccb9ca0e1e58d1@mail.gmail.com>
Ben,
On Saturday 30 August 2008, Ben Warren wrote:
> > +#if !defined(CONFIG_PHY_LESS)
> > +#define CONFIG_PHY_LESS 0xFFFFFFFF /* PHY-less mode */
> > +#define CONFIG_PHY_LESS_SPEED 1000
> > +#define CONFIG_PHY_LESS_DUPLEX FULL
> > +#endif
> > +
>
> Sorry, but this is not scalable. There are many real-world examples
> of boards where one controller is connected to a PHY, and another has
> a FIXED link to a switch or something else. This driver is already an
> unwieldy mess and adding this sort of thing only makes it worse. If
> you want to add fixed-link capabilities, please re-direct your efforts
> towards a more generic, scalable solution.
Yes, this was my first fear too. But take a look at the commet Victor added in
his 2nd patch version (I asked specifically for this comment to learn how
this should work):
+/*
+ * Some boards do not have a PHY for each ethernet port.
+ * For example on Arches board (2 CPU system) eth0 does not have
+ * a PHY, both CPU's are wired directly together (AC coupled)
+ * using SGMII0. In these cases set the appropriate
+ * CONFIG_PHY_ADDR equal to CONFIG_PHY_LESS to detect that
+ * the specified ethernet port does not have a PHY.
+ */
+#if !defined(CONFIG_PHY_LESS)
+#define CONFIG_PHY_LESS 0xFFFFFFFF /* PHY-less mode */
+#define CONFIG_PHY_LESS_SPEED 1000
+#define CONFIG_PHY_LESS_DUPLEX FULL
+#endif
So it's a per ethernet-interface selectable define of the CONFIG_PHY_ADDR and
it kind of scales. It's not perfect but at least it's a way to support boards
with interfaces connected to PHY's and other without PHY connection.
What do you think? Is this acceptable? Or what other solution would be
acceptable?
Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2008-08-30 17:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 6:20 [U-Boot] [PATCH 1/1] ppc4xx: Add support for GPCS, SGMII and M88E1112 PHY Victor Gallardo
2008-08-30 9:18 ` Stefan Roese
2008-08-30 16:34 ` Ben Warren
2008-08-30 17:56 ` Stefan Roese [this message]
2008-08-30 20:33 ` Ben Warren
2008-09-02 17:52 ` Victor Gallardo
-- strict thread matches above, loose matches on Subject: below --
2008-08-30 11:08 Victor Gallardo
2008-09-05 6:47 Victor Gallardo
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=200808301956.20939.sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.