From: Andre Przywara <andre.przywara@arm.com>
To: Maksim Kiselev <bigunclemax@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Sam Edwards <CFSworks@gmail.com>, Simon Glass <sjg@chromium.org>,
u-boot@lists.denx.de
Subject: Re: [PATCH v2] net: sun8i-emac: Add support for fixed-link phy
Date: Mon, 29 Jan 2024 00:20:01 +0000 [thread overview]
Message-ID: <20240129002001.5197aeeb@minigeek.lan> (raw)
In-Reply-To: <20240120162625.2413494-1-bigunclemax@gmail.com>
On Sat, 20 Jan 2024 19:26:24 +0300
Maksim Kiselev <bigunclemax@gmail.com> wrote:
> Make the "phy-handle" property optional, which allows support
> for a fixed-link phy configuration.
>
> Thus if the "phy-handle" is present in a DT, then driver will work as
> before. Otherwise, phyaddr initialization will not be necessary,
> as it is not needed in case of a fixed-link config.
>
> Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Thanks, looks good now:
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Queued for the first PR.
Cheers,
Andre
> ---
> drivers/net/sun8i_emac.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
> index a12f7e32e8..8bff4fe9a9 100644
> --- a/drivers/net/sun8i_emac.c
> +++ b/drivers/net/sun8i_emac.c
> @@ -833,11 +833,8 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
> priv->use_internal_phy = false;
>
> offset = fdtdec_lookup_phandle(gd->fdt_blob, node, "phy-handle");
> - if (offset < 0) {
> - debug("%s: Cannot find PHY address\n", __func__);
> - return -EINVAL;
> - }
> - priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", -1);
> + if (offset >= 0)
> + priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", -1);
>
> pdata->phy_interface = dev_read_phy_mode(dev);
> debug("phy interface %d\n", pdata->phy_interface);
prev parent reply other threads:[~2024-01-29 0:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-20 16:26 [PATCH v2] net: sun8i-emac: Add support for fixed-link phy Maksim Kiselev
2024-01-29 0:20 ` Andre Przywara [this message]
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=20240129002001.5197aeeb@minigeek.lan \
--to=andre.przywara@arm.com \
--cc=CFSworks@gmail.com \
--cc=bigunclemax@gmail.com \
--cc=joe.hershberger@ni.com \
--cc=rfried.dev@gmail.com \
--cc=samuel@sholland.org \
--cc=sjg@chromium.org \
--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