Subject: Re: [PATCH v13 net-next 05/15] net: mvpp2: add PPv23 version definition

From: Russell King - ARM Linux admin <[email-masked]>
Date: Thu, 11 Feb 2021 11:42:38 +0000

On Thu, Feb 11, 2021 at 12:48:52PM +0200, [email-masked] wrote:
> From: Stefan Chulski <[email-masked]>
> 
> 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 <[email-masked]>
> Acked-by: Marcin Wojtas <[email-masked]>

Reviewed-by: Russell King <[email-masked]>

> @@ -7049,6 +7049,11 @@ static int mvpp2_probe(struct platform_device *pdev)
>  			priv->port_map |= BIT(i);
>  	}
>  
> +	if (priv->hw_version != MVPP21) {
> +		if (mvpp2_read(priv, MVPP2_VER_ID_REG) == MVPP2_VER_PP23)
> +			priv->hw_version = MVPP23;
> +	}
> +

The only minor comment I have on this is... the formatting of the
above. Wouldn't:

	if (priv->hw_version >= MVPP22 &&
	    mvpp2_read(priv, MVPP2_VER_ID_REG) == MVPP2_VER_PP23)
		priv->hw_version = MVPP23;

read better?

Do we need to even check priv->hw_version here? Isn't this register
implemented in PPv2.1 where it contains the value zero?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel