From patchwork Thu Jun 22 04:19:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Choong Yong Liang X-Patchwork-Id: 111438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4823875vqr; Wed, 21 Jun 2023 21:49:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Se8zHHnl3SsOOM8Y9Q88McprEufGSPe7d8NKiEWjdft6DU7kmhuh/URN4193dVnOcjUV0 X-Received: by 2002:ad4:5f05:0:b0:626:29db:7fe5 with SMTP id fo5-20020ad45f05000000b0062629db7fe5mr22720789qvb.60.1687409363100; Wed, 21 Jun 2023 21:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687409363; cv=none; d=google.com; s=arc-20160816; b=K2XoEP9vfufpCOcUAEztOsAqd/QlXHAOvj//F93buTaXvEuzf9zzLlIRQ7rlB7b16O sVSc9Hk+7Gtz9UAgGvLi+gKfGV3NuCasNOpjS+/xyn2g2WJ4qZjssB0a5ZAEObKjt7gU ueHYkRkvNk1qDO7q4rPyvk/pk4CPIqm6Ucg6bHAya/GjzPV2+OTK3KUL50Ajmz18nXJD a9eWelZ953f9RqFdLoiMcUnr/OhPpJ8O3ZR8XCm6FIgyNjGELjHYjA64hIUIK9l9Pje3 j8US+Ygvu1YQEaPjkiIC9zkL7vsk96vWJ7SDMTlFcNRXr1JWO0/TIEdcem6YO58SiZb2 lRBA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g28-20020aa79f1c000000b0065bbe39e1b3si1896236pfr.146.2023.06.21.21.49.05; Wed, 21 Jun 2023 21:49:22 -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 S230456AbjFVEVC (ORCPT + 99 others); Thu, 22 Jun 2023 00:21:02 -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_Beh=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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769376960249578854?= X-GMAIL-MSGID: =?utf-8?q?1769376960249578854?= 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) }, {} };