From nobody Sat Sep 21 17:45:56 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50630C32771 for ; Wed, 28 Sep 2022 09:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233822AbiI1JXw (ORCPT ); Wed, 28 Sep 2022 05:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233772AbiI1JX2 (ORCPT ); Wed, 28 Sep 2022 05:23:28 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF033A8; Wed, 28 Sep 2022 02:23:24 -0700 (PDT) X-UUID: ca94991a3169433ab2f563849a67495a-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=KwoK02CzcRXYuVBHLmRnxHj3TbaimYu3fl7cDpF224A=; b=VupbKGWfQIiW+MIkboqnozd2aW6VGkWTLU68IpC/O0JF+Dj8ke4IZfFMiS/oxJCGeKonO+M2Q6Wt49Zo0egI4bIaYcRYUeAb0aqy1qi+CV3wT0V+Yx60Me2lBCz9sUDtk16kYTIMv1AonJw7ui86Exq58pklkp3HHIKBbBKTfEk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:d72c560b-e2c4-449e-a358-91fba0b6adf5,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.11,REQID:d72c560b-e2c4-449e-a358-91fba0b6adf5,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:39a5ff1,CLOUDID:c8c95ba3-dc04-435c-b19b-71e131a5fc35,B ulkID:220928172321I7K5884V,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48|823| 824,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil, COL:0 X-UUID: ca94991a3169433ab2f563849a67495a-20220928 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1304923521; Wed, 28 Sep 2022 17:23:18 +0800 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:23:17 +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:23:15 +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: [resend PATCH v6 4/4] net: stmmac: add a parse for new property 'snps,clk-csr' Date: Wed, 28 Sep 2022 17:23:08 +0800 Message-ID: <20220928092308.26019-5-jianguo.zhang@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220928092308.26019-1-jianguo.zhang@mediatek.com> References: <20220928092308.26019-1-jianguo.zhang@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 legacy case Signed-off-by: Jianguo Zhang Reviewed-by: AngeloGioacchino Del Regno --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.c index 9f5cac4000da..3db6cb0b6124 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -444,7 +444,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8= *mac) * or get clk_csr from device tree. */ plat->clk_csr =3D -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); =20 /* "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. --=20 2.25.1