From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87224C04A95 for ; Wed, 28 Sep 2022 09:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fxh7G61mNEDUHMc+YdE2UCMgn/4aO3OpxcBjkI0JjEE=; b=ofvhd+B9P0RX9F JTU9A+uPAL6MBdGbofoMECaKkTQehNndkxMgCPb/tmWfdC7zFQIDcRnZ4M5ubebwnFn3lqXMuyFe/ j5VwbgcmnyIGrc7iPr8FJkX6BqWTCmUriAQ59AGQUehJzo+76hYqefcJ0JsahA/sJnSPik3BS5YQI tYv1y41tB1x17Ys1euoeuT7MUkn2lUG9uVcml6oRIn280cCWyF9t01gdZy5BYku6YCWLpeDtQi5FC ftlUxAbrsNqFUJ0QvpFJYCoI2wEIpbh3Tv/M/dMVN2V5afny+mdfZU/fSTXLnjfqFsXxuv73POVbp xDaYoaWsGeUt8o33KZmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odT7i-00F6vB-KC; Wed, 28 Sep 2022 09:12:58 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odT7F-00F6e3-Vq; Wed, 28 Sep 2022 09:12:31 +0000 X-UUID: 72f412454a02477d86058b018101c9e7-20220928 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=YsMjo12w8koHdR4QXO2+wONVhzxLBlLGOX92rbAP98k=; b=l0ttKZPsYJlfnkIMDd6v4jSaW17mW5wup/EOd+iLZoeFLJnogzno8jYgjWj/L4boXTvEYyYVz+O3H09HUIbTpSZj3ke+Jtkn9MlKbVnF4qiVJw1E0qQsklk7zW7ZsWK6XG6xtw3iDvPC0GCAFOjt67BNR7zgnhuaDOnbdrLXVjQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:5b53c399-fafa-441e-908d-416feb41ea7d,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:39a5ff1,CLOUDID:4f695ba3-dc04-435c-b19b-71e131a5fc35,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 72f412454a02477d86058b018101c9e7-20220928 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 601787944; Wed, 28 Sep 2022 02:12:24 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 28 Sep 2022 17:11:07 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 28 Sep 2022 17:11:05 +0800 From: Jianguo Zhang To: "David S . Miller" , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno CC: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , "Matthias Brugger" , Biao Huang , , , , , , , Jianguo Zhang Subject: [PATCH v6 4/4] net: stmmac: add a parse for new property 'snps,clk-csr' Date: Wed, 28 Sep 2022 17:10:52 +0800 Message-ID: <20220928091052.18490-5-jianguo.zhang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220928091052.18490-1-jianguo.zhang@mediatek.com> References: <20220928091052.18490-1-jianguo.zhang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220928_021230_082215_962556A4 X-CRM114-Status: GOOD ( 12.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Parse new property 'snps,clk-csr' firstly because the new property is documented in binding file, if failed, fall back to old property 'clk_csr' for out-of-tree case Signed-off-by: Jianguo Zhang --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 9f5cac4000da..4c60a89460c8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -444,7 +444,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) * or get clk_csr from device tree. */ plat->clk_csr = -1; - of_property_read_u32(np, "clk_csr", &plat->clk_csr); + if (of_property_read_u32(np, "snps,clk-csr", &plat->clk_csr)) + of_property_read_u32(np, "clk_csr", &plat->clk_csr); + /* "snps,phy-addr" is not a standard property. Mark it as deprecated * and warn of its use. Remove this when phy node support is added. -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel