From: Troy Kisky <troy.kisky@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] net: fec_mxc: add PHYLIB support
Date: Mon, 30 Jan 2012 19:13:49 -0700 [thread overview]
Message-ID: <4F274E5D.8090804@boundarydevices.com> (raw)
In-Reply-To: <CAKWjMd7hz5e9pY5Jao_muoH5o1e89FmEZ0+JpZULwmBg5DDZ4Q@mail.gmail.com>
On 1/29/2012 7:04 PM, Andy Fleming wrote:
> On Thu, Jan 26, 2012 at 4:21 PM, Troy Kisky
> <troy.kisky@boundarydevices.com> wrote:
>> Signed-off-by: Troy Kisky<troy.kisky@boundarydevices.com>
>> ---
>> drivers/net/fec_mxc.c | 35 ++++++++++++++++++++++++++++++-----
>> drivers/net/fec_mxc.h | 1 +
>> 2 files changed, 31 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
>> index 3fffe79..4d7a38d 100644
>> --- a/drivers/net/fec_mxc.c
>> +++ b/drivers/net/fec_mxc.c
>> @@ -371,6 +371,20 @@ static int fec_set_hwaddr(struct eth_device *dev)
>> return 0;
>> }
>>
>> +static void fec_eth_phy_config(struct eth_device *dev)
>> +{
>> +#ifdef CONFIG_PHYLIB
>> + struct fec_priv *fec = (struct fec_priv *)dev->priv;
>> + struct phy_device *phydev;
>> +
>> + phydev = phy_connect(miiphy_get_dev_by_name(dev->name),
>> + fec->phy_id, dev, PHY_INTERFACE_MODE_RGMII);
>> + fec->phydev = phydev;
>> + if (phydev)
>> + phy_config(phydev);
>> +#endif
>> +}
>> +
>> /**
>> * Start the FEC engine
>> * @param[in] dev Our device to handle
>> @@ -427,9 +441,19 @@ static int fec_open(struct eth_device *edev)
>> }
>> #endif
>>
>> - miiphy_wait_aneg(edev);
>> - speed = miiphy_speed(edev->name, fec->phy_id);
>> - miiphy_duplex(edev->name, fec->phy_id);
>> + if (fec->phydev) {
>> + /* Start up the PHY */
>> +#ifdef CONFIG_PHYLIB
>> + phy_startup(fec->phydev);
>> +#endif
>
> The old miiphy code is not truly compatible with the new PHY Lib code.
> Please implement full support, rather than relying on the
> compatibility shim. It should be straightforward, just convert all of
> the miiphy-style calls into the newer mdio/phy calls.
>
> Andy
>
How can I do this without running the risk of breaking existing boards?
Surely, there should be an intermediate stage where both are supported
until all boards are converted. Then, my "shim" can be safely removed.
Or am I entirely missing you point???
Sorry if I am. Please elaborate on how not to break existing boards which
I cannot test.
Thanks
Troy
next prev parent reply other threads:[~2012-01-31 2:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 22:21 [U-Boot] [PATCH 1/4] net: fec_mxc: add 1000 Mbps selection Troy Kisky
2012-01-26 22:21 ` [U-Boot] [PATCH 2/4] net: fec_mxc: add PHYLIB support Troy Kisky
2012-01-30 2:04 ` Andy Fleming
2012-01-31 2:13 ` Troy Kisky [this message]
2012-02-01 0:29 ` Andy Fleming
2012-02-01 2:00 ` Troy Kisky
2012-01-26 22:21 ` [U-Boot] [PATCH 3/4] net: phy: add support for Micrel's KSZ9021 Troy Kisky
2012-01-27 2:54 ` Mike Frysinger
2012-01-27 21:56 ` Troy Kisky
2012-01-30 2:26 ` Andy Fleming
2012-01-30 21:30 ` Troy Kisky
2012-01-31 0:05 ` Andy Fleming
2012-01-31 2:06 ` Troy Kisky
2012-01-26 22:21 ` [U-Boot] [PATCH 4/4] i.mx6q: mx6qsabrelite: Update the network configuration Troy Kisky
2012-01-27 10:25 ` [U-Boot] [PATCH 1/4] net: fec_mxc: add 1000 Mbps selection Dirk Behme
2012-01-30 1:56 ` Andy Fleming
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=4F274E5D.8090804@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox