netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Subject: Re: [PATCH v3 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry
Date: Fri, 3 Aug 2018 11:54:18 -0700	[thread overview]
Message-ID: <4f309bf8-c669-ae9d-750c-8946715f0fe1@gmail.com> (raw)
In-Reply-To: <5ff6dcc508726dec7d170315e2e3728667b6133f.1533311285.git.joabreu@synopsys.com>

On 08/03/2018 08:50 AM, Jose Abreu wrote:
> Add a new entry to HWIF table for XGMAC 2.10. For now we fill it with
> empty callbacks which will be added in posterior patches.
> 
> Signed-off-by: Jose Abreu <joabreu@synopsys.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Joao Pinto <jpinto@synopsys.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/common.h | 14 +++++++------
>  drivers/net/ethernet/stmicro/stmmac/hwif.c   | 31 ++++++++++++++++++++++++++--
>  include/linux/stmmac.h                       |  1 +
>  3 files changed, 38 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
> index 78fd0f8b8e81..3fb81acbd274 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/common.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/common.h
> @@ -36,12 +36,14 @@
>  #include "mmc.h"
>  
>  /* Synopsys Core versions */
> -#define	DWMAC_CORE_3_40	0x34
> -#define	DWMAC_CORE_3_50	0x35
> -#define	DWMAC_CORE_4_00	0x40
> -#define DWMAC_CORE_4_10	0x41
> -#define DWMAC_CORE_5_00 0x50
> -#define DWMAC_CORE_5_10 0x51
> +#define	DWMAC_CORE_3_40		0x34
> +#define	DWMAC_CORE_3_50		0x35
> +#define	DWMAC_CORE_4_00		0x40
> +#define DWMAC_CORE_4_10		0x41
> +#define DWMAC_CORE_5_00		0x50
> +#define DWMAC_CORE_5_10		0x51
> +#define DWXGMAC_CORE_2_10	0x21
> +
>  #define STMMAC_CHAN0	0	/* Always supported and default for all chips */
>  
>  /* These need to be power of two, and >= 4 */
> diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
> index 1f50e83cafb2..24f5ff175aa4 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
> @@ -72,6 +72,7 @@ static int stmmac_dwmac4_quirks(struct stmmac_priv *priv)
>  static const struct stmmac_hwif_entry {
>  	bool gmac;
>  	bool gmac4;
> +	bool xgmac;
>  	u32 min_id;
>  	const struct stmmac_regs_off regs;
>  	const void *desc;
> @@ -87,6 +88,7 @@ static const struct stmmac_hwif_entry {
>  	{
>  		.gmac = false,
>  		.gmac4 = false,
> +		.xgmac = false,

In a future clean-up you would like want to remove this and replace this
an enumeration which is less error prone than having to define a boolean
for each of these previous generations only to say "this is not an xgmac".
-- 
Florian

  reply	other threads:[~2018-08-03 20:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 15:50 [PATCH v3 net-next 0/9] Add support for XGMAC2 in stmmac Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry Jose Abreu
2018-08-03 18:54   ` Florian Fainelli [this message]
2018-08-06  7:55     ` Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 2/9] net: stmmac: Add MAC related callbacks for XGMAC2 Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 3/9] net: stmmac: Add DMA " Jose Abreu
2018-08-03 18:58   ` Florian Fainelli
2018-08-06  7:56     ` Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 4/9] net: stmmac: Add descriptor " Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 5/9] net: stmmac: Add MDIO related functions " Jose Abreu
2018-08-03 16:56   ` Andrew Lunn
2018-08-03 19:06   ` Florian Fainelli
2018-08-06  7:59     ` Jose Abreu
2018-08-06 15:25       ` Florian Fainelli
2018-08-07 13:35         ` Jose Abreu
2018-08-07 15:29           ` Jose Abreu
2018-08-07 17:31           ` Florian Fainelli
2018-08-03 15:50 ` [PATCH v3 net-next 6/9] net: stmmac: Add PTP support " Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 7/9] net: stmmac: Integrate XGMAC into main driver flow Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 8/9] net: stmmac: Add the bindings parsing for XGMAC2 Jose Abreu
2018-08-03 15:50 ` [PATCH v3 net-next 9/9] dt-bindings: net: stmmac: Add the bindings documentation " Jose Abreu
2018-08-07 17:36   ` Rob Herring

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=4f309bf8-c669-ae9d-750c-8946715f0fe1@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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;
as well as URLs for NNTP newsgroup(s).