From patchwork Mon Apr 26 15:46:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1470353 X-Patchwork-Delegate: rfried.dev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=O7lHvpC+; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FTTmy74Lqz9sW6 for ; Tue, 27 Apr 2021 01:47:46 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AAD5582B92; Mon, 26 Apr 2021 17:47:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="O7lHvpC+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D532F82B7C; Mon, 26 Apr 2021 17:47:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D136E82B95 for ; Mon, 26 Apr 2021 17:47:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13QFQOPa032366; Mon, 26 Apr 2021 17:47:04 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=5Z6pqkK7Xm2ud+sSvv//QrPVLJVNPbPMBTKR+XhzQmc=; b=O7lHvpC+ttezuEkFxlUi6dun/DpvPdJDSaoEWEyNQPaKaTCNfazR6+t2LGSNtSijZOrF r50W/BfzxMH6L7nyd+wPeoLImb2FHZXi5JWXqHUtxZUIBZgMNqFFh/LAJDz45dvFHsPW 4SrKMitc+0gfkskM4vjO+K2Px9zt0umCUAAZOSmM1A6fF/EObs1ZrafkAVehc863v2ip eCB5KJEWGP1byNTq1VNclaTKDbj0YHLamDG2/G6geibFFE3zgPiXRDZa1AaYkrx8T6BC y4MtvElcyJIjh9Jv4yS4/FUWugqn9qxhxTzUJm8zQlWKQlSNaRk36P6DM3J2XG2yHliz eA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 385gb2dj64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Apr 2021 17:47:04 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C54D710002A; Mon, 26 Apr 2021 17:47:03 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id B8AA523BD64; Mon, 26 Apr 2021 17:47:03 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Apr 2021 17:47:03 +0200 From: Patrick Delaunay To: CC: Christophe Roullier , Marek Vasut , Patrick Delaunay , "Joe Hershberger" , Ramon Fried , U-Boot STM32 Subject: [PATCH v2 2/6] net: eth-phy: use dev_dbg and log_notice Date: Mon, 26 Apr 2021 17:46:48 +0200 Message-ID: <20210426174647.v2.2.I523f439458f0ff2d770a2b8e8a7c8e0969e783dd@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210426154653.3941-1-patrick.delaunay@foss.st.com> References: <20210426154653.3941-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-26_07:2021-04-26, 2021-04-26 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Replace debug trace and printf to log macros: - debug() replaced by dev_dbg() when device is available, this macro indicate the device name since commit ceb70bb870ac ("dm: Print device name in dev_xxx like Linux") - printf() replaced by log_notice() to allow dispatch to log backends. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- Changes in v2: - use log macro in eth-phy driver (NEW) drivers/net/eth-phy-uclass.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c index 153f6909eb..962084a7c9 100644 --- a/drivers/net/eth-phy-uclass.c +++ b/drivers/net/eth-phy-uclass.c @@ -5,8 +5,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -27,25 +29,25 @@ int eth_phy_binds_nodes(struct udevice *eth_dev) mdio_node = dev_read_subnode(eth_dev, "mdio"); if (!ofnode_valid(mdio_node)) { - debug("%s: %s mdio subnode not found!", __func__, - eth_dev->name); + dev_dbg(eth_dev, "%s: %s mdio subnode not found!", __func__, + eth_dev->name); return -ENXIO; } ofnode_for_each_subnode(phy_node, mdio_node) { node_name = ofnode_get_name(phy_node); - debug("* Found child node: '%s'\n", node_name); + dev_dbg(eth_dev, "* Found child node: '%s'\n", node_name); ret = device_bind_driver_to_node(eth_dev, "eth_phy_generic_drv", node_name, phy_node, NULL); if (ret) { - debug(" - Eth phy binding error: %d\n", ret); + dev_dbg(eth_dev, " - Eth phy binding error: %d\n", ret); continue; } - debug(" - bound phy device: '%s'\n", node_name); + dev_dbg(eth_dev, " - bound phy device: '%s'\n", node_name); } return 0; @@ -86,14 +88,14 @@ struct mii_dev *eth_phy_get_mdio_bus(struct udevice *eth_dev) */ uc_priv = (struct eth_phy_device_priv *)(dev_get_uclass_priv(phy_dev)); if (uc_priv->mdio_bus) - printf("Get shared mii bus on %s\n", eth_dev->name); + log_notice("Get shared mii bus on %s\n", eth_dev->name); else - printf("Can't get shared mii bus on %s\n", eth_dev->name); + log_notice("Can't get shared mii bus on %s\n", eth_dev->name); return uc_priv->mdio_bus; } } else { - printf("FEC: can't find phy-handle\n"); + log_notice("FEC: can't find phy-handle\n"); } return NULL; @@ -106,7 +108,7 @@ int eth_phy_get_addr(struct udevice *dev) if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0, &phandle_args)) { - debug("Failed to find phy-handle"); + dev_dbg(dev, "Failed to find phy-handle"); return -ENODEV; } From patchwork Mon Apr 26 15:46:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1470354 X-Patchwork-Delegate: rfried.dev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=jJeks6FE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FTTn75TkTz9sW6 for ; Tue, 27 Apr 2021 01:47:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C81C82CA5; Mon, 26 Apr 2021 17:47:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="jJeks6FE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F70582B81; Mon, 26 Apr 2021 17:47:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 339E082B97 for ; Mon, 26 Apr 2021 17:47:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13QFSalE022303; Mon, 26 Apr 2021 17:47:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=NZWUE82YV/xHV/dCB7sks31jlAbyX0zmn6kSwUQFjHE=; b=jJeks6FEiajIv6qsY8t12b5KarIeSluz2OryEI9WXhFHJmW/W/mBkRYrsinDv7gmB2cH 9ts7DWHII+t99V1p9VCGaquid3KMvu6H96cq8VXUjcXnRxTKFMq1zlkmybySAHyyBhr8 Nnn4q18+gvvddYywj2wievoXYnmtF4oUmixsP9Y/KWEARZxe0t6WSi+9tmh4ErO6gxqz cWtBTjZcAA/soUREwiiQl6wB0qAXTCXVqWALpY+tZoM5FCiGEzpn88Ef+Axj2rfzRLy6 AwJUST2TJsXeFgsxr9XLSyVzhhQ90+QF/ee7B1hVQ5Xsh9ovOZcjySUx9eLXUrUcq9Od gA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 385b0xxjdh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Apr 2021 17:47:05 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A04D810002A; Mon, 26 Apr 2021 17:47:04 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 953E323BD64; Mon, 26 Apr 2021 17:47:04 +0200 (CEST) Received: from localhost (10.75.127.51) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Apr 2021 17:47:04 +0200 From: Patrick Delaunay To: CC: Christophe Roullier , Marek Vasut , Patrick Delaunay , "Joe Hershberger" , Ramon Fried , U-Boot STM32 Subject: [PATCH v2 3/6] net: eth-phy: manage subnode mdio0 Date: Mon, 26 Apr 2021 17:46:49 +0200 Message-ID: <20210426174647.v2.3.Ia198585f58eba36cd65105e2043f61d54e63ceb3@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210426154653.3941-1-patrick.delaunay@foss.st.com> References: <20210426154653.3941-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG3NODE2.st.com (10.75.127.8) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-26_07:2021-04-26, 2021-04-26 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Bind any subnode with name beginning by mdio, mdio0 for example, and not only the "mdio" as namei of subnode. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- Changes in v2: - update eth-phy driver to support STM32 binding with a mdio0 subnode (NEW) drivers/net/eth-phy-uclass.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c index 962084a7c9..f04f1c8f09 100644 --- a/drivers/net/eth-phy-uclass.c +++ b/drivers/net/eth-phy-uclass.c @@ -27,12 +27,18 @@ int eth_phy_binds_nodes(struct udevice *eth_dev) const char *node_name; int ret; - mdio_node = dev_read_subnode(eth_dev, "mdio"); + /* search a subnode named "mdio.*" */ + dev_for_each_subnode(mdio_node, eth_dev) { + node_name = ofnode_get_name(mdio_node); + if (!strncmp(node_name, "mdio", 4)) + break; + } if (!ofnode_valid(mdio_node)) { - dev_dbg(eth_dev, "%s: %s mdio subnode not found!", __func__, + dev_dbg(eth_dev, "%s: %s mdio subnode not found!\n", __func__, eth_dev->name); return -ENXIO; } + dev_dbg(eth_dev, "%s: %s subnode found!\n", __func__, node_name); ofnode_for_each_subnode(phy_node, mdio_node) { node_name = ofnode_get_name(phy_node); From patchwork Mon Apr 26 15:46:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1470355 X-Patchwork-Delegate: rfried.dev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=bJnwCmWg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FTTnM6PHsz9sW6 for ; Tue, 27 Apr 2021 01:48:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4AE1E82BB2; Mon, 26 Apr 2021 17:48:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="bJnwCmWg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 60F4982B97; Mon, 26 Apr 2021 17:47:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DFAEB82B99 for ; Mon, 26 Apr 2021 17:47:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13QFSIQG022198; Mon, 26 Apr 2021 17:47:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=1pk9m1q/+QjUv4YKJIYBCSbzAHEr97f2uzSVQBJ5a/0=; b=bJnwCmWgHrj57qtOpMd2A/q82quthoDqoJACAhc0nFbiQ9lPLbOsSIC7OpLFlx1gZ+M8 w555ptYbHdNlsjjXz35mAKl95EA+lhlZnwBW4d8T7afYCYQqoRzOf7UqZGS1yKzZEB0H LbL6AQPMLiJiJAnvpJv+u4u4+SfsBvRHFvA/EO0FFiEjObrcDf6ZR5RTxmKlfBkSW0Xo 75feyk9GgJ9syL50ADbTthZWrSN1BQTte29ZtUeCpPUCvrzF6fWHm/+dCzncZrcfrXSz /eOSdntgAsbbpW9awnSw1cTaKhnYHVv+sjksPcd3u8Z9umiwI31zSf7k3p6EWmROadwB qw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 385b0xxjdn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Apr 2021 17:47:05 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7556E100034; Mon, 26 Apr 2021 17:47:05 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 6969423FE75; Mon, 26 Apr 2021 17:47:05 +0200 (CEST) Received: from localhost (10.75.127.49) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Apr 2021 17:47:05 +0200 From: Patrick Delaunay To: CC: Christophe Roullier , Marek Vasut , Patrick Delaunay , "Joe Hershberger" , Ramon Fried , U-Boot STM32 Subject: [PATCH v2 4/6] net: dwc_eth_qos: remove the field phyaddr of the struct eqos_priv Date: Mon, 26 Apr 2021 17:46:50 +0200 Message-ID: <20210426174647.v2.4.I98726d4bbd3145e65b872950a884cd8424b10131@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210426154653.3941-1-patrick.delaunay@foss.st.com> References: <20210426154653.3941-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-26_07:2021-04-26, 2021-04-26 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Since the commit commit 6a895d039ba7 ("net: Update eQos driver and FEC driver to use eth phy interfaces") the field phyaddr of driver private data struct eqos_priv is no more used in eqos_start() for the phy_connect() parameter. Now this variable is only initialized in eqos_probe_resources_stm32() it can be removed. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- Changes in v2: - remove unused element in the struct eqos_priv (NEW) drivers/net/dwc_eth_qos.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index e8242ca4e1..e625aea8d1 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -311,7 +311,6 @@ struct eqos_priv { struct clk clk_slave_bus; struct mii_dev *mii; struct phy_device *phy; - int phyaddr; u32 max_speed; void *descs; int tx_desc_idx, rx_desc_idx; @@ -1826,7 +1825,6 @@ static int eqos_probe_resources_stm32(struct udevice *dev) if (ret) pr_warn("No phy clock provided %d", ret); - eqos->phyaddr = -1; ret = dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0, &phandle_args); if (!ret) { @@ -1839,9 +1837,6 @@ static int eqos_probe_resources_stm32(struct udevice *dev) if (ret) pr_warn("gpio_request_by_name(phy reset) not provided %d", ret); - - eqos->phyaddr = ofnode_read_u32_default(phandle_args.node, - "reg", -1); } debug("%s: OK\n", __func__); From patchwork Mon Apr 26 15:46:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1470356 X-Patchwork-Delegate: rfried.dev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=ZTXNKmbc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FTTnc5dnWz9srX for ; Tue, 27 Apr 2021 01:48:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 64A4982BA0; Mon, 26 Apr 2021 17:48:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="ZTXNKmbc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 09B4A82BA0; Mon, 26 Apr 2021 17:47:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C6EAB82C95 for ; Mon, 26 Apr 2021 17:47:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13QFS4TP016829; Mon, 26 Apr 2021 17:47:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=8+Kg6JFGZ4lQrCgJXDoTCC/B4rOmHgexOWe57bNAVxY=; b=ZTXNKmbcZh0Sq4SeQtxq//8j72eLpL8IGfFpEXXNcsxg09X7e2YDaQqPDlUblyGiaT7b RvuHoP4a+oxkrUvm/2HuZAhNwEqyU3Xm2em9KnHk4QIvY422FZ6cTGEt/bPNuXa+ZAF7 LvfjCjNdyDk6ekYhVkH0n1kCFVy4ScpJTa9RP6OxGHX36uG27plmmf5i/dKV4n8BhWxk R3edfOA4QqA3H9M53D0ZYcbrKOMqbCvhjlLyh6wARmiXWwKpkMnpQa5B7rBuCeNs6E15 wbqEbDgWoTStNKNhnNn7pWNm97AjSIDh8FA74mb8I2d2wWuHG/k+f/3BDyz+UazvA5VD mw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 385aeedy8u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Apr 2021 17:47:06 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 58C0610002A; Mon, 26 Apr 2021 17:47:06 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4BB9224184F; Mon, 26 Apr 2021 17:47:06 +0200 (CEST) Received: from localhost (10.75.127.48) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Apr 2021 17:47:05 +0200 From: Patrick Delaunay To: CC: Christophe Roullier , Marek Vasut , Patrick Delaunay , "Joe Hershberger" , Ramon Fried , U-Boot STM32 Subject: [PATCH v2 5/6] net: dwc_eth_qos: use generic ethernet phy for stm32 variant Date: Mon, 26 Apr 2021 17:46:51 +0200 Message-ID: <20210426174647.v2.5.I52d5d9f5fb91b6bd92ec7fed517bfe36074d487d@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210426154653.3941-1-patrick.delaunay@foss.st.com> References: <20210426154653.3941-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-26_07:2021-04-26, 2021-04-26 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Use the generic ethernet phy which already manages the correct binding for gpio reset, including the assert an deassert delays. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- Changes in v2: - use generic ethernet phy for stm32 variant, this patch is a REWORK of previous serie: the device parsing is done in eth-phy driver and the gpio support is removed in stm32 variant: eqos_start/stop_resets_stm32 and eqos_probe_resources_stm32. drivers/net/Kconfig | 1 + drivers/net/dwc_eth_qos.c | 50 --------------------------------------- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 382639044b..adf43fb42a 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -206,6 +206,7 @@ config DWC_ETH_QOS_IMX config DWC_ETH_QOS_STM32 bool "Synopsys DWC Ethernet QOS device support for STM32" depends on DWC_ETH_QOS + select DM_ETH_PHY default y if ARCH_STM32MP help The Synopsys Designware Ethernet QOS IP block with the specific diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index e625aea8d1..3fb8bfaf3a 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -700,29 +700,6 @@ static int eqos_start_resets_tegra186(struct udevice *dev) static int eqos_start_resets_stm32(struct udevice *dev) { - struct eqos_priv *eqos = dev_get_priv(dev); - int ret; - - debug("%s(dev=%p):\n", __func__, dev); - if (dm_gpio_is_valid(&eqos->phy_reset_gpio)) { - ret = dm_gpio_set_value(&eqos->phy_reset_gpio, 1); - if (ret < 0) { - pr_err("dm_gpio_set_value(phy_reset, assert) failed: %d", - ret); - return ret; - } - - udelay(2); - - ret = dm_gpio_set_value(&eqos->phy_reset_gpio, 0); - if (ret < 0) { - pr_err("dm_gpio_set_value(phy_reset, deassert) failed: %d", - ret); - return ret; - } - } - debug("%s: OK\n", __func__); - return 0; } @@ -743,18 +720,6 @@ static int eqos_stop_resets_tegra186(struct udevice *dev) static int eqos_stop_resets_stm32(struct udevice *dev) { - struct eqos_priv *eqos = dev_get_priv(dev); - int ret; - - if (dm_gpio_is_valid(&eqos->phy_reset_gpio)) { - ret = dm_gpio_set_value(&eqos->phy_reset_gpio, 1); - if (ret < 0) { - pr_err("dm_gpio_set_value(phy_reset, assert) failed: %d", - ret); - return ret; - } - } - return 0; } @@ -1785,7 +1750,6 @@ static int eqos_probe_resources_stm32(struct udevice *dev) struct eqos_priv *eqos = dev_get_priv(dev); int ret; phy_interface_t interface; - struct ofnode_phandle_args phandle_args; debug("%s(dev=%p):\n", __func__, dev); @@ -1825,20 +1789,6 @@ static int eqos_probe_resources_stm32(struct udevice *dev) if (ret) pr_warn("No phy clock provided %d", ret); - ret = dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0, - &phandle_args); - if (!ret) { - /* search "reset-gpios" in phy node */ - ret = gpio_request_by_name_nodev(phandle_args.node, - "reset-gpios", 0, - &eqos->phy_reset_gpio, - GPIOD_IS_OUT | - GPIOD_IS_OUT_ACTIVE); - if (ret) - pr_warn("gpio_request_by_name(phy reset) not provided %d", - ret); - } - debug("%s: OK\n", __func__); return 0; From patchwork Mon Apr 26 15:46:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1470357 X-Patchwork-Delegate: rfried.dev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=22yBC9u2; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FTTnr5QY2z9sW6 for ; Tue, 27 Apr 2021 01:48:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3DC6082B92; Mon, 26 Apr 2021 17:48:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="22yBC9u2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C02C982BA1; Mon, 26 Apr 2021 17:47:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 293FF82B9B for ; Mon, 26 Apr 2021 17:47:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13QFS3bD016804; Mon, 26 Apr 2021 17:47:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=selector1; bh=83lQ9ylLBzfaE5oNxMPaanRzyFqJlUDiZJB/IuPCzKI=; b=22yBC9u2Vj8FqxBgBhynhlGCZfkCLZw24r+qIuwt1YRAZGb2tmfNjq4yyphFx++9ONfH QCP4pmhh2+3xOnKT4oSRlP1RhaT6kj5SyKXx/jwUaKZgz2FF08p9H25E6BOBFmiZ5bUz YnvQ5cTI4STVrn5ieNMZX8KbLwT1eZxCUqA3pjfzvyxkc1bUnN+pH330McBo+GBQoidr jyLw89zgMyDY7DgCUWO4shROdTSczUp8wKnODxF6y5XeWw6hBwvv+OswdO8IdK4JMWL8 DtzjcpPxx5iQghL9EgL6rDJUUjwF2TM9tsoWZkFH/M62jZNuhYXYWRaservhKvhKezWS cA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 385aeedy8v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Apr 2021 17:47:08 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 36C2410002A; Mon, 26 Apr 2021 17:47:07 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 299E024184F; Mon, 26 Apr 2021 17:47:07 +0200 (CEST) Received: from localhost (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Apr 2021 17:47:06 +0200 From: Patrick Delaunay To: CC: Christophe Roullier , Marek Vasut , Patrick Delaunay , "Joe Hershberger" , Ramon Fried , U-Boot STM32 Subject: [PATCH v2 6/6] net: dwc: add a common empty ops eqos_null_ops Date: Mon, 26 Apr 2021 17:46:52 +0200 Message-ID: <20210426174647.v2.6.I05af0032a32df49c4d6b7a18a84e2fd409097989@changeid> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210426154653.3941-1-patrick.delaunay@foss.st.com> References: <20210426154653.3941-1-patrick.delaunay@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-26_07:2021-04-26, 2021-04-26 signatures=0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Add a common empty ops: eqos_null_ops() to remove the duplicated empty functions and reduce the driver size for stm32 and imx config. This patch also aligns the prototype of ops 'eqos_stop_clks' with other eqos ops by adding return value. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- Changes in v2: - cleanup ops by adding a common null ops (NEW) drivers/net/dwc_eth_qos.c | 97 +++++++++------------------------------ 1 file changed, 22 insertions(+), 75 deletions(-) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 3fb8bfaf3a..4d1e5d6f8f 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -285,7 +285,7 @@ struct eqos_ops { int (*eqos_remove_resources)(struct udevice *dev); int (*eqos_stop_resets)(struct udevice *dev); int (*eqos_start_resets)(struct udevice *dev); - void (*eqos_stop_clks)(struct udevice *dev); + int (*eqos_stop_clks)(struct udevice *dev); int (*eqos_start_clks)(struct udevice *dev); int (*eqos_calibrate_pads)(struct udevice *dev); int (*eqos_disable_calibration)(struct udevice *dev); @@ -615,12 +615,7 @@ err: #endif } -static int eqos_start_clks_imx(struct udevice *dev) -{ - return 0; -} - -static void eqos_stop_clks_tegra186(struct udevice *dev) +static int eqos_stop_clks_tegra186(struct udevice *dev) { #ifdef CONFIG_CLK struct eqos_priv *eqos = dev_get_priv(dev); @@ -635,9 +630,10 @@ static void eqos_stop_clks_tegra186(struct udevice *dev) #endif debug("%s: OK\n", __func__); + return 0; } -static void eqos_stop_clks_stm32(struct udevice *dev) +static int eqos_stop_clks_stm32(struct udevice *dev) { #ifdef CONFIG_CLK struct eqos_priv *eqos = dev_get_priv(dev); @@ -652,11 +648,7 @@ static void eqos_stop_clks_stm32(struct udevice *dev) #endif debug("%s: OK\n", __func__); -} - -static void eqos_stop_clks_imx(struct udevice *dev) -{ - /* empty */ + return 0; } static int eqos_start_resets_tegra186(struct udevice *dev) @@ -698,16 +690,6 @@ static int eqos_start_resets_tegra186(struct udevice *dev) return 0; } -static int eqos_start_resets_stm32(struct udevice *dev) -{ - return 0; -} - -static int eqos_start_resets_imx(struct udevice *dev) -{ - return 0; -} - static int eqos_stop_resets_tegra186(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); @@ -718,16 +700,6 @@ static int eqos_stop_resets_tegra186(struct udevice *dev) return 0; } -static int eqos_stop_resets_stm32(struct udevice *dev) -{ - return 0; -} - -static int eqos_stop_resets_imx(struct udevice *dev) -{ - return 0; -} - static int eqos_calibrate_pads_tegra186(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); @@ -816,26 +788,6 @@ static ulong eqos_get_tick_clk_rate_imx(struct udevice *dev) return imx_get_eqos_csr_clk(); } -static int eqos_calibrate_pads_stm32(struct udevice *dev) -{ - return 0; -} - -static int eqos_calibrate_pads_imx(struct udevice *dev) -{ - return 0; -} - -static int eqos_disable_calibration_stm32(struct udevice *dev) -{ - return 0; -} - -static int eqos_disable_calibration_imx(struct udevice *dev) -{ - return 0; -} - static int eqos_set_full_duplex(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); @@ -932,11 +884,6 @@ static int eqos_set_tx_clk_speed_tegra186(struct udevice *dev) return 0; } -static int eqos_set_tx_clk_speed_stm32(struct udevice *dev) -{ - return 0; -} - static int eqos_set_tx_clk_speed_imx(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); @@ -1894,11 +1841,6 @@ static int eqos_remove_resources_stm32(struct udevice *dev) return 0; } -static int eqos_remove_resources_imx(struct udevice *dev) -{ - return 0; -} - static int eqos_probe(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); @@ -1987,6 +1929,11 @@ static int eqos_remove(struct udevice *dev) return 0; } +static int eqos_null_ops(struct udevice *dev) +{ + return 0; +} + static const struct eth_ops eqos_ops = { .start = eqos_start, .stop = eqos_stop, @@ -2032,13 +1979,13 @@ static struct eqos_ops eqos_stm32_ops = { .eqos_flush_buffer = eqos_flush_buffer_generic, .eqos_probe_resources = eqos_probe_resources_stm32, .eqos_remove_resources = eqos_remove_resources_stm32, - .eqos_stop_resets = eqos_stop_resets_stm32, - .eqos_start_resets = eqos_start_resets_stm32, + .eqos_stop_resets = eqos_null_ops, + .eqos_start_resets = eqos_null_ops, .eqos_stop_clks = eqos_stop_clks_stm32, .eqos_start_clks = eqos_start_clks_stm32, - .eqos_calibrate_pads = eqos_calibrate_pads_stm32, - .eqos_disable_calibration = eqos_disable_calibration_stm32, - .eqos_set_tx_clk_speed = eqos_set_tx_clk_speed_stm32, + .eqos_calibrate_pads = eqos_null_ops, + .eqos_disable_calibration = eqos_null_ops, + .eqos_set_tx_clk_speed = eqos_null_ops, .eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_stm32 }; @@ -2059,13 +2006,13 @@ static struct eqos_ops eqos_imx_ops = { .eqos_inval_buffer = eqos_inval_buffer_generic, .eqos_flush_buffer = eqos_flush_buffer_generic, .eqos_probe_resources = eqos_probe_resources_imx, - .eqos_remove_resources = eqos_remove_resources_imx, - .eqos_stop_resets = eqos_stop_resets_imx, - .eqos_start_resets = eqos_start_resets_imx, - .eqos_stop_clks = eqos_stop_clks_imx, - .eqos_start_clks = eqos_start_clks_imx, - .eqos_calibrate_pads = eqos_calibrate_pads_imx, - .eqos_disable_calibration = eqos_disable_calibration_imx, + .eqos_remove_resources = eqos_null_ops, + .eqos_stop_resets = eqos_null_ops, + .eqos_start_resets = eqos_null_ops, + .eqos_stop_clks = eqos_null_ops, + .eqos_start_clks = eqos_null_ops, + .eqos_calibrate_pads = eqos_null_ops, + .eqos_disable_calibration = eqos_null_ops, .eqos_set_tx_clk_speed = eqos_set_tx_clk_speed_imx, .eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_imx };