From patchwork Sun Jun 13 18:35:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12317843 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 C36E3C48BDF for ; Sun, 13 Jun 2021 18:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A18FF6109F for ; Sun, 13 Jun 2021 18:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232055AbhFMShn (ORCPT ); Sun, 13 Jun 2021 14:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232034AbhFMShl (ORCPT ); Sun, 13 Jun 2021 14:37:41 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D18B6C061766 for ; Sun, 13 Jun 2021 11:35:39 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id a1so17164715lfr.12 for ; Sun, 13 Jun 2021 11:35:39 -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=9wa0R9QgN9v6zwyAsN74gAe/lS7c/EyQi0Wo5c88QIQ=; b=iYI+X2r9vC0WdhhxW/B+nSHY3HcB7GRQHhtO9ZBFSqg3YeSeN3g3Rj6Z7ZSpn8Wiwk pi7HL4M9WlZSkG7na22qtX5Gg48IsNF0jn9BMNnzmPKU7U/s6nUZb64tpg+nXAzJyz+e aQlIa1z4OANPNbuxpUIuXoXZn6CNed/dzoLiLsFQdPYduWNz/KZvAjA52KlhiUA9rE03 DiNp/PON8nmebtr2t1uJef2B3ASDZG5jQAg1v/3ESHFKCx2I5mw8CWwF8rTSxt5DSxpK avcrBJW1qvLlpK99LERkH743dbYVdXY3dyasgNwVeMdJGSTYbGnvjfIpXqXt8v0yVXRj OH0A== 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=9wa0R9QgN9v6zwyAsN74gAe/lS7c/EyQi0Wo5c88QIQ=; b=f0SS3jr8gxLitl+a/pMRogtp6Zykeai2YfjZ9pw6QrE8JxHo1dZDys2r9tpjMiEMrE 9bVdYrjxVbx8bN6Bz5cpMp4ibfzAc7E8qrXb9iUKozeQCro6XdPYYTLtCOt+K5DXaldh Ooa+9Yv3eKgXqxp4OunbysFRgmAvUWq/kzNjzcqpAk4vFImofqe4WZ/e5AEKiywF6cK7 3BjCRaI0EHUfYPtCiNeQuRzO0kelDx8Ypg3WfpSe1yE3D2mB4ZLXAlTBlfGk3Q+M6BZD FugTWkzA0d1RzV6s6Nf4wMPHdqZ1cV1jSHyG00xxagpkwDZ7Q9DLYLh79KtCdF0FL4hE yvyw== X-Gm-Message-State: AOAM531Ibfl5/IYnqYzZ7DSk7i3yXzj0HZU0BPm6hGVGmkA8Udd3Q0Q+ g8sUNGoxWVhI3g2tPF63hTRDaA== X-Google-Smtp-Source: ABdhPJyRgYb2OabDhENZ0arUUjep4AQEyA9ug6T2moxifv2eeShG9wz+kLJR0KFHroHWJrXZFiclZw== X-Received: by 2002:ac2:51b1:: with SMTP id f17mr1906402lfk.592.1623609338137; Sun, 13 Jun 2021 11:35:38 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id e12sm904984lfs.157.2021.06.13.11.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 11:35:37 -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, Marcin Wojtas Subject: [net-next: PATCH 1/3] net: mvmdio: add ACPI support Date: Sun, 13 Jun 2021 20:35:18 +0200 Message-Id: <20210613183520.2247415-2-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210613183520.2247415-1-mw@semihalf.com> References: <20210613183520.2247415-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 Also clk enabling is skipped, because the tables do not contain such data and clock maintenance relies on the firmware. Signed-off-by: Marcin Wojtas --- drivers/net/ethernet/marvell/mvmdio.c | 27 +++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index d14762d93640..e66355a0f546 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -17,6 +17,8 @@ * warranty of any kind, whether express or implied. */ +#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) { @@ -336,7 +338,7 @@ static int orion_mdio_probe(struct platform_device *pdev) dev_warn(&pdev->dev, "unsupported number of clocks, limiting to the first " __stringify(ARRAY_SIZE(dev->clk)) "\n"); - } else { + } else if (!has_acpi_companion(&pdev->dev)) { dev->clk[0] = clk_get(&pdev->dev, NULL); if (PTR_ERR(dev->clk[0]) == -EPROBE_DEFER) { ret = -EPROBE_DEFER; @@ -369,7 +371,12 @@ static int orion_mdio_probe(struct platform_device *pdev) goto out_mdio; } - ret = of_mdiobus_register(bus, pdev->dev.of_node); + if (pdev->dev.of_node) + ret = of_mdiobus_register(bus, pdev->dev.of_node); + else if (is_acpi_node(pdev->dev.fwnode)) + ret = acpi_mdiobus_register(bus, pdev->dev.fwnode); + else + ret = -EINVAL; if (ret < 0) { dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret); goto out_mdio; @@ -383,6 +390,9 @@ static int orion_mdio_probe(struct platform_device *pdev) if (dev->err_interrupt > 0) writel(0, dev->regs + MVMDIO_ERR_INT_MASK); + if (has_acpi_companion(&pdev->dev)) + return ret; + out_clk: for (i = 0; i < ARRAY_SIZE(dev->clk); i++) { if (IS_ERR(dev->clk[i])) @@ -404,6 +414,9 @@ static int orion_mdio_remove(struct platform_device *pdev) writel(0, dev->regs + MVMDIO_ERR_INT_MASK); mdiobus_unregister(bus); + if (has_acpi_companion(&pdev->dev)) + return 0; + for (i = 0; i < ARRAY_SIZE(dev->clk); i++) { if (IS_ERR(dev->clk[i])) break; @@ -421,12 +434,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 Sun Jun 13 18:35:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12317845 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 E739BC49361 for ; Sun, 13 Jun 2021 18:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BEC3761153 for ; Sun, 13 Jun 2021 18:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232065AbhFMShr (ORCPT ); Sun, 13 Jun 2021 14:37:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbhFMShm (ORCPT ); Sun, 13 Jun 2021 14:37:42 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBCEDC061766 for ; Sun, 13 Jun 2021 11:35:40 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id p17so17202555lfc.6 for ; Sun, 13 Jun 2021 11:35:40 -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=Rd9LRe77V7pHhuoyeJvDmCm7mX//E10O3Cp6VzupEbc=; b=X3h0v8rWhxwM83OXFg2rjx0eapxrhbv2wKjjRumRzFjbVe27c2iIcnVX3HdWbzf0Ga yFvNhv6AgLdxzgqmU/jLdG603LfFOahrzt2FkIbARG+tiJZJmP78NADp00Zfk6cJGDcK 2/wnAuZztRmR/aexs/QqR4qyoez2Lq29oYFXL4x6/P1Rm/nMkuS7oRPCqSnbbl1ZJsvB XNploNxjgjD/1sy6ZRkWxvm0y1LVK6mCyHu0zoHSMwH+3T/HDzomaG/mK/FNE+WAgadj msjGgoYPpE7/SX6g2BCKNV0I3Lqeiky9YLfSGJttDT7jkMU4kFM+lldBzfFBro42D6FJ Ar5g== 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=Rd9LRe77V7pHhuoyeJvDmCm7mX//E10O3Cp6VzupEbc=; b=TVN6Y3cuqx9fPFwZOuhe8Q12sidCxyQtBcFiXm9j0p3p+2Y3Eb7ET+AeI/374QDOUG 36qZxuEy4fOMcgpYmteI5hEuaa0L6P/nbgtFYtPOrc3kwZG/X7qJz0jybwjLaFCDYTRy Lh8x/v891lvB4AJfPGdyeFylQiD+IBj+wmBnHXgmw+e8jxhfO0JXbz7EJFaR9K0umCz3 HSuOVgAgqEKdKMWJrm9GYSBYmmv/E4feCGZpI/ETyM8hn0r9lwz+NKv220Ne1BTitp55 C+3HD8HZRu6/yjumc6B7macKBTQATHEqSKF4HudGXG7fPz1mNshdliS0N9uSs7sWWgSP WA0Q== X-Gm-Message-State: AOAM530c6vndoFjoJnGkSJVVd6MOOi8NUHjlagChZ5JdfVcckmwS3RqM M+Zij4+bteo/uA1jvfga7i9Ulw== X-Google-Smtp-Source: ABdhPJwUjHaqlJOTtdodjN7olzOnovJzLlzWpp9qtubDDey3kRktZPFby3LOt1+6+xlLqrJNc3BJUQ== X-Received: by 2002:a19:e00f:: with SMTP id x15mr9356463lfg.222.1623609339102; Sun, 13 Jun 2021 11:35:39 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id e12sm904984lfs.157.2021.06.13.11.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 11:35:38 -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, Marcin Wojtas Subject: [net-next: PATCH 2/3] net: mvpp2: enable using phylink with ACPI Date: Sun, 13 Jun 2021 20:35:19 +0200 Message-Id: <20210613183520.2247415-3-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210613183520.2247415-1-mw@semihalf.com> References: <20210613183520.2247415-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 | 21 ++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 9bca8c8f9f8d..ca1f0464e746 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, @@ -6922,7 +6934,7 @@ static int mvpp2_port_probe(struct platform_device *pdev, 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 +6946,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 Sun Jun 13 18:35:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 12317847 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 1D1B7C49EA3 for ; Sun, 13 Jun 2021 18:36:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 028B76109F for ; Sun, 13 Jun 2021 18:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbhFMSin (ORCPT ); Sun, 13 Jun 2021 14:38:43 -0400 Received: from mail-lf1-f52.google.com ([209.85.167.52]:44797 "EHLO mail-lf1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbhFMSim (ORCPT ); Sun, 13 Jun 2021 14:38:42 -0400 Received: by mail-lf1-f52.google.com with SMTP id r198so17191927lff.11 for ; Sun, 13 Jun 2021 11:36:40 -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=f9hctqrMSqIha3ZKHMtzDyMGNIbR3Ixgz4KlWzWlWOg=; b=mzmjIBp+lxMz6Dtk6NDYmJ10qhlBWdSQ1+wc0DHFyaKpM5qw1LqUADjP4+hBAygOt6 8oI1gUCQ3dYB70FSwRPlYPtXO+oAZk8T+eVajuzVbZMaypUx+oORW0AEGQRjh0qlbqCI gfAApUuCD8amT1WLio5DETbrcj3zEulRuhj15RgWb8jX3orviYYLU9Lz9OjVQIoMAWh7 F5VYfhlFeF3moGyM+9IUrNVDNVviV3sQ8Jj2QZDZ4n88XVReok6ai7M5c4+JFAOWOrFK W+KpkTDuokG8ohc4WCqPKNJ+iZIGIZ+g+cSz4x/+HlN4WkQRL0H6J3UcTYkDUapC8DAf HwbQ== 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=f9hctqrMSqIha3ZKHMtzDyMGNIbR3Ixgz4KlWzWlWOg=; b=kLEku7UIbNWRP2aIHuYs4vrAXqOSjt/DZn5ANNuJy1JiRQv+hPqW83yxcVOeOa2UU7 O/fSG0zM2anNJTQiSLkCUF8R0/HKTL/1d63cCi4caU9fgMrR/vIxUa5ULGbrUZarogtO lV1hd3MIkixq/WFfeqps0hF8wzSZp6cxLhkWZr0MVyEUO/QVc3tJdvblMoxYtlt317/K VzQennyzGSdNPfhJdFR1GvDILq8VJsnEFvL9tO2EQezqyKU5L6R25Byt0uEhJ+z09Fmt WkJ7gMXliWOUs5GbYATHBN1gmZBiRHp9G2fQ6Zluj/9cPh2noSlwe0TcENg8QD+8FgON 3m/g== X-Gm-Message-State: AOAM533GXoz01F8Wb06ssogoI2v2qmmHkNWvkFXKDyTiS1vBJuK65YpU fdCbn6fv7aI/quQ8YGUL69/HjQ== X-Google-Smtp-Source: ABdhPJzS7H/tNvsCe0/darfMH9xo7jB3uQfLNNWbuc1ZOHYIKQwRsfx3mEDL37rOj8fynJSCIvI31A== X-Received: by 2002:a19:dc02:: with SMTP id t2mr9560004lfg.261.1623609340068; Sun, 13 Jun 2021 11:35:40 -0700 (PDT) Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id e12sm904984lfs.157.2021.06.13.11.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Jun 2021 11:35:39 -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, Marcin Wojtas Subject: [net-next: PATCH 3/3] net: mvpp2: remove unused 'has_phy' field Date: Sun, 13 Jun 2021 20:35:20 +0200 Message-Id: <20210613183520.2247415-4-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210613183520.2247415-1-mw@semihalf.com> References: <20210613183520.2247415-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 --- 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 ca1f0464e746..c87752999485 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;