mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@oss.nxp.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, richardcochran@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	sebastian.tobuschat@nxp.com
Subject: Re: [PATCH v2 03/13] net: phy: nxp-c45-tja11xx: add *_reg_field functions
Date: Fri, 23 Jun 2023 21:32:23 +0200	[thread overview]
Message-ID: <ZJXzRzJy99d3v7FY@corigine.com> (raw)
In-Reply-To: <20230623074123.152931-4-radu-nicolae.pirea@oss.nxp.com>

On Fri, Jun 23, 2023 at 10:41:13AM +0300, Radu Pirea (NXP OSS) wrote:
> Between TJA1120 and TJA1103 the hardware was improved, but some register
> addresses were changed and some bit fields were moved from one register
> to another.
> 
> To integrate more PHYs in the same driver with the same register fields,
> but these register fields located in different registers at
> different offsets, I introduced the nxp_c45_reg_field structure.
> 
> Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
> ---
>  drivers/net/phy/nxp-c45-tja11xx.c | 82 +++++++++++++++++++++++++++++++
>  1 file changed, 82 insertions(+)
> 
> diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c
> index f1f15a1b6cfc..2664b3bfcb35 100644
> --- a/drivers/net/phy/nxp-c45-tja11xx.c
> +++ b/drivers/net/phy/nxp-c45-tja11xx.c
> @@ -191,6 +191,21 @@ struct nxp_c45_skb_cb {
>  	unsigned int type;
>  };
>  
> +#define NXP_C45_REG_FIELD(_reg, _devad, _offset, _size)	\
> +	((struct nxp_c45_reg_field) {			\
> +		.reg = _reg,				\
> +		.devad =  _devad,			\
> +		.offset = _offset,			\
> +		.size = _size,				\
> +	})
> +
> +struct nxp_c45_reg_field {
> +	u16 reg;
> +	u8 devad;
> +	u8 offset;
> +	u8 size;
> +};
> +
>  struct nxp_c45_hwts {
>  	u32	nsec;
>  	u32	sec;
> @@ -225,6 +240,73 @@ struct nxp_c45_phy_stats {
>  	u16		mask;
>  };
>  
> +static int nxp_c45_read_reg_field(struct phy_device *phydev,
> +				  const struct nxp_c45_reg_field *reg_field)

Hi Radu,

I think this is resolved in a latter patch in this series.
But nxp_c45_read_reg_field is defined but not used.
As is nxp_c45_set_reg_field and nxp_c45_clear_reg_field.

This causes an allmodconfig build to fail on x86_64 with GCC 12.3.0.

-- 
pw-bot: changes-requested


  reply	other threads:[~2023-06-23 19:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23  7:41 [PATCH v2 00/13] Add TJA1120 support Radu Pirea (NXP OSS)
2023-06-23  7:41 ` [PATCH v2 01/13] net: phy: nxp-c45-tja11xx: use phylib master/slave implementation Radu Pirea (NXP OSS)
2023-06-23  7:41 ` [PATCH v2 02/13] net: phy: nxp-c45-tja11xx: remove RX BIST frame counters Radu Pirea (NXP OSS)
2023-06-23  7:41 ` [PATCH v2 03/13] net: phy: nxp-c45-tja11xx: add *_reg_field functions Radu Pirea (NXP OSS)
2023-06-23 19:32   ` Simon Horman [this message]
2023-06-26  8:43     ` Radu Pirea (OSS)
2023-06-23  7:41 ` [PATCH v2 04/13] net: phy: nxp-c45-tja11xx: prepare the ground for TJA1120 Radu Pirea (NXP OSS)
2023-06-23  7:41 ` [PATCH v2 05/13] net: phy: c45: detect 100BaseT1 and 1000BaseT1 PMA abilites Radu Pirea (NXP OSS)
2023-06-24 18:44   ` Andrew Lunn
2023-06-23  7:41 ` [PATCH v2 06/13] net: phy: nxp-c45-tja11xx: use get_features Radu Pirea (NXP OSS)
2023-06-24 19:26   ` Andrew Lunn
2023-06-23  7:41 ` [PATCH v2 07/13] net: phy: nxp-c45-tja11xx: add TJA1120 support Radu Pirea (NXP OSS)
2023-06-24 19:28   ` Andrew Lunn
2023-06-23  7:41 ` [PATCH v2 08/13] net: phy: nxp-c45-tja11xx: enable LTC sampling on both ext_ts edges Radu Pirea (NXP OSS)
2023-06-24 19:29   ` Andrew Lunn
2023-06-23  7:41 ` [PATCH v2 09/13] net: phy: nxp-c45-tja11xx: read egress ts on TJA1120 Radu Pirea (NXP OSS)
2023-06-23  7:41 ` [PATCH v2 10/13] net: phy: nxp-c45-tja11xx: handle FUSA irq Radu Pirea (NXP OSS)
2023-06-24 19:31   ` Andrew Lunn
2023-06-23  7:41 ` [PATCH v2 11/13] net: phy: nxp-c45-tja11xx: run cable test with the PHY in test mode Radu Pirea (NXP OSS)
2023-06-24 19:32   ` Andrew Lunn
2023-06-23  7:41 ` [PATCH v2 12/13] net: phy: nxp-c45-tja11xx: read ext trig ts on TJA1120 Radu Pirea (NXP OSS)
2023-06-23  7:41 ` [PATCH v2 13/13] net: phy: nxp-c45-tja11xx: reset PCS if the link goes down Radu Pirea (NXP OSS)
2023-06-24 19:33   ` Andrew Lunn

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=ZJXzRzJy99d3v7FY@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=radu-nicolae.pirea@oss.nxp.com \
    --cc=richardcochran@gmail.com \
    --cc=sebastian.tobuschat@nxp.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

all inboxes | Powered by JetHome®