[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f309bf8-c669-ae9d-750c-8946715f0fe1@gmail.com>
Date: Fri, 3 Aug 2018 11:54:18 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Jose Abreu <Jose.Abreu@...opsys.com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Joao Pinto <Joao.Pinto@...opsys.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...com>
Subject: Re: [PATCH v3 net-next 1/9] net: stmmac: Add XGMAC 2.10 HWIF entry
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@...opsys.com>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Joao Pinto <jpinto@...opsys.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>
> Cc: Alexandre Torgue <alexandre.torgue@...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
Powered by blists - more mailing lists