[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210124131810.GZ1551@shell.armlinux.org.uk>
Date: Sun, 24 Jan 2021 13:18:11 +0000
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: stefanc@...vell.com
Cc: netdev@...r.kernel.org, thomas.petazzoni@...tlin.com,
davem@...emloft.net, nadavh@...vell.com, ymarkman@...vell.com,
linux-kernel@...r.kernel.org, kuba@...nel.org, mw@...ihalf.com,
andrew@...n.ch, atenart@...nel.org
Subject: Re: [PATCH v2 RFC net-next 04/18] net: mvpp2: add PPv23 version
definition
On Sun, Jan 24, 2021 at 01:43:53PM +0200, stefanc@...vell.com wrote:
> From: Stefan Chulski <stefanc@...vell.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@...vell.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
Looking at the Armada 8040 docs, it seems this register exists on
PPv2.1 as well, and holds the value zero there.
I wonder whether we should instead read it's value directly into
hw_version, and test against these values, rather than inventing our
own verison enum.
I've also been wondering whether your != MVPP21 comparisons should
instead be >= MVPP22.
Any thoughts?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists