Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1134524pxb; Fri, 6 Nov 2020 01:43:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5ZaGo53R0sBfKmVntmbzWVkwFaKbpMUkoWqsZmmAqRAsIzSOBw5PZLSXxcNAvvENI8qD6 X-Received: by 2002:a17:906:a098:: with SMTP id q24mr1125377ejy.191.1604655792821; Fri, 06 Nov 2020 01:43:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604655792; cv=none; d=google.com; s=arc-20160816; b=RjbnjYYjulBXIfs70S9WT+idV1zumfYsQrxuVf9vsr4n00wQpZ8Wm8PoJvNEN29dV1 HXdAJEgvtA8yCg3+a7+0mK/w8JPVlGzmERuCINWa8eysnz2/gmt+yu/aMF4xNWH1edOS hFU8HWYoYSGOA3O5SuA0LspsPL9vizQvZCU2iz5ZwVZ/mrfkZxlS01UFFHXNO7IGCjwx J7bZV1lxdGYc9lkJ68GYfHwEdgWPUFgDcXK7WTDw8ZA1mrKZYLMuBrCOpO2EsNlHGNYj QNe8WCQVbuHMLZOlETkmgLotmw11sIQ00qYuvHt04vVTFxkvPuq9me7ctRLwIXmhe3Q9 jj/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=RG4tqxoll3nl7nfeXcRvY4IEaYhbm+bHwuAX+1gHgiA=; b=ptXUMmtk8wqiBa8cw8l9tiFsT9fMME216k0lbP05kH5DzLvyd6rqTCXp1jWYRAwxha shDlG45D8hNQTvVZVHpPbRyvu2CNaKt1bXxjGbcFnGz+gvOalOyevqbJ5ROtu1ovTQ17 Gl8vBdOD2pNr7h55dppjVWtPQGtix2H/38rN23HWU1TN2Tlikw1nx4byBleuptOwXeoD +DFp5ZLzj4zrE0cE0XaIWB7OJ83GofbaBNDkjD1r6MGnoBPYcZ1milMa9WWeXKPK9WHp HK4Gfpfel+4QgUSD2RuALPvSEf1fRynR+WkucazRL0bDS6tS6vKpS6PD+M8iwaD1vkGT db6A== ARC-Authentication-Results: i=1; mx.google.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 t10si447504eju.536.2020.11.06.01.42.49; Fri, 06 Nov 2020 01:43:12 -0800 (PST) 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; 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 S1726781AbgKFJks (ORCPT + 99 others); Fri, 6 Nov 2020 04:40:48 -0500 Received: from mga05.intel.com ([192.55.52.43]:32829 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgKFJks (ORCPT ); Fri, 6 Nov 2020 04:40:48 -0500 IronPort-SDR: TWoiwc2yCoJo7ECPGeewuJw/3Os4doTgKcfjPN/ZUzsZ08tcf12I4fbvSZS2RXDZasBXBIwaPF 5zVzQn6cwT/w== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="254230709" X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="254230709" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 01:40:47 -0800 IronPort-SDR: mFsLs/WbQF0CrQWu6INR/ALjXHhz2xqtBvAnYtd2IXKMvL88+duqxlA3zlLJNq3J+CTwO40l8W GFvX9a6FlZlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="354673376" Received: from glass.png.intel.com ([172.30.181.98]) by fmsmga004.fm.intel.com with ESMTP; 06 Nov 2020 01:40:43 -0800 From: Wong Vee Khee To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong , Voon Wei Feng , Wong Vee Khee Subject: [PATCH net-next 1/1] stmmac: intel: change all EHL/TGL to auto detect phy addr Date: Fri, 6 Nov 2020 17:43:41 +0800 Message-Id: <20201106094341.4241-1-vee.khee.wong@intel.com> X-Mailer: git-send-email 2.17.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Voon Weifeng Set all EHL/TGL phy_addr to -1 so that the driver will automatically detect it at run-time by probing all the possible 32 addresses. Signed-off-by: Voon Weifeng Signed-off-by: Wong Vee Khee --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index b6e5e3e36b63..7c1353f37247 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -236,6 +236,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, int ret; int i; + plat->phy_addr = -1; plat->clk_csr = 5; plat->has_gmac = 0; plat->has_gmac4 = 1; @@ -345,7 +346,6 @@ static int ehl_sgmii_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { plat->bus_id = 1; - plat->phy_addr = 0; plat->phy_interface = PHY_INTERFACE_MODE_SGMII; plat->serdes_powerup = intel_serdes_powerup; @@ -362,7 +362,6 @@ static int ehl_rgmii_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { plat->bus_id = 1; - plat->phy_addr = 0; plat->phy_interface = PHY_INTERFACE_MODE_RGMII; return ehl_common_data(pdev, plat); @@ -376,7 +375,6 @@ static int ehl_pse0_common_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { plat->bus_id = 2; - plat->phy_addr = 1; return ehl_common_data(pdev, plat); } @@ -408,7 +406,6 @@ static int ehl_pse1_common_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { plat->bus_id = 3; - plat->phy_addr = 1; return ehl_common_data(pdev, plat); } @@ -450,7 +447,6 @@ static int tgl_sgmii_data(struct pci_dev *pdev, struct plat_stmmacenet_data *plat) { plat->bus_id = 1; - plat->phy_addr = 0; plat->phy_interface = PHY_INTERFACE_MODE_SGMII; plat->serdes_powerup = intel_serdes_powerup; plat->serdes_powerdown = intel_serdes_powerdown; -- 2.17.0