netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: Stefan Chulski <stefanc@marvell.com>
Cc: netdev <netdev@vger.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	"David S. Miller" <davem@davemloft.net>,
	nadavh@marvell.com, Yan Markman <ymarkman@marvell.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	atenart@kernel.org
Subject: Re: [PATCH v7 net-next 04/15] net: mvpp2: add PPv23 version definition
Date: Thu, 4 Feb 2021 19:59:58 +0100	[thread overview]
Message-ID: <CAPv3WKcGq71P4UuUX94Z8BTosddybUpQdS1B3D1BknZsEmFkKQ@mail.gmail.com> (raw)
In-Reply-To: <1612253821-1148-5-git-send-email-stefanc@marvell.com>

Hi,

wt., 2 lut 2021 o 09:17 <stefanc@marvell.com> napisał(a):
>
> From: Stefan Chulski <stefanc@marvell.com>
>
> This patch add PPv23 version definition.
> PPv23 is new packet processor in CP115.
> Everything that supported by PPv22, also supported by PPv23.
> No functional changes in this stage.
>
> Signed-off-by: Stefan Chulski <stefanc@marvell.com>
> ---
>  drivers/net/ethernet/marvell/mvpp2/mvpp2.h      | 24 ++++++++++++--------
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 17 +++++++++-----
>  2 files changed, 25 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
> index aec9179..89b3ede 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
> @@ -60,6 +60,9 @@
>  /* Top Registers */
>  #define MVPP2_MH_REG(port)                     (0x5040 + 4 * (port))
>  #define MVPP2_DSA_EXTENDED                     BIT(5)
> +#define MVPP2_VER_ID_REG                       0x50b0
> +#define MVPP2_VER_PP22                         0x10
> +#define MVPP2_VER_PP23                         0x11
>
>  /* Parser Registers */
>  #define MVPP2_PRS_INIT_LOOKUP_REG              0x1000
> @@ -469,7 +472,7 @@
>  #define     MVPP22_GMAC_INT_SUM_MASK_LINK_STAT BIT(1)
>  #define            MVPP22_GMAC_INT_SUM_MASK_PTP        BIT(2)
>
> -/* Per-port XGMAC registers. PPv2.2 only, only for GOP port 0,
> +/* Per-port XGMAC registers. PPv2.2 and PPv2.3, only for GOP port 0,
>   * relative to port->base.
>   */
>  #define MVPP22_XLG_CTRL0_REG                   0x100
> @@ -506,7 +509,7 @@
>  #define     MVPP22_XLG_CTRL4_MACMODSELECT_GMAC BIT(12)
>  #define     MVPP22_XLG_CTRL4_EN_IDLE_CHECK     BIT(14)
>
> -/* SMI registers. PPv2.2 only, relative to priv->iface_base. */
> +/* SMI registers. PPv2.2 and PPv2.3, relative to priv->iface_base. */
>  #define MVPP22_SMI_MISC_CFG_REG                        0x1204
>  #define     MVPP22_SMI_POLLING_EN              BIT(10)
>
> @@ -582,7 +585,7 @@
>  #define MVPP2_QUEUE_NEXT_DESC(q, index) \
>         (((index) < (q)->last_desc) ? ((index) + 1) : 0)
>
> -/* XPCS registers. PPv2.2 only */
> +/* XPCS registers.PPv2.2 and PPv2.3 */
>  #define MVPP22_MPCS_BASE(port)                 (0x7000 + (port) * 0x1000)
>  #define MVPP22_MPCS_CTRL                       0x14
>  #define     MVPP22_MPCS_CTRL_FWD_ERR_CONN      BIT(10)
> @@ -593,7 +596,7 @@
>  #define     MVPP22_MPCS_CLK_RESET_DIV_RATIO(n) ((n) << 4)
>  #define     MVPP22_MPCS_CLK_RESET_DIV_SET      BIT(11)
>
> -/* XPCS registers. PPv2.2 only */
> +/* XPCS registers. PPv2.2 and PPv2.3 */
>  #define MVPP22_XPCS_BASE(port)                 (0x7400 + (port) * 0x1000)
>  #define MVPP22_XPCS_CFG0                       0x0
>  #define     MVPP22_XPCS_CFG0_RESET_DIS         BIT(0)
> @@ -930,15 +933,16 @@ struct mvpp2 {
>         void __iomem *iface_base;
>         void __iomem *cm3_base;
>
> -       /* On PPv2.2, each "software thread" can access the base
> +       /* On PPv2.2 and PPv2.3, each "software thread" can access the base
>          * register through a separate address space, each 64 KB apart
>          * from each other. Typically, such address spaces will be
>          * used per CPU.
>          */
>         void __iomem *swth_base[MVPP2_MAX_THREADS];
>
> -       /* On PPv2.2, some port control registers are located into the system
> -        * controller space. These registers are accessible through a regmap.
> +       /* On PPv2.2 and PPv2.3, some port control registers are located into
> +        * the system controller space. These registers are accessible
> +        * through a regmap.
>          */
>         struct regmap *sysctrl_base;
>
> @@ -980,7 +984,7 @@ struct mvpp2 {
>         u32 tclk;
>
>         /* HW version */
> -       enum { MVPP21, MVPP22 } hw_version;
> +       enum { MVPP21, MVPP22, MVPP23 } hw_version;
>
>         /* Maximum number of RXQs per port */
>         unsigned int max_port_rxqs;
> @@ -1227,7 +1231,7 @@ struct mvpp21_rx_desc {
>         __le32 reserved8;
>  };
>
> -/* HW TX descriptor for PPv2.2 */
> +/* HW TX descriptor for PPv2.2 and PPv2.3 */
>  struct mvpp22_tx_desc {
>         __le32 command;
>         u8  packet_offset;
> @@ -1239,7 +1243,7 @@ struct mvpp22_tx_desc {
>         __le64 buf_cookie_misc;
>  };
>
> -/* HW RX descriptor for PPv2.2 */
> +/* HW RX descriptor for PPv2.2 and PPv2.3 */
>  struct mvpp22_rx_desc {
>         __le32 status;
>         __le16 reserved1;
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index 307f9fd..11c56d2 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -385,7 +385,7 @@ static int mvpp2_bm_pool_create(struct device *dev, struct mvpp2 *priv,
>         if (!IS_ALIGNED(size, 16))
>                 return -EINVAL;
>
> -       /* PPv2.1 needs 8 bytes per buffer pointer, PPv2.2 needs 16
> +       /* PPv2.1 needs 8 bytes per buffer pointer, PPv2.2 and PPv2.3 needs 16

s/needs 16/need 16/

>          * bytes per buffer pointer
>          */
>         if (priv->hw_version == MVPP21)
> @@ -1173,7 +1173,7 @@ static void mvpp2_interrupts_unmask(void *arg)
>         u32 val;
>         int i;
>
> -       if (port->priv->hw_version != MVPP22)
> +       if (port->priv->hw_version == MVPP21)
>                 return;

This change should go to "net: mvpp2: always compare hw-version vs
MVPP21" patch. Please also swap order of those 2 commits - the
preparation patch should go before MVPP23 addition.

Thanks,
Marcin

  reply	other threads:[~2021-02-04 19:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  8:16 [PATCH v7 net-next 00/15] net: mvpp2: Add TX Flow Control support stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 01/15] doc: marvell: add cm3-mem and PPv2.3 description stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 02/15] dts: marvell: add CM3 SRAM memory to cp115 ethernet device tree stefanc
2021-02-04 18:59   ` Marcin Wojtas
2021-02-02  8:16 ` [PATCH v7 net-next 03/15] net: mvpp2: add CM3 SRAM memory map stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 04/15] net: mvpp2: add PPv23 version definition stefanc
2021-02-04 18:59   ` Marcin Wojtas [this message]
2021-02-02  8:16 ` [PATCH v7 net-next 05/15] net: mvpp2: always compare hw-version vs MVPP21 stefanc
2021-02-04 19:00   ` Marcin Wojtas
2021-02-02  8:16 ` [PATCH v7 net-next 06/15] net: mvpp2: increase BM pool and RXQ size stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 07/15] net: mvpp2: add FCA periodic timer configurations stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 08/15] net: mvpp2: add FCA RXQ non occupied descriptor threshold stefanc
2021-02-04 19:00   ` Marcin Wojtas
2021-02-02  8:16 ` [PATCH v7 net-next 09/15] net: mvpp2: enable global flow control stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 10/15] net: mvpp2: add RXQ flow control configurations stefanc
2021-02-04 19:00   ` Marcin Wojtas
2021-02-02  8:16 ` [PATCH v7 net-next 11/15] net: mvpp2: add ethtool flow control configuration support stefanc
2021-02-02  8:16 ` [PATCH v7 net-next 12/15] net: mvpp2: add BM protection underrun feature support stefanc
2021-02-04 19:00   ` Marcin Wojtas
2021-02-02  8:16 ` [PATCH v7 net-next 13/15] net: mvpp2: add PPv23 RX FIFO flow control stefanc
2021-02-04 19:00   ` Marcin Wojtas
2021-02-02  8:17 ` [PATCH v7 net-next 14/15] net: mvpp2: set 802.3x GoP Flow Control mode stefanc
2021-02-02  8:17 ` [PATCH v7 net-next 15/15] net: mvpp2: add TX FC firmware check stefanc
2021-02-04 19:00 ` [PATCH v7 net-next 00/15] net: mvpp2: Add TX Flow Control support Marcin Wojtas

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=CAPv3WKcGq71P4UuUX94Z8BTosddybUpQdS1B3D1BknZsEmFkKQ@mail.gmail.com \
    --to=mw@semihalf.com \
    --cc=andrew@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stefanc@marvell.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=ymarkman@marvell.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).