From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 8E6AB13C3D6 for ; Wed, 15 Jan 2025 14:53:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736952842; cv=none; b=fjoHkrZl3yZ+hUsXw+0pzgdD/5sfeH5cduILoi75Fjd3mYjoauJg1DUcHzh2rt3iudhMCKRhskOdS/4QGLbHJIkWxNd+yJabMXIYpZm4KMM4P2aTFcvyVbAXP19+MizMH7ipWdhpwTFH3kr9YUOeji/HpQTWppKNGf40huOnQI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736952842; c=relaxed/simple; bh=Ht71pen2DjZ4KrcyxlrE8/Qc3lERU/loKFju16OuWxw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ocGw943gxpVLQfKQqDvzELkPsA4+jkepdgMvRx1yIXTWUgsTHMKKxcppLurJ7RSkmK9LhDmZxuslRKlKQcX8v3dIUQY7QZ2+tQ9VCa/+A+K7VfkNOH4/CwjcZpB/bR67fELV6NqgKxIeH01NcfVoUE00skCZwB081jQEdXRzywE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=O7Sa1k/b; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="O7Sa1k/b" Received: by mail.gandi.net (Postfix) with ESMTPSA id 42FD420007; Wed, 15 Jan 2025 14:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1736952837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A5HzedHrDTTaaYhW4c4vjlkU8W6+KNnjRLtnJ7FWDig=; b=O7Sa1k/bt4nVGHriNYjerugIhcrT6/4qoUmwt0nufvXWFJ0XoYacyu2lg1IYfE8wX7Bu+G W6u81AHHSIj+ToXo849sJQBQtCuU1LCh/YEmGB17dubCFOBDFyAzq0j+7oCuTghMMAi1k0 frCjkp8x88ZXzRPlKUU2dD3kIcg9Vvrr9oxBZO6++rOdLwrXejmgQes2HJy4CROUk5Co54 NwYk4Y3Muq0uhV1a70EoamSEZynuayFfa1z/Yg6+67UENHzS6n93Wakae4bZGZ/REU+NJG +ke/eejMCpTCGV18rORimootvxuBCANSIXH7DYqIiiSaokT/o//9vNuFVUbKrQ== Date: Wed, 15 Jan 2025 15:53:54 +0100 From: Maxime Chevallier To: "Russell King (Oracle)" 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: <20250115155354.0acdacc7@fedora.home> In-Reply-To: References: Organization: Bootlin X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) 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-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com 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) :) The rest looks good to me, Thanks, Maxime