From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE89311CA9 for ; Wed, 15 Jan 2025 15:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736956003; cv=none; b=MV6Ho5tTRopUGry/NA/iW05iLXpcPNX22BkDdlIJzbpQO9O/n2Ip4eDBrnAq6pjyCnb/woh5EoaPmcWl+QbREzJu+05pVf3T0uAkCfm/9dMF9pcZ4quChhCr78eqGP+icl4/VsAO4c4ifEmp2/PeOmtSyF8UwCvsoPUnlKZiQGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736956003; c=relaxed/simple; bh=g376aaXz6r5Ovfkz+D/ln+tTonjW7f6WQ7+U1aRZHiE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sn1OKdOcuJMtPWtZCvSsJDpZR+dNRQ4xCYP+qJFcG/qKsyz3MN5xUZsP0MEbMuzro/tDkZx2NkRctZNmfEgT6uejAhyTtCKjwFnrychnJpbvYAsKfybP7rudFLjRRr45wCplo8r3nisbbTc0POUn5qQBgmZev7XQ1NZoCJjbJek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=l8/w4Qtn; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="l8/w4Qtn" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=S42DDkPynBO+hlx/lydV1Jlo7tr53yug/v0X8twoOEg=; b=l8/w4QtnpRqEdettHBVyIuwDZc FQUDLsKUwDsfX0FU+R6R6zH+4kJxJiXIusCizXwSzL9CDrdmB1o9Z80eWzDXY3N66R9sX1BOGThV5 sX1gWOwdxP/KtnYUtwHXW2nOh8mSgg0XoQWKHuQbEz6+sPBhg1Iw6bECzNYzayfHXc3/erhqLcMBX iqnwITC6lTI+h+iZaiWVzf6cKHmOuZSHK537q+kFKlXc/fGWNpgwZM+1EN5oURRfVsdRn6gKBHK5z lDFgQPB1PaDAZE9XwDJqu4ddD5hWi63LZ4/DkYq/Xbc6zn1UrxhsJtIgnb9EZFFPB/rKul1Wl/aK3 lIcmiF4Q==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56716) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tY5b9-0001MY-2b; Wed, 15 Jan 2025 15:46:27 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1tY5b6-0006H7-2H; Wed, 15 Jan 2025 15:46:24 +0000 Date: Wed, 15 Jan 2025 15:46:24 +0000 From: "Russell King (Oracle)" To: Maxime Chevallier Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , Andrew Lunn , Bryan Whitehead , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Marcin Wojtas , Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni , Simon Horman , UNGLinuxDriver@microchip.com, Vladimir Oltean Subject: Re: [PATCH RFC net-next 06/10] net: mvpp2: add EEE implementation Message-ID: References: <20250115155354.0acdacc7@fedora.home> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250115155354.0acdacc7@fedora.home> Sender: Russell King (Oracle) On Wed, Jan 15, 2025 at 03:53:54PM +0100, Maxime Chevallier wrote: > Hello Russell, > > On Tue, 14 Jan 2025 14:02:29 +0000 > "Russell King (Oracle)" wrote: > > > Add EEE support for mvpp2, using phylink's EEE implementation, which > > means we just need to implement the two methods for LPI control, and > > with the initial configuration. Only SGMII mode is supported, so only > > 100M and 1G speeds. > > > > Disabling LPI requires clearing a single bit. Enabling LPI needs a full > > configuration of several values, as the timer values are dependent on > > the MAC operating speed. > > > > Signed-off-by: Russell King (Oracle) > > -- > > v3: split LPI timer limit and validation into separate patches > > --- > > drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 5 ++ > > .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 86 +++++++++++++++++++ > > 2 files changed, 91 insertions(+) > > > > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h > > index 9e02e4367bec..364d038da7ea 100644 > > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h > > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h > > @@ -481,6 +481,11 @@ > > #define MVPP22_GMAC_INT_SUM_MASK 0xa4 > > #define MVPP22_GMAC_INT_SUM_MASK_LINK_STAT BIT(1) > > #define MVPP22_GMAC_INT_SUM_MASK_PTP BIT(2) > > +#define MVPP2_GMAC_LPI_CTRL0 0xc0 > > +#define MVPP2_GMAC_LPI_CTRL0_TS_MASK GENMASK(8, 8) > > I think this should be GENMASK(15, 8) :) Bah. Thanks for spotting... and people say GENMASK() is better than using hex. I've disagreed with that, but tried to conform, but I keep making mistakes with GENMASK(), but never have with hex notation. Maybe I'm just different from most people, having been programming computers in assembly since the 1980s, where the choices were decimal or hex! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!