Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1776073ybb; Thu, 9 Apr 2020 08:49:27 -0700 (PDT) X-Google-Smtp-Source: APiQypI0tEVbcOJ1zNp1vX3AYvvXUVmWqTsulh+19hw6Q4AHof2+UEo6fXbp5mLwM29L+9IgkpPY X-Received: by 2002:a37:a915:: with SMTP id s21mr482332qke.436.1586447367711; Thu, 09 Apr 2020 08:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586447367; cv=none; d=google.com; s=arc-20160816; b=k1tEBaOHaBMQ3y/SyswCgJZxSrT/4Lu1rULqhZiAqP34+gQspKYGMboPsRwgjJmIAj zJejHxVxUJr4oVLWx13LL78C8w9bwxXG6xq5CCgEalp+vFach7zIjxdgxASrDef8vIlf agrTr/WtG1H+evWohwb9InXXWBWIAo83NBYwcyg+KyZQXtWQD3qZ97EuowR3M/bX0Pq7 3z5BIMMfIKeRhiEGXMGh0+OJsBfemmxs2doKRHf+kK5KVQdfghxE/+kEirAQ2m566dM5 XGHRjdVVrnWVVbd1bGiKPWeHb4NSOI/NkF3+210Syg9kpWqxjLd4cu5DyzfMhsSRK6N+ DGag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=QwFD0fIBcLVPbHE4fd1CiJyCMX0FyUJc4OJyxmBQa20=; b=in3qB9mj3rr2OXKz98JUXSCYJTrPAmeWzBO8dYpdVunj9jrH8xoQoWsfvxQEcb/VzA nAVuCb3IjEB1mYGkGftYIJSBh+dPkUuZeA84Bl1FYbdafDNbWnWgzJ7W5hsBQ8vcrIHi wC3JapyfA1qsoo7VylxPe4RUYewHg02OPPPYIXnuaQcwSZ3rdkor+qE9CFplbol0XMot KxI5fdyZU8QhYjlrANifMKVVSHTs5CKHTksObVJgGwY2S+7LTnHv8bqYNxaKGudxMvtn NUC18pGJQxGPLy9M1uWXv9M1ZbxzY4dTmxzV0dsTmC2y9/F1EqoVhUAz8frAix8eb5Rg CHSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id b70si2554233qkc.338.2020.04.09.08.49.11; Thu, 09 Apr 2020 08:49:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728306AbgDIPsc (ORCPT + 99 others); Thu, 9 Apr 2020 11:48:32 -0400 Received: from mga07.intel.com ([134.134.136.100]:53939 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727912AbgDIPsb (ORCPT ); Thu, 9 Apr 2020 11:48:31 -0400 IronPort-SDR: wF4/dJZxCXb53RPzecd/8EQi/Xs3jTnnth1yoyzlrFS4CtLhcNAdS8DvDXKfR5T9hJ3hQCo6XA R8Stlf8trwOA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2020 08:48:26 -0700 IronPort-SDR: MjIasUa9+1fKs3aAMLD6jReyrtKTSoH3j6Ba3NucOU5qu0QW7mhMVnQ9y57fEJvkekrEOsu12u E4mmP8Ud1YLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,363,1580803200"; d="scan'208";a="244349156" Received: from unknown (HELO climb.png.intel.com) ([10.221.118.165]) by fmsmga008.fm.intel.com with ESMTP; 09 Apr 2020 08:48:23 -0700 From: Voon Weifeng To: "David S . Miller" , Maxime Coquelin Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jose Abreu , Giuseppe Cavallaro , Andrew Lunn , Alexandre Torgue , Ong Boon Leong , Voon Weifeng Subject: [RFC,net-next,v2, 0/1] Enable SERDES power up/down Date: Thu, 9 Apr 2020 23:48:22 +0800 Message-Id: <20200409154823.26480-1-weifeng.voon@intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes from v1: 1.Only the configuration of the SERDES logic is kept, other SW acrh has changed. 2.Removed the proposed new files intel_serdes.c and intel_serdes.h and moved the SERDES configuration logic to dwmac-intel.c and dwmac_intel.h. 3.Added 2 BSP callbacks ->serdes_powerup() and ->serdes_powerup(). 4.The suggested 2 new BSP callbacks is called in stmmac_dvr_probe() and stmmac_dvr_remove(). This platform specific SERDES configuration not able separate 100% cleanly from the main dwmac logic because mdio communication is needed for configuring the SERDES power-up sequence. As for SERDES power-down sequence, it must be configured after all dma stop and before unregister the mdio bus. This implementation should have the least changes on the main dwmac logic but still serve the purpose for providing BSP callback for any platform that needs to configure SERDES. Voon Weifeng (1): net: stmmac: Enable SERDES power up/down sequence .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 171 ++++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 10 + include/linux/stmmac.h | 3 + 3 files changed, 184 insertions(+) -- 2.17.1