U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Philip Oberfichtner <pro@denx.de>, u-boot@lists.denx.de
Cc: joe.hershberger@ni.com, rfried.dev@gmail.com, trini@konsulko.com,
	caleb.connolly@linaro.org, neil.armstrong@linaro.org,
	sumit.garg@linaro.org, sjg@chromium.org,
	philipp.tomsich@vrull.eu, kever.yang@rock-chips.com,
	patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com,
	jonas@kwiboo.se, leyfoon.tan@starfivetech.com, epsi@gmx.de,
	xypron.glpk@gmx.de, seanga2@gmail.com,
	sebastien.szymanski@armadeus.com, festevam@gmail.com,
	sebastian.reichel@collabora.com, yanhong.wang@starfivetech.com,
	christophe.roullier@st.com
Subject: Re: [RFC PATCH 1/1] net: dwc_eth_qos: mdio: Implement clause 45
Date: Tue, 23 Apr 2024 14:52:46 +0200	[thread overview]
Message-ID: <1bc044d6-01ef-4a7a-87e6-e212f10c032e@denx.de> (raw)
In-Reply-To: <20240423085158.29246-1-pro@denx.de>

On 4/23/24 10:51 AM, Philip Oberfichtner wrote:
> Bevor this commit, only clause 22 access was possible. After this commit,
> clause 45 direct access will available as well.
> 
> Note that there is a slight change of behavior: Before this commit, the
> C45E bit was set to whatever value was left in the register from the
> previous access. After this commit, we adopt the common practice of
> discerning C45 from C22 using the devad argument.
> 
> Signed-off-by: Philip Oberfichtner <pro@denx.de>
> ---
> 
> Notes:
>      This patch is labeled RFC as there is a slight change of behavior (see
>      commit message). I'm not sure in fact if this solution works for
>      everybody - this is up for discussion!
>      
>      My implementation is tested on an Intel Elkhart lake SOC. Driver code
>      for dwc_eth_qos_intel coming soon in a separate patch series.
> 
>   drivers/net/dwc_eth_qos.c | 66 ++++++++++++++++++++++++++-------------
>   drivers/net/dwc_eth_qos.h |  1 +
>   2 files changed, 45 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> index 86d989e244..64a9bff6bb 100644
> --- a/drivers/net/dwc_eth_qos.c
> +++ b/drivers/net/dwc_eth_qos.c
> @@ -162,6 +162,25 @@ static int eqos_mdio_wait_idle(struct eqos_priv *eqos)
>   				 1000000, true);
>   }
>   
> +/* Bitmask common for mdio_read and mdio_write */
> +#define EQOS_MDIO_BITFIELD(pa, rda, cr) \
> +	(pa  << EQOS_MAC_MDIO_ADDRESS_PA_SHIFT)  | \

Parenthesis around (pa) are missing, DTTO for the rest of this.

However, better use FIELD_GET/FIELD_PREP macros instead.

[...]

      reply	other threads:[~2024-04-23 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  8:51 [RFC PATCH 1/1] net: dwc_eth_qos: mdio: Implement clause 45 Philip Oberfichtner
2024-04-23 12:52 ` Marek Vasut [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=1bc044d6-01ef-4a7a-87e6-e212f10c032e@denx.de \
    --to=marex@denx.de \
    --cc=caleb.connolly@linaro.org \
    --cc=christophe.roullier@st.com \
    --cc=epsi@gmx.de \
    --cc=festevam@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=jonas@kwiboo.se \
    --cc=kever.yang@rock-chips.com \
    --cc=leyfoon.tan@starfivetech.com \
    --cc=neil.armstrong@linaro.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=pro@denx.de \
    --cc=rfried.dev@gmail.com \
    --cc=seanga2@gmail.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=sebastien.szymanski@armadeus.com \
    --cc=sjg@chromium.org \
    --cc=sumit.garg@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=yanhong.wang@starfivetech.com \
    /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