Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3844891pxf; Tue, 6 Apr 2021 01:28:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHh6NASRU3VQIROXJy0nvnPnvIfyuVXVPuSsBgAW+7110ml3UcUADP4iBGzD14J0NmSFgg X-Received: by 2002:a05:6402:1777:: with SMTP id da23mr15780175edb.223.1617697681155; Tue, 06 Apr 2021 01:28:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1617697681; cv=pass; d=google.com; s=arc-20160816; b=rs7cqcs1pKp6mqgqo7yuOFmsoZRyZic5j+qDEc3OwX0spUAnQ62uR8e+8kpVIYUKRl 8D0pZI/1IgTz8p5ifEKOOnAnKXpAPN6iiPmr+CTdZB0dIcFyKB56EFhKtZPzTStbZW1j QMqlNVQyhO2Gtx0At6I3M7St8+1tns1knKL6ZWZp/nFNM5HKY9JfCEaVTb/NY3jaqDFU ylHJDsrl77YS4yg8ib1dq+jBBcmDe99igJM6bxKJFB7l6TY/M1I/8Li3o9SCkLzBUzml D2r/byLlSWltN7Vg9Ro/Qq57X9lj5Q3sVUjFTtDO9pVxS47rcjcF23LbzVguiTmGqQll Qs8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-product:dlp-version:dlp-reaction:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:ironport-sdr :ironport-sdr; bh=gZxD7zKCAT195Qz69Etwna9smxfz8LfXOF1XyWDYbHI=; b=rylY8/M3yd2r3RiS5JyxIGowFYgPhHS4gkiHTtXnSC7aBn7TyUya4r/3mjd/3zaEJp WvOjOscYkRoU7ON0Ik5E2c2wEDtedYPW2p1m/HS8owtVa2R1h7LPqn5BaWU1BYs8vgZE m08Vl2y1a+AsGmWAXEo8CsyiHd4ETRnJ6asbiQ8Mi8deRnBmAyVkeZWJfpLKRCPo8N2Q +8AVF8IPsdI1Vxy7G09uGOMzP8F1/5BEMfFKeBDv/NYt9fq5HuiWwlqnhIWUGEDSGg9V mQrNAYlhzwFMRent3VRRe/b4FG6B0jXGoGrU6CVzB7zEG2GL3ZSmkqb21KJDJ250oZN9 mDjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=rrgKZm26; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si15655298edv.329.2021.04.06.01.27.37; Tue, 06 Apr 2021 01:28:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=rrgKZm26; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232562AbhDESG0 (ORCPT + 99 others); Mon, 5 Apr 2021 14:06:26 -0400 Received: from mga11.intel.com ([192.55.52.93]:57773 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232098AbhDESGZ (ORCPT ); Mon, 5 Apr 2021 14:06:25 -0400 IronPort-SDR: D7FmQOSSR6hDgFfbXIWmF76t6Guqv5dKHOADRjV3cgUduVIInvJqu/fAqTx34c4KwtOTiRAceX Cn+Yuy/DlMLA== X-IronPort-AV: E=McAfee;i="6000,8403,9945"; a="189678685" X-IronPort-AV: E=Sophos;i="5.81,307,1610438400"; d="scan'208";a="189678685" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2021 11:06:18 -0700 IronPort-SDR: Wid4jYaT7iR6HusUhyJU8OHYpweLwxHkvGEIKF/czBO21TFa9pS7R7o0IijhvU/hbFOGZVgyF5 CHymeLuWBqvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,307,1610438400"; d="scan'208";a="448153126" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga002.fm.intel.com with ESMTP; 05 Apr 2021 11:06:18 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 5 Apr 2021 11:06:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 5 Apr 2021 11:06:17 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.109) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 5 Apr 2021 11:06:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ixW3BVbb7pWZA3y3UMbGaalN88sS0tD4ovb7w9KPo6xif45Z9seY7kn7idLfh0OBCrYQC8S+ObYEYEOIpY34bq+1ynqXteHERvbhemFlrVLogqKC5LuKoPLKtAuIhecnDXvk7gJsns8dGUj39y8boDvP1Ng0L92wE/FJLtmefJk85TH6wsOAmP0xJsu5zJxSWhnJUSb2xPFSPB5Bk/H2k133Q4AJU9mkZRoKqBSvhPq/33paDdrd47W+BqslLCtA+cgRDozVH6epqRZXzWJHZYEkRaBObAqYvHkcVDvrYG4p/96bLin/RdaQQXy0zUQrBSp7ixVFjUHvgcmOybrlkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gZxD7zKCAT195Qz69Etwna9smxfz8LfXOF1XyWDYbHI=; b=ltO0VI/uMFzCLqTP8/N19uJOWUPTmsEO6nhEiCYe6Px4sxwiDYSrXYbkfnFNhliBpL0cpLgpD+Gr6rhF4ebyTXxEj5jTIVeD9EkAUl8NEpELB+r1QtqW0PHgTYrID7TXvQMpXuXCf+vzVtkjsgCChXhGDpOzRtVUrseokTgTuVDhT6FkhWBz89V5NDynHduN73c8LFirmxEs+bo1cLFFISmzYXcbuUypygD4tcMFBRyT+I8IHwHpqupHe+rXWhJ8iwZg3Z85FJ4Ub/EpuPMWuLROymau1dXocT/WoS+bHu91ep8wLybg7E+okWC6gHvU85E/RPtDAgpQNCVTvGBHqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gZxD7zKCAT195Qz69Etwna9smxfz8LfXOF1XyWDYbHI=; b=rrgKZm26OsB82q1zFQ5rvvtvG21XclQjE11kiSq6LkbQTQFh12JUQ3NcmSDvZMbce/RuS8vwxr7joru65syx73UiSaPHjaqQlQN5CkPsxA4faSUyW21kT1n75TTizXHc2XlmqEcDc5UtJQYr4cRAfNe4hl1qVDYS0bmKdn9h1Rs= Received: from BYAPR11MB2870.namprd11.prod.outlook.com (2603:10b6:a02:cb::12) by SJ0PR11MB4989.namprd11.prod.outlook.com (2603:10b6:a03:2d9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.26; Mon, 5 Apr 2021 18:06:16 +0000 Received: from BYAPR11MB2870.namprd11.prod.outlook.com ([fe80::e9ed:af43:83bb:e111]) by BYAPR11MB2870.namprd11.prod.outlook.com ([fe80::e9ed:af43:83bb:e111%5]) with mapi id 15.20.3999.032; Mon, 5 Apr 2021 18:06:16 +0000 From: "Wong, Vee Khee" To: "Voon, Weifeng" , "David S . Miller" , Maxime Coquelin CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jose Abreu , Jakub Kicinski , Giuseppe Cavallaro , Alexandre Torgue , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "Ong, Boon Leong" Subject: RE: [PATCH net-next] net: intel: Enable SERDES PHY rx clk for PSE Thread-Topic: [PATCH net-next] net: intel: Enable SERDES PHY rx clk for PSE Thread-Index: AQHXKjl+rky0JfTKSkKXgsaYG/rI46qmN/cg Date: Mon, 5 Apr 2021 18:06:16 +0000 Message-ID: References: <20210405163357.30902-1-weifeng.voon@intel.com> In-Reply-To: <20210405163357.30902-1-weifeng.voon@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [218.111.199.186] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ed84d6be-37d7-455d-775f-08d8f85d81f2 x-ms-traffictypediagnostic: SJ0PR11MB4989: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:334; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /pBv9re0HLdDluenldANEbX03p0i6tHJ0i5ugkgtrPtezHfX9XTzaiF9rsK+MaKs8e9kp1WuffXIDLsqQcPSGgMiUtfIIDi69f0dAyAaSMXBF2pKqb3x8oPS0DjcdoR0SH7Ix6Q0Um2BC/WjOayTxNmvHu9SvtUQH2ApgKMQTvR1WkK1EB+vK75IuYGYeW8o9l+HETGPuZtlTd6uD3s97A/Npmu73YoJRNv0RNhAeR6b2Qg+PtnDeS+hxMKUJDPspdrm1NfZa8b/1IUpE+IFsF271m9TIj6p0B9ZkRlk6jlgUxYcQCCse0+mNqBPqf1r60TEtgriF1kn8HmzTJFBQBP/M+laKliPO9hUOgcGGDEBHOsm6SE6NyoGvN7OBRA652AsooJcVLpfcegtZaE/l1JtBoF7SFtqMbXCuIGQh0eReLCAVWNtwRiQ0YErrpY1yPwvoXurp3luDqyA9Y8VW+TaX01cyYF7psW4XIBi1uQ8ykJzb4sdjOXr8cIC/pBN/4VDHgRGwOIOvZLUZ5G5Qe2vR4l6N7ug26/uV8M9fhFzQ2c5VVfu1GwXJzxLN2M0A1n3jfS606ZneXj2Z0Znp2HzlI3v/UZpeeGKjWOPXKePys/I0eU/aF1GNBPWLFifG0Aol+v03dJqWNKQK7a/o2IuIhXSB15N+zZF+ToXTMA= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB2870.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(39860400002)(376002)(366004)(396003)(346002)(136003)(8676002)(5660300002)(8936002)(66476007)(110136005)(52536014)(316002)(55016002)(4326008)(86362001)(2906002)(9686003)(38100700001)(66446008)(66946007)(7416002)(76116006)(478600001)(186003)(33656002)(66556008)(71200400001)(26005)(107886003)(83380400001)(64756008)(7696005)(6506007)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?E92luENUnEVJZO8w39/38gH+0q+RuEKeeHTiBO2kvMKjZLoREEOC/s6szKTm?= =?us-ascii?Q?YmbDFhzTQ1hPU4n2WoyVobAzCWjTXEZFi/rUz1OcO3IMXQe0ToqefJs03Cdh?= =?us-ascii?Q?H/1pErxpOQlX+WOi+xQnvbiPgJkXFSKiOJmGdh5bG3nS5W0zg4i7uusSQ15x?= =?us-ascii?Q?x8mgFoXSN7go33MauRnNmK+GvsbMHzH9juSdZfXv6IWmIVQzx0i5gJeLoIl1?= =?us-ascii?Q?O36k8suUNf0kuGlYikrZfYDras1EdVhy+nJLk2w6pjCZKUrd39u9V7FiGEnw?= =?us-ascii?Q?oAd4dMrLT2Fg1gc+2IqJbQW4uu/QeZr4N3QviCtt2PhKNK50m2pqhSl6E2vf?= =?us-ascii?Q?8XIbGyixQUikuqFoy5fyPMvMl2kwyLbuOQ7nMVoKO7od8iJ5miRwREiFRPp1?= =?us-ascii?Q?D6zPuv72sHBvi1Iv0dVHs5x3CnXjQIFqgui2KYEhX7/XeX5SlKciaByM4Mc5?= =?us-ascii?Q?IXEyw2T9AH7CGdjxc9ApGPyVrqgDNn+YpujWqooFMlRWrMj6cepdEjd2SGEV?= =?us-ascii?Q?u36oog5jwsfQMyjBKHQOBQnH24DHsWXLJqtcb8oys/prN53NG73/M60dnCkp?= =?us-ascii?Q?a+gZb9YhYhTaoSShV6hlmgkSTvtd5yigmApXEXv8s+pWSY0pP6QsHbOEcHXO?= =?us-ascii?Q?XDnM22Q9Pg8DdxRdMF4GER63CGWqUZJ2YkDF4dl3iKZT5l1Z7+r7tLKGenLc?= =?us-ascii?Q?ZLKk9AKHAffWrQqyLnPmDCR3+Qcn4ar/avfluGtSpllV+RLY95M6DVC8cCUN?= =?us-ascii?Q?EmwsZusFThXV57l4EOOO6N4pzeKzfGYM4OOf1hVcTgqmm99U4Lsmsi0zCxCl?= =?us-ascii?Q?UZ0dcaw4Rr5OUzs5qOcjnmq5yxZ3KRYPJQK5zFouOXcfnFcLhgzwWAxUEgjx?= =?us-ascii?Q?8dfL+jPxU+unSdoTTaD9qcLz0EZ/v9zR4BF2RKYnk0J7r3XmrzrLbcMPrPoE?= =?us-ascii?Q?ojLKVWCwVjZ0Rd3BqbL9a5HeEH0GdqJyguKqFzo/ODKplVj6PLf6a36G0r4N?= =?us-ascii?Q?2otMWi9bhXhSRDoWC44/S6yvl4jQS5i/+SqXMxkFa7PJTqZ/CFTiA8awD6fj?= =?us-ascii?Q?ZU1h5gErXqfBqrtK9lYN63KzHTKDMP/UbGZ5pS1rHgV5O/ckZsYU4kzsqUE8?= =?us-ascii?Q?eduaKqj7QuLNcCNimMH1j2ePNVbGHvUQTpUAGYTf94o6Mg/nTYkidJBCaqB4?= =?us-ascii?Q?9SKoFMVBqd+u8ei0Sh2zcymEtLj6++VX97HzWF3s0t/4wMkMY16A8CcNzRbE?= =?us-ascii?Q?2t7oAbPDTvQYKDyW+Tq4of/KbDos15uQlu3TAfij2bMp7UGc579+7d0jYcAe?= =?us-ascii?Q?JYBZtm9WY3LCgUoPLfj8Hh3V?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2870.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed84d6be-37d7-455d-775f-08d8f85d81f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2021 18:06:16.7553 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rxDb8y6kv1m9hk2GueKo00nbzKl33s+TDEEr81QecKRSYFSoMs2I6TC41HKFqj4JtuyD/87LeY9O8+eqX9+MLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4989 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 06, 2021 at 12:33:57AM +0800, Voon Weifeng wrote:=20 > > EHL PSE SGMII mode requires to ungate the SERDES PHY rx clk for power up > sequence and vice versa. >=20 > Signed-off-by: Voon Weifeng > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 10 ++++++++++ > drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h | 1 + > 2 files changed, 11 insertions(+) >=20 Why not use "stmmac: intel" for the commit message header? > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > index add95e20548d..a4fec5fe0779 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > @@ -153,6 +153,11 @@ static int intel_serdes_powerup(struct net_device > *ndev, void *priv_data) > return data; > } >=20 > + /* PSE only - ungate SGMII PHY Rx Clock */ > + if (intel_priv->is_pse) > + mdiobus_modify(priv->mii, serdes_phy_addr, SERDES_GCR0, > + 0, SERDES_PHY_RX_CLK); > + > return 0; > } >=20 > @@ -168,6 +173,11 @@ static void intel_serdes_powerdown(struct > net_device *ndev, void *intel_data) >=20 > serdes_phy_addr =3D intel_priv->mdio_adhoc_addr; >=20 > + /* PSE only - gate SGMII PHY Rx Clock */ > + if (intel_priv->is_pse) > + mdiobus_modify(priv->mii, serdes_phy_addr, SERDES_GCR0, > + SERDES_PHY_RX_CLK, 0); > + > /* move power state to P3 */ > data =3D mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0); >=20 > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h > b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h > index e723096c0b15..542acb8ce467 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h > @@ -14,6 +14,7 @@ >=20 > /* SERDES defines */ > #define SERDES_PLL_CLK BIT(0) /* PLL clk valid signal > */ > +#define SERDES_PHY_RX_CLK BIT(1) /* PSE SGMII PHY rx clk */ > #define SERDES_RST BIT(2) /* Serdes Reset */ > #define SERDES_PWR_ST_MASK GENMASK(6, 4) /* Serdes Power > state*/ > #define SERDES_PWR_ST_SHIFT 4 > -- > 2.17.1