Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4021088pxb; Mon, 8 Feb 2021 06:12:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKDkI2E/bzPwPAa+E0tFPb10zJZK6uqTiqwRHJDMIYowXjihabJ7ppYYGgf9138qT1/qYX X-Received: by 2002:a17:906:5390:: with SMTP id g16mr7627232ejo.19.1612793553662; Mon, 08 Feb 2021 06:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612793553; cv=none; d=google.com; s=arc-20160816; b=Zj+z4BZTP+ZCeGPDshmCtBgPrUE2Qz2fMCHqQtY1++mv15qV2XE7vmb5VviSVMKYJZ HNxJpO4ZhN7+ECe/dJCyNLgIt8o8L/F1CnLl0qlyYM18sA1eDKVhvauKWds/sp3Pcema ASY7TWHU3yJ1squWCx/cThYNEW4MGechcuGboqRGSlrkcttGj+7llqdUiFAXMjl4PEVu Mj2s+jVwdyaU0JWkqE74tPVuHTsiDpVEZyEJVr5ioYBjdojBsnaN1KGD62ViQbAc1h/j TsUyuwBFqfYq4Xd9u/ndsT91hbJX2zrDa2opqvcl1L4f/y1agD+7RnaKWS3TrQKvPIiJ cSQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Q/rhsl/4o8lCeX7hgq8YnXEyg0q65DDVynP0u/F//7M=; b=utNtmjLYUW7Md/P5qMZ3aIR4f5i/ocSwQiQJBCF1tQZ0nnw+1s4FvBinis5NZ+IOlN Xv8Aw4R0cwF7v/tZmKkliBzzSR1ADC9vQlmYZrvP61PrBZlwlGyVwKE4HJ4iHspysVoi oJ/0Grf+2HVteuTUw9bP8/A388m7lAXyYl1YFJk47V0KEB+kI4KNiuSPdD5e0M0/gFrI 5FCeutd0gbhibVQHayyBsKfYB5oC45uXK+Ko9MtUjKWGfIWDa7kCrkx1Sw63wou4u1mn kf991T5nwk9hyP9ZbCGJXKYFKG+bOSh6w7kiiprmTEyfXLyXLm461DM+tqkx0plQOewy 2b6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si10858172edh.31.2021.02.08.06.12.07; Mon, 08 Feb 2021 06:12:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232709AbhBHOI5 (ORCPT + 99 others); Mon, 8 Feb 2021 09:08:57 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:57068 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231905AbhBHN5r (ORCPT ); Mon, 8 Feb 2021 08:57:47 -0500 From: Serge Semin To: Rob Herring , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Johan Hovold , Maxime Ripard , Joao Pinto , Lars Persson , Maxime Coquelin CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Vyacheslav Mitrofanov , , , , , Subject: [PATCH v2 08/24] net: stmmac: Add {axi,mtl-rx,mtl-tx}-config sub-nodes support Date: Mon, 8 Feb 2021 16:55:52 +0300 Message-ID: <20210208135609.7685-9-Sergey.Semin@baikalelectronics.ru> In-Reply-To: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> References: <20210208135609.7685-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the "snps,axi-config", "snps,mtl-rx-config" and "snps,mtl-tx-config" DT node properties are marked as deprecated when being defined as a phandle reference to a node with parameters. The new way of defining the DW MAC interfaces config is to add sub-nodes to the DW MAC device DT node with vendor-prefixless names. Make sure the STMMAC driver supports them. Signed-off-by: Serge Semin --- Changelog v2: - Discard "snps" vendor-prefix from the new AXI/MTL Tx/Rx config sub-nodes. --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 6dc9f10414e4..1815fe36b62f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -95,7 +95,8 @@ static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev) struct device_node *np; struct stmmac_axi *axi; - np = of_parse_phandle(pdev->dev.of_node, "snps,axi-config", 0); + np = of_parse_phandle(pdev->dev.of_node, "snps,axi-config", 0) ?: + of_get_child_by_name(pdev->dev.of_node, "axi-config"); if (!np) return NULL; @@ -150,11 +151,13 @@ static int stmmac_mtl_setup(struct platform_device *pdev, plat->rx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; plat->tx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; - rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0); + rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0) ?: + of_get_child_by_name(pdev->dev.of_node, "mtl-rx-config"); if (!rx_node) return ret; - tx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-tx-config", 0); + tx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-tx-config", 0) ?: + of_get_child_by_name(pdev->dev.of_node, "mtl-tx-config"); if (!tx_node) { of_node_put(rx_node); return ret; -- 2.29.2