From patchwork Mon Jun 21 17:30:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12335321 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33BB9C48BE5 for ; Mon, 21 Jun 2021 17:31:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0FC8961107 for ; Mon, 21 Jun 2021 17:31:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbhFURdc (ORCPT ); Mon, 21 Jun 2021 13:33:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231432AbhFURd2 (ORCPT ); Mon, 21 Jun 2021 13:33:28 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7128C061574 for ; Mon, 21 Jun 2021 10:31:13 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id m21so31472455lfg.13 for ; Mon, 21 Jun 2021 10:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qc7XMJSCEk0yw0FDTagps7kkRL+MmOfndFLGM8KO6hA=; b=bSRZALZ2YuEMo00vAXwANz3eqvyOTtEzGN39+ZqNKh4HVWmIbeY5zpeLUYpXimODlL UOdba/ohNovpdlP2Gi8cToziF+jWG/7h6PDAsPWPhUZ3Yh4PPlevZ1htkJ27hmrXqqf3 egWIfzWeuug4Vj0gdt3Kcvkhz3VlJjuW5SapnzhTN3oX98S+cIwEhjGvaq4VySKmwW+n UHDA9fQdVOTbGcwvpXnc+vzE0Yhf3JN5vascvnqiua7siO7pCElIRnINY0joOgsSZz7j 4du54n2gMzal2UcQZq5ECECUhq2B9qRmITTDQqKViXttXn73lrKbgn6LqVfc+cR8AeUq iNwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qc7XMJSCEk0yw0FDTagps7kkRL+MmOfndFLGM8KO6hA=; b=sUQ27k971kmI4bLj3A6VIxDvGCxKc5wwsW40JThA9ha7yCQ8fEQJDjaZfDOdYysqh2 MNXMpTAsmKbDvo/Hk5jnNipREB/P+lTpzuz3vn9Rwpj8pd0LnTx9/Mu/DQGwlQKAXpV5 7++AFmIq6b07ef69iNrvDhYHJUNPzGeMDm3QTGU6t8VeMKZbkOwtc2MH5nLjQEVFPu26 TQGwLCzIAy6yOC5BnHZwQgUhENAmyGVnArQsGF2MRtjd3nRGCFlwFiaOQpLFYFeSKOjD v7/XeBCl6KzvciX7P+O4kDnlV/ATxIAnOhahArbYc8WOKCY5bl+XQOPFKrb6+tSLqL2h WDhw== X-Gm-Message-State: AOAM533TitUqKHkggGK1NseMn2CXFSaES9kqSfk0bzZnLw781WpLZQJJ NYcTsMehTTpgdQfGyHLdkqGE9w== X-Google-Smtp-Source: ABdhPJxB08aNU1e3BQjbGaxHU2kJwPo/Sl5zRiBE+PXfnI5WOmB/eoR22Q27TpE4iT6xhTIb/lOIAQ== X-Received: by 2002:a05:6512:31cc:: with SMTP id j12mr15292327lfe.158.1624296672013; Mon, 21 Jun 2021 10:31:12 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id u11sm1926380lfs.257.2021.06.21.10.31.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:31:11 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com, rjw@rjwysocki.net, lenb@kernel.org, Marcin Wojtas Subject: [net-next: PATCH v3 1/6] Documentation: ACPI: DSD: describe additional MAC configuration Date: Mon, 21 Jun 2021 19:30:23 +0200 Message-Id: <20210621173028.3541424-2-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com> References: <20210621173028.3541424-1-mw@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Document additional MAC configuration modes which can be processed by the existing fwnode_ phylink helpers: * "managed" standard ACPI _DSD property [1] * "fixed-link" data-only subnode linked in the _DSD package via generic mechanism of the hierarchical data extension [2] [1] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf [2] https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.pdf Signed-off-by: Marcin Wojtas --- Documentation/firmware-guide/acpi/dsd/phy.rst | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/Documentation/firmware-guide/acpi/dsd/phy.rst b/Documentation/firmware-guide/acpi/dsd/phy.rst index 0d49bad2ea9c..680ad179e5f9 100644 --- a/Documentation/firmware-guide/acpi/dsd/phy.rst +++ b/Documentation/firmware-guide/acpi/dsd/phy.rst @@ -50,6 +50,21 @@ phy-mode The "phy-mode" _DSD property is used to describe the connection to the PHY. The valid values for "phy-mode" are defined in [4]. +managed +------- +Optional property, which specifies the PHY management type. +The valid values for "managed" are defined in [4]. + +fixed-link +---------- +The "fixed-link" is described by a data-only subnode of the +MAC port, which is linked in the _DSD package via +hierarchical data extension (UUID dbb8e3e6-5886-4ba6-8795-1319f52a966b +in accordance with [5] "_DSD Implementation Guide" document). +The subnode should comprise a required property ("speed") and +possibly the optional ones - complete list of parameters and +their values are specified in [4]. + The following ASL example illustrates the usage of these properties. DSDT entry for MDIO node @@ -128,6 +143,48 @@ phy-mode and phy-handle are used as explained earlier. }) } +MAC node example where "managed" property is specified. +------------------------------------------------------- + +.. code-block:: none + + Scope(\_SB.PP21.ETH0) + { + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"phy-mode", "sgmii"}, + Package () {"managed", "in-band-status"} + } + }) + } + +MAC node example with a "fixed-link" subnode. +--------------------------------------------- + +.. code-block:: none + + Scope(\_SB.PP21.ETH1) + { + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"phy-mode", "sgmii"}, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), + Package () { + Package () {"fixed-link", "LNK0"} + } + }) + Name (LNK0, Package(){ // Data-only subnode of port + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"speed", 1000}, + Package () {"full-duplex", 1} + } + }) + } + References ========== @@ -138,3 +195,5 @@ References [3] Documentation/firmware-guide/acpi/DSD-properties-rules.rst [4] Documentation/devicetree/bindings/net/ethernet-controller.yaml + +[5] https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.pdf From patchwork Mon Jun 21 17:30:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12335323 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CBF8C48BE5 for ; Mon, 21 Jun 2021 17:31:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6910B6128C for ; Mon, 21 Jun 2021 17:31:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231659AbhFURdg (ORCPT ); Mon, 21 Jun 2021 13:33:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231549AbhFURda (ORCPT ); Mon, 21 Jun 2021 13:33:30 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDDE3C061756 for ; Mon, 21 Jun 2021 10:31:14 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id u13so12189005lfk.2 for ; Mon, 21 Jun 2021 10:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7WvcmjpDE06toGMKX+zkAYwYDdzPn5oW9s8HRQs3izM=; b=d8vh39N35Xd+//mob2LNSri4E6mTL19ceEvR0Ja7CJ06X/5iVoP6ktLh8u9X7pRrKU Gy5dcTZKZAVY9sGOaM/iOvK1RiVEQ4q/9+TfAiXMaAerLrIvNN7XiiZgBUBvPEFx45Lv xSIYmOsul0/nFNqao9KX/LhZWMZFFp2ifXn2Et6zb79eLdGPckwVN+EA/vYtAAlo18mz EGMguggW0LWTW2Vc0do1PU5XgwbuPzMD88cTfL1qKe2UwMW95Q8M3SwT6/wl2mZNL7cg X0CXHM543yM787B8qMFKjA9JOPAtukqFAzb4xidyMHiUSqN81M3Ak5tI+r/uPjAYNKhY Qnug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7WvcmjpDE06toGMKX+zkAYwYDdzPn5oW9s8HRQs3izM=; b=RgaBNOgoW8/ThyBSj4KNjdm2GAjcjLpHw9WumtQhD+H2ii+9l/Im1oRiyJkNfbJWxp qN+f/hSZZ/DA0xuZzWQbVf6jNDBts6JlVSR2XBxtkwH6Pp5B9OrDPFecT196pcUaOrQM 2ixPN77wX3Fsf5dzTXCIN4liGwWDNOrMbFqU+ZV6F7ljFAdN8x4qxUS9qzm2MKAfHijt TW5W4+QgF4LkXU9qSFXc06kJC6MrmW4//VwrOqXCyJhDlvPFazkf/DASao0/IR2Lv/6w vo311ePIq18/Ze0I3oskP2S7dLApc5rrE+wufRNQ9lwejnqypjC4arz+rZPywdjydnpm q1YA== X-Gm-Message-State: AOAM532UEFps/q1eDWEtreOPO4BKWXDGmpqtq4YdK7GKkEfyVZ4hjKtT 8nDxFd0yo9r4ugiIiFlRF0fIKw== X-Google-Smtp-Source: ABdhPJydDuW3AiIFeVeMNwbF8EeqbIscjb6gfI6NA8Q4YopZOgj273y4uUemXN1TY84FSoprQbpAnQ== X-Received: by 2002:ac2:4c83:: with SMTP id d3mr14981121lfl.543.1624296673089; Mon, 21 Jun 2021 10:31:13 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id u11sm1926380lfs.257.2021.06.21.10.31.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:31:12 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com, rjw@rjwysocki.net, lenb@kernel.org, Marcin Wojtas Subject: [net-next: PATCH v3 2/6] net: mdiobus: Introduce fwnode_mdbiobus_register() Date: Mon, 21 Jun 2021 19:30:24 +0200 Message-Id: <20210621173028.3541424-3-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com> References: <20210621173028.3541424-1-mw@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This patch introduces a new helper function that wraps acpi_/of_ mdiobus_register() and allows its usage via common fwnode_ interface. Fall back to raw mdiobus_register() in case CONFIG_FWNODE_MDIO is not enabled, in order to satisfy compatibility in all future user drivers. Signed-off-by: Marcin Wojtas Reviewed-by: Andrew Lunn --- include/linux/fwnode_mdio.h | 12 +++++++++++ drivers/net/mdio/fwnode_mdio.c | 22 ++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/linux/fwnode_mdio.h b/include/linux/fwnode_mdio.h index faf603c48c86..13d4ae8fee0a 100644 --- a/include/linux/fwnode_mdio.h +++ b/include/linux/fwnode_mdio.h @@ -16,6 +16,7 @@ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, int fwnode_mdiobus_register_phy(struct mii_bus *bus, struct fwnode_handle *child, u32 addr); +int fwnode_mdiobus_register(struct mii_bus *bus, struct fwnode_handle *fwnode); #else /* CONFIG_FWNODE_MDIO */ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, @@ -30,6 +31,17 @@ static inline int fwnode_mdiobus_register_phy(struct mii_bus *bus, { return -EINVAL; } + +static inline int fwnode_mdiobus_register(struct mii_bus *bus, + struct fwnode_handle *fwnode) +{ + /* + * Fall back to mdiobus_register() function to register a bus. + * This way, we don't have to keep compat bits around in drivers. + */ + + return mdiobus_register(mdio); +} #endif #endif /* __LINUX_FWNODE_MDIO_H */ diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c index 1becb1a731f6..ae0bf71a9932 100644 --- a/drivers/net/mdio/fwnode_mdio.c +++ b/drivers/net/mdio/fwnode_mdio.c @@ -7,8 +7,10 @@ */ #include +#include #include #include +#include #include MODULE_AUTHOR("Calvin Johnson "); @@ -142,3 +144,23 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus, return 0; } EXPORT_SYMBOL(fwnode_mdiobus_register_phy); + +/** + * fwnode_mdiobus_register - bring up all the PHYs on a given MDIO bus and + * attach them to it. + * @bus: Target MDIO bus. + * @fwnode: Pointer to fwnode of the MDIO controller. + * + * Return values are determined accordingly to acpi_/of_ mdiobus_register() + * operation. + */ +int fwnode_mdiobus_register(struct mii_bus *bus, struct fwnode_handle *fwnode) +{ + if (is_acpi_node(fwnode)) + return acpi_mdiobus_register(bus, fwnode); + else if (is_of_node(fwnode)) + return of_mdiobus_register(bus, to_of_node(fwnode)); + else + return -EINVAL; +} +EXPORT_SYMBOL(fwnode_mdiobus_register); From patchwork Mon Jun 21 17:30:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12335325 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80B3DC48BC2 for ; Mon, 21 Jun 2021 17:31:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63E266113E for ; Mon, 21 Jun 2021 17:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231437AbhFURdj (ORCPT ); Mon, 21 Jun 2021 13:33:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231432AbhFURde (ORCPT ); Mon, 21 Jun 2021 13:33:34 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC73C061787 for ; Mon, 21 Jun 2021 10:31:17 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id p7so31340525lfg.4 for ; Mon, 21 Jun 2021 10:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nNpW+sLWCmrbUh1r/DSV8Y7jUML0YXJCEAVWQZMs+PY=; b=WMeAwcgKrWkfyW/M19Kl6IEgSno6E56auNOFqg5/IEkeSNsSZwAu6+3YK3ehCZdnwu NfRa+mJ2m/8SnC4B5yF7Rh+2uvMThmBj1ExsrzTu0oUIyxM8xcwVzkifmyzO4moc4fBE Z0UQ1X6bilkW11743K8VP5nUxBKqFTS0ukAnvYRVLHimwFAuIKM3Vb4r+wepVDsSlP2D kRc5GGez9jJ9Ww36a1jJg/3qRd9rLnnVcMYtTSuLASWnM+Kf/momVz2wXHY8il6xcrvn KZ7UUHT8//N43PlxaG01Ek3Dj8Hmw8k9H+MQXg0CNU1jxjv3MyqDuWN5QqKfy4neTpQm ftfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nNpW+sLWCmrbUh1r/DSV8Y7jUML0YXJCEAVWQZMs+PY=; b=aVl5eo+SULwtpUcYYJ/Fwy8+vDobVVNayir12ZjVMfoT8ztcrVcY4glEYGKFEzQ9BS bANw3kdFDu0eHcoVXjCT1vNVTue5oPdO/4dr3t9FGCwmUjYoC/Z290J/UqDxQerIHWlk cePo1GWFRao+ccuU3SH3U9ALPdSoijGy6q6rVXvbdJzFsVVKs+HkbQR/bMgZvxk0AI6/ 99kSCylfIpA08pPPUkyFz4FAZOxEr0SebT6xOiNxznyS12XwaX9bAwFS8fblBC/8wuYH t0Q7EuUQD4wVOUXaType9a4RAPq0aS/NQjBuiWH9IfoGEug3Z4FyuRSp47HW8xS6EAv1 Kelw== X-Gm-Message-State: AOAM532jgr+nTiMp+DT6QoIWDbjSuDNhek8FU7NVicDg+gvQ0f35dEGA gH8hw7nv6vBa2+x7gJRLhF7EfA== X-Google-Smtp-Source: ABdhPJz1hoTxm5sH6sxaZYFo4H8a1qR8SYrT7Bc5r7ocPtv7T7s8KW77JJHgMmWv26cK8kZPBgMseA== X-Received: by 2002:a05:6512:3e28:: with SMTP id i40mr3036126lfv.417.1624296674179; Mon, 21 Jun 2021 10:31:14 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id u11sm1926380lfs.257.2021.06.21.10.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:31:13 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com, rjw@rjwysocki.net, lenb@kernel.org, Marcin Wojtas Subject: [net-next: PATCH v3 3/6] net/fsl: switch to fwnode_mdiobus_register Date: Mon, 21 Jun 2021 19:30:25 +0200 Message-Id: <20210621173028.3541424-4-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com> References: <20210621173028.3541424-1-mw@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Utilize the newly added helper routine for registering the MDIO bus via fwnode_ interface. Signed-off-by: Marcin Wojtas Reviewed-by: Andrew Lunn --- drivers/net/ethernet/freescale/xgmac_mdio.c | 11 ++--------- drivers/net/ethernet/freescale/Kconfig | 4 +--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index 0b68852379da..2d99edc8a647 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -13,7 +13,7 @@ */ #include -#include +#include #include #include #include @@ -246,7 +246,6 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum) static int xgmac_mdio_probe(struct platform_device *pdev) { - struct fwnode_handle *fwnode; struct mdio_fsl_priv *priv; struct resource *res; struct mii_bus *bus; @@ -291,13 +290,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev) priv->has_a011043 = device_property_read_bool(&pdev->dev, "fsl,erratum-a011043"); - fwnode = pdev->dev.fwnode; - if (is_of_node(fwnode)) - ret = of_mdiobus_register(bus, to_of_node(fwnode)); - else if (is_acpi_node(fwnode)) - ret = acpi_mdiobus_register(bus, fwnode); - else - ret = -EINVAL; + ret = fwnode_mdiobus_register(bus, pdev->dev.fwnode); if (ret) { dev_err(&pdev->dev, "cannot register MDIO bus\n"); goto err_registration; diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig index 2d1abdd58fab..92a390576b88 100644 --- a/drivers/net/ethernet/freescale/Kconfig +++ b/drivers/net/ethernet/freescale/Kconfig @@ -67,9 +67,7 @@ config FSL_PQ_MDIO config FSL_XGMAC_MDIO tristate "Freescale XGMAC MDIO" - select PHYLIB - depends on OF - select OF_MDIO + depends on FWNODE_MDIO help This driver supports the MDIO bus on the Fman 10G Ethernet MACs, and on the FMan mEMAC (which supports both Clauses 22 and 45) From patchwork Mon Jun 21 17:30:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12335327 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E007CC4743C for ; Mon, 21 Jun 2021 17:31:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C409261107 for ; Mon, 21 Jun 2021 17:31:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231743AbhFURdm (ORCPT ); Mon, 21 Jun 2021 13:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbhFURdd (ORCPT ); Mon, 21 Jun 2021 13:33:33 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAD28C061767 for ; Mon, 21 Jun 2021 10:31:16 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id c11so26349199ljd.6 for ; Mon, 21 Jun 2021 10:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=js0VSMNft3m2F3NvErhrcAzo8IyEJqd6W2qFnUrJj00=; b=pCloMxiIg0NWb0C1zrjiBE1LiiCv09ojJn/HOOJOiZkawQKf/WmtOgFHWSYmmIA0Aj RM2qIVF1wsG13AZXyoEn4LwKj6eo+FOkh45kN6VjdW58wKzvQ42PYtIKoKp0Uj3cT1yg 8BxrQlOAk1DIPJ15+vFD8e0SHLRSd8hthoXED8hPwriXybsc6c2pvw/HD9MQhRiahM2X eSlKPL4vacVwzvElqY0aFUlwrkD/5XNp7YQT9CIhB1lGUfckhJnM3dstI6Yd3XQWcD7X 4qK2rxWCG3sIz92oQ5c1BfRUqAtAUjPVBy4TCQk1lJnEGgR0djlBPx80sUHWTzMLb8D9 tttA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=js0VSMNft3m2F3NvErhrcAzo8IyEJqd6W2qFnUrJj00=; b=LPQeDMojYWbGsSGJARbIJalBJBSSu2o4Rb482/dz2rk7iVK4QIzBBZBtwB8tRvx/8q /KHOoQQx/b2/gLJV0hqq8HN+6XW/tEvZWvj5phwVGM1lhTIIcvSY2nSzMb9kr/UJCtK4 XW4r0m8rPsNiQ77PUr4332L+iXDJlm2+aFDl4uX8sP+/ixxC8a8UFsQQTsJPhDzhW0Ka 5oOAWM6oPlCQv+zV5ALmYQg9sejQEatEhmirNG9xxTOtPCkEbnYlmBaVKHVblWTaawyl tHnCxMrIf0llm77k2iDdU9K5xCjXj44wgBDu85+sJP49tNhUlb8kx+4sXOu0CyYs3SM8 dLIg== X-Gm-Message-State: AOAM5339mjd+g5ghZrWE4TNaeCDerm3gyO0Tf52T5WOeHwXpsCENE6Yz yZvryANleBCIsGQzBk5zVGhIhQ== X-Google-Smtp-Source: ABdhPJxVzKe5f/YQcsgpwlTBWd5573FWC2bobSJn98GiNw1b9l8G313qRpE6tGyFo8raAT7obY2qOw== X-Received: by 2002:a2e:8097:: with SMTP id i23mr22400714ljg.182.1624296675259; Mon, 21 Jun 2021 10:31:15 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id u11sm1926380lfs.257.2021.06.21.10.31.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:31:14 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com, rjw@rjwysocki.net, lenb@kernel.org, Marcin Wojtas Subject: [net-next: PATCH v3 4/6] net: mvmdio: add ACPI support Date: Mon, 21 Jun 2021 19:30:26 +0200 Message-Id: <20210621173028.3541424-5-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com> References: <20210621173028.3541424-1-mw@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This patch introducing ACPI support for the mvmdio driver by adding acpi_match_table with two entries: * "MRVL0100" for the SMI operation * "MRVL0101" for the XSMI mode Signed-off-by: Marcin Wojtas --- drivers/net/ethernet/marvell/mvmdio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index d14762d93640..7537ee3f6622 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -17,8 +17,10 @@ * warranty of any kind, whether express or implied. */ +#include #include #include +#include #include #include #include @@ -281,7 +283,7 @@ static int orion_mdio_probe(struct platform_device *pdev) struct orion_mdio_dev *dev; int i, ret; - type = (enum orion_mdio_bus_type)of_device_get_match_data(&pdev->dev); + type = (enum orion_mdio_bus_type)device_get_match_data(&pdev->dev); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!r) { @@ -369,7 +371,7 @@ static int orion_mdio_probe(struct platform_device *pdev) goto out_mdio; } - ret = of_mdiobus_register(bus, pdev->dev.of_node); + ret = fwnode_mdiobus_register(bus, pdev->dev.fwnode); if (ret < 0) { dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret); goto out_mdio; @@ -421,12 +423,20 @@ static const struct of_device_id orion_mdio_match[] = { }; MODULE_DEVICE_TABLE(of, orion_mdio_match); +static const struct acpi_device_id orion_mdio_acpi_match[] = { + { "MRVL0100", BUS_TYPE_SMI }, + { "MRVL0101", BUS_TYPE_XSMI }, + { }, +}; +MODULE_DEVICE_TABLE(acpi, orion_mdio_acpi_match); + static struct platform_driver orion_mdio_driver = { .probe = orion_mdio_probe, .remove = orion_mdio_remove, .driver = { .name = "orion-mdio", .of_match_table = orion_mdio_match, + .acpi_match_table = ACPI_PTR(orion_mdio_acpi_match), }, }; From patchwork Mon Jun 21 17:30:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12335331 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79165C48BC2 for ; Mon, 21 Jun 2021 17:31:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66B016113E for ; Mon, 21 Jun 2021 17:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231854AbhFURdu (ORCPT ); Mon, 21 Jun 2021 13:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbhFURdi (ORCPT ); Mon, 21 Jun 2021 13:33:38 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39817C0617AE for ; Mon, 21 Jun 2021 10:31:18 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id u11so15401078ljh.2 for ; Mon, 21 Jun 2021 10:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bJlskXXqPukoUIiMaWjgnuEmfc7b1Qye4aSSYHDeJ90=; b=YC+v2VFSlEj714Fipr+X5uKqGdyPOi0fZRjQqg66R6KKAg8Uo5T40tWRGiB2MRbsLJ YhWQdupK4lXKB+ixP2oNXdfPhwOqLLgRyr7EJs9xXpxDYkeUzROoI/VXf/5tbYjuDQM4 0/g++YC3yKdJbNwDJROq5/H8+tf1OyHf0ZER2ZrR9OE9iA06CWnM8c0gKLPQfMHOp8Ys Y2AHTUWnw3dKAfqfFADjQD8oyTg0vl+aKDETGNvjxRlbt1C24aPPE53KUhmYARbZEIo5 me1h5U+cZOc2HFPgwhMQm/7fRjRM4J6BNJF8GdRW35MYUpmEnerbG5w49OKaz5WMy7T1 UcyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bJlskXXqPukoUIiMaWjgnuEmfc7b1Qye4aSSYHDeJ90=; b=Kj8v0RTQYjSSh6NLwzCS8HopcFMWNFLQsHUTVJE4tX5Xn6ab9a7vZJ6ejlCAUz2ciy eZ1UERMJDa0Egho4O8LgUYWy8p8fg8G2OBZPlFE2k46NU0R+STSzeISNe0Fo5h8V7W7u TXLQ5pvxTio/aR8ari+dChETqZFvoFHFvH3nBpS1iIv2ZMaRRXUCpCi/IgjuiNI59Kls SjenvB/vrrqumgZ4MDGjbMiFIuKze3WrCgKcyucZEPG+ed0MvfCl6WZ84r7zGHbagrpR W0Zk+ROz9bYW7XOiDnrKAs4s87DLDmA3fIFoKuSnKT0GrT2VDEWFdZtrSirNeavGBLAC buuA== X-Gm-Message-State: AOAM532nSr5MTjhuIfK6vUpCHf5glkMzcmkHF/b84UxYj6GN8MKgtS1B EobaDKa5dzQu4VEDnUyI1INeew== X-Google-Smtp-Source: ABdhPJwh/jpROltqTQn9Q+zie8Ck/NJNxGVWm47H6XdT5P2r+bkSKZ6WmxdaMC1PibH6CfqUQq5BJA== X-Received: by 2002:a2e:87d6:: with SMTP id v22mr23205134ljj.50.1624296676473; Mon, 21 Jun 2021 10:31:16 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id u11sm1926380lfs.257.2021.06.21.10.31.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:31:15 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com, rjw@rjwysocki.net, lenb@kernel.org, Marcin Wojtas Subject: [net-next: PATCH v3 5/6] net: mvpp2: enable using phylink with ACPI Date: Mon, 21 Jun 2021 19:30:27 +0200 Message-Id: <20210621173028.3541424-6-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com> References: <20210621173028.3541424-1-mw@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Now that the MDIO and phylink are supported in the ACPI world, enable to use them in the mvpp2 driver. Ensure a backward compatibility with the firmware whose ACPI description does not contain the necessary elements for the proper phy handling and fall back to relying on the link interrupts instead. Signed-off-by: Marcin Wojtas --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 22 +++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 9bca8c8f9f8d..a66ed3194015 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4793,9 +4793,8 @@ static int mvpp2_open(struct net_device *dev) goto err_cleanup_txqs; } - /* Phylink isn't supported yet in ACPI mode */ - if (port->of_node) { - err = phylink_of_phy_connect(port->phylink, port->of_node, 0); + if (port->phylink) { + err = phylink_fwnode_phy_connect(port->phylink, port->fwnode, 0); if (err) { netdev_err(port->dev, "could not attach PHY (%d)\n", err); @@ -6703,6 +6702,19 @@ static void mvpp2_acpi_start(struct mvpp2_port *port) SPEED_UNKNOWN, DUPLEX_UNKNOWN, false, false); } +/* In order to ensure backward compatibility for ACPI, check if the port + * firmware node comprises the necessary description allowing to use phylink. + */ +static bool mvpp2_use_acpi_compat_mode(struct fwnode_handle *port_fwnode) +{ + if (!is_acpi_node(port_fwnode)) + return false; + + return (!fwnode_property_present(port_fwnode, "phy-handle") && + !fwnode_property_present(port_fwnode, "managed") && + !fwnode_get_named_child_node(port_fwnode, "fixed-link")); +} + /* Ports initialization */ static int mvpp2_port_probe(struct platform_device *pdev, struct fwnode_handle *port_fwnode, @@ -6921,8 +6933,7 @@ static int mvpp2_port_probe(struct platform_device *pdev, dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE; dev->dev.of_node = port_node; - /* Phylink isn't used w/ ACPI as of now */ - if (port_node) { + if (!mvpp2_use_acpi_compat_mode(port_fwnode)) { port->phylink_config.dev = &dev->dev; port->phylink_config.type = PHYLINK_NETDEV; @@ -6934,6 +6945,7 @@ static int mvpp2_port_probe(struct platform_device *pdev, } port->phylink = phylink; } else { + dev_warn(&pdev->dev, "Use link irqs for port#%d. FW update required\n", port->id); port->phylink = NULL; } From patchwork Mon Jun 21 17:30:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12335329 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFD75C4743C for ; Mon, 21 Jun 2021 17:31:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8AC561151 for ; Mon, 21 Jun 2021 17:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231802AbhFURdp (ORCPT ); Mon, 21 Jun 2021 13:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231597AbhFURdg (ORCPT ); Mon, 21 Jun 2021 13:33:36 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CBA6C061574 for ; Mon, 21 Jun 2021 10:31:19 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id m21so31472906lfg.13 for ; Mon, 21 Jun 2021 10:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SRF1siafcqtmCniXw5Nr6PWjFLq9MerPfEtSPjlMtOU=; b=w63SC6LB9NNI8xSAN0CyoCMee3khLwev7hcMa1NB3i+nVGYGsy4lAmVGHNt/tax3yT dU3YpNKH1iMryTxcBYdagpuByFlmwwiPbR3Zb0/wdfRXLidCXaJCVl7gAO8F8sZFn2fe 3L+feREBAX4N7LE8Hd3yVyA7rQkkb3F3ZRrGEcMnO9NmjBqwUDIEDMNaDbi0BBJa8/6K dxNPiaJSWE2JwgrqRKtZDb3EmIn6Nse35AMlRNMncRx+I2pOa8GgDyC0h4mN5CyPlKNw xynY7nDF5q6TN0kgX7PRCMF2iZwqR0z9WEPUZgt9ISRshqAnDBD67amc+atAcae9Ft1J g5ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SRF1siafcqtmCniXw5Nr6PWjFLq9MerPfEtSPjlMtOU=; b=NxSt3ClbbvmI+C5KAXt47Gou8TEw1wTbpso0Yh/m6Ke4l2czRUj3CytI5KtX/jo2Ez lw6XlDsxlME8XpnI+G+ddglGGddF4tEiHh7iGI1/i9Lyr02aSWLzxjkcjj/0IO4XPH0B xlcNFvF3G8M2VoW3UvCvFf0qflIIClywuhcbt3oe30AEhRLqz0BPAnaP1kOL+pQGgjTN qQ3C4RwqOPxSLQVYiGVSJthcoWOa1DmD96ypzohS6eyQPJlBAFt7bvy+h2IEhP9v4NMO eXO2dALwdAIZPp7jJI3NU/FYfjHyutAN/pfnPchvys2TzXmbvnJGtFhEnGp+foYswMOk CMZg== X-Gm-Message-State: AOAM531r1+EF3AhIAYcoQXXn4c4SbIe88pl93qSr/qPsLRIaSo+mpjoy lVFbzI1Y7uucQN2Sb5Cx9l2r3Q== X-Google-Smtp-Source: ABdhPJwq3TTD92mfSZ0QIaaOizPLZ1bWxgNta1N2gGBmvg59hhCm/YzsAHhmHssOS60BHcQWdiO1zg== X-Received: by 2002:ac2:4d19:: with SMTP id r25mr2236456lfi.150.1624296677694; Mon, 21 Jun 2021 10:31:17 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id u11sm1926380lfs.257.2021.06.21.10.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 10:31:17 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk, jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com, Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com, rjw@rjwysocki.net, lenb@kernel.org, Marcin Wojtas , Andrew Lunn Subject: [net-next: PATCH v3 6/6] net: mvpp2: remove unused 'has_phy' field Date: Mon, 21 Jun 2021 19:30:28 +0200 Message-Id: <20210621173028.3541424-7-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com> References: <20210621173028.3541424-1-mw@semihalf.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The 'has_phy' field from struct mvpp2_port is no longer used. Remove it. Signed-off-by: Marcin Wojtas Reviewed-by: Andrew Lunn --- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 3 --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h index 4a61c90003b5..b9fbc9f000f2 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h @@ -1197,9 +1197,6 @@ struct mvpp2_port { /* Firmware node associated to the port */ struct fwnode_handle *fwnode; - /* Is a PHY always connected to the port */ - bool has_phy; - /* Per-port registers' base address */ void __iomem *base; void __iomem *stats_base; diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index a66ed3194015..8362e64a3b28 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -6790,7 +6790,6 @@ static int mvpp2_port_probe(struct platform_device *pdev, port = netdev_priv(dev); port->dev = dev; port->fwnode = port_fwnode; - port->has_phy = !!of_find_property(port_node, "phy", NULL); port->ntxqs = ntxqs; port->nrxqs = nrxqs; port->priv = priv;