Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10361881rwd; Wed, 21 Jun 2023 21:55:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MHZAEtEiPviJEa8txiXaxNXr0/R0MpoCOI29BFgDtLZbufKPLtCvodDp3Vmr/rx9zlMFi X-Received: by 2002:a05:6830:4c4:b0:6b5:9826:4a53 with SMTP id s4-20020a05683004c400b006b598264a53mr6200229otd.1.1687409723764; Wed, 21 Jun 2023 21:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687409723; cv=none; d=google.com; s=arc-20160816; b=ECkI1/hFoGn0VKf/WMMk8l4kIFr9Drx4VkR30Qo3uqX5L/wYLVa2T1CsW3GIVP9jhF KMViqxKFdIlb6w2ZvdFZ/1zRyP9ync12KbsutTdUjB/76Zti1SQo7hgeZIdJWhYOS7gr O5oDE5kDMbNCwAYCoGl84tXQ0RwGFYGcp1ZBkTIP2HdJ7jT7VM99qe2OWZKy/m27gyUB 20jaJwTGD1qkMa6iS19v+3vphwBlT2cpD6MRX3brXubiFEBJtWXh1q4tCOJAQ1SjU6pp O8GR8ipEJKGiROxf4lYk+IdEYBdov1NtQTbnL6RrYLR7doxxMhsh198xm8Nil28YGFJK dc1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jn+jmtqDDKOjJ9LUSl3XA0826NLbtkDQHjb2NwOqX7U=; b=EgZCCVHUiMxDoLF0obJwO+ozKrbla+uTcIB7KpTjsfvGnTvT1+zsZMI2AU0GhzEcB9 AfB52sMTivEee17RbCwpE9UI5c+fgtAyt+QM/4gycv7N5rt61c05NOt9ZQP1Lt5tXRkR 5Y2Tt7yK7EQLRP/c0D58En0vl0p4OBs+bi56no+54OZpMD1+GZWIN++VHdX56+MbeNpC 96i+HsoTRBo66P/hoJbDHk+8UcbqAC892IAjqcVy7W+dIQeobJZwM/YK/UEel7UGfrcl qUlCfIPqCyJmnynpAWc0pCmwNLrZehgQ9n31evXrnAwN7VkPg+R7fyQx/gqNMHfRKp02 dcdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=nFK+k65L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a633c09000000b0054fb9698c4csi5725211pga.13.2023.06.21.21.55.11; Wed, 21 Jun 2023 21:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@intel.com header.s=Intel header.b=nFK+k65L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230445AbjFVEVA (ORCPT + 99 others); Thu, 22 Jun 2023 00:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230421AbjFVEUy (ORCPT ); Thu, 22 Jun 2023 00:20:54 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9CA1FDC; Wed, 21 Jun 2023 21:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687407644; x=1718943644; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kgwONFk1lwl7ii081p3KtM1n+Tt7MUV1m9jUzgpp3W0=; b=nFK+k65LQrjTs6rDNGudjvmx3/yjigNVbGxPLYt7sQAjOut845LHegmp XGZC0Pg915HiWBtQhVHuw1E62wTlPeRkdZl97ZCjpoNQGRhDkxzCA/NWs espjbaPJ4uZZjYBh5HG39GlxCtlt+ItGhXd9jYS8Ut2SjZTgxWj7Fs306 ETyP3N0T4P9ee2uBaO37gUjRupW/IxCC6nLDFWydz6F27SGmye2D3vhGU 4Pxg7iqI+nOm8Itfc669SiAev5GKHjHRv0U90aRCd3yjtFR4ShbLmoCkY UolVEAA4lsWOXigALB4MXXNq4LVrB9KO46yWNn366GNK5bxl/eztlfc0A Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="363812202" X-IronPort-AV: E=Sophos;i="6.00,262,1681196400"; d="scan'208";a="363812202" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2023 21:20:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10748"; a="744453877" X-IronPort-AV: E=Sophos;i="6.00,262,1681196400"; d="scan'208";a="744453877" Received: from yongliang-ubuntu20-ilbpg12.png.intel.com ([10.88.229.33]) by orsmga008.jf.intel.com with ESMTP; 21 Jun 2023 21:20:33 -0700 From: Choong Yong Liang To: Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Jean Delvare , Guenter Roeck , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Philipp Zabel , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Wong Vee Khee , Jon Hunter , Jesse Brandeburg , Revanth Kumar Uppala , Shenwei Wang , Andrey Konovalov , Jochen Henneberg Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Tan@vger.kernel.org, Tee Min , Michael Sit Wei Hong , Lai Peter Jun Ann Subject: [PATCH net-next 5/6] stmmac: intel: Separate driver_data of ADL-N from TGL Date: Thu, 22 Jun 2023 12:19:04 +0800 Message-Id: <20230622041905.629430-6-yong.liang.choong@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230622041905.629430-1-yong.liang.choong@linux.intel.com> References: <20230622041905.629430-1-yong.liang.choong@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Sit Wei Hong Separates the driver_data of ADL-N from TGL as a preparation to handle the differences. No functional changes in this commit. Signed-off-by: Michael Sit Wei Hong Signed-off-by: Choong Yong Liang --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 36c91dcb7a78..1ffa03451d26 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -962,6 +962,21 @@ static int adls_sgmii_phy1_data(struct pci_dev *pdev, static struct stmmac_pci_info adls_sgmii1g_phy1_info = { .setup = adls_sgmii_phy1_data, }; + +static int adln_sgmii_phy0_data(struct pci_dev *pdev, + struct plat_stmmacenet_data *plat) +{ + plat->bus_id = 1; + plat->phy_interface = PHY_INTERFACE_MODE_SGMII; + plat->serdes_powerup = intel_serdes_powerup; + plat->serdes_powerdown = intel_serdes_powerdown; + return tgl_common_data(pdev, plat); +} + +static struct stmmac_pci_info adln_sgmii1g_phy0_info = { + .setup = adln_sgmii_phy0_data, +}; + static const struct stmmac_pci_func_data galileo_stmmac_func_data[] = { { .func = 6, @@ -1344,7 +1359,7 @@ static const struct pci_device_id intel_eth_pci_id_table[] = { { PCI_DEVICE_DATA(INTEL, TGLH_SGMII1G_1, &tgl_sgmii1g_phy1_info) }, { PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_0, &adls_sgmii1g_phy0_info) }, { PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_1, &adls_sgmii1g_phy1_info) }, - { PCI_DEVICE_DATA(INTEL, ADLN_SGMII1G, &tgl_sgmii1g_phy0_info) }, + { PCI_DEVICE_DATA(INTEL, ADLN_SGMII1G, &adln_sgmii1g_phy0_info) }, { PCI_DEVICE_DATA(INTEL, RPLP_SGMII1G, &tgl_sgmii1g_phy0_info) }, {} }; -- 2.25.1