Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6606217rdb; Fri, 15 Dec 2023 03:37:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkMiFuyKornwuSZnSHf+ky1QeQrZ3SHEoh4uZ3U86CznodDDTO3XS3E7ZQQnYXWFHTAoqr X-Received: by 2002:a17:902:ce8f:b0:1d0:6ffe:1e73 with SMTP id f15-20020a170902ce8f00b001d06ffe1e73mr6842895plg.86.1702640220590; Fri, 15 Dec 2023 03:37:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702640220; cv=none; d=google.com; s=arc-20160816; b=albc9jGKWVIAkk3qXp/nY9KFdbFn0eDvJl6dZgb1ep+5CPLAvRl8pTTaA07XgZx2+g r+kJZ3bBRzfUKx1SwmiY3ilR8WC10XyjDwxuz29AdaKQaBxT5jVUvNNpv0KCoNWDL1jv gQBp1dofzsyXdDh8Gz0Hahhj1/b1T/6TaX2M2bV7U76oxpn1cFYk0x11X5dKKWXwkdEQ NeF0JV6epcxutqaZNiwmrJT21PZQl96pr0fJbHBwrmoOs0EvINZVNBr8nX/gc4MPRUWG HC8yEHwof6YUUmz2ScpOj5Rw5pJJwfGCkf3dBqkhvT6j8IzZtgs0ttiltGcGKSOaKDyS EDSw== 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 :dkim-signature; bh=tYBn9/laLzrg7Vdv2MX/5C0b5odhy/gUWFCra0JFpOw=; fh=JRNH3R6BkbckLgmyv72Fq6g69IcAiTiL2Sp+o8fsz+8=; b=ZcpTXQWHDpZvZJVf5r6vwHwerluol/yTvcFsBA1ydeCYlTojhMPzfIh4t3UAlsOk2Z aR/MG1pcqLFCMRn2Vz6dtK+kph84jjBRdCqGfD+EcxJZzc7WL/ptDsqnvH+MiEytDePa 12hba6ePOYOnHNe8zuRleYImuh1XiA7rYHFTdzr783kym4fxmrJj0qEkqbQl+a/kvp7W QevbgCff5lPV2PVIm4Nr0MZEa7j9WhsTiVFiUsU6/00Qm0qzjeT/RDmps3YzDL6XGw94 t5s5+1VLpzPyq7JzlfsCKfS0RLXEM0qHUruDBOfYKbC/cV97ufhJKBqMeLDVA7NLwuco 6+Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=W7zLXBgU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id s18-20020a170902a51200b001cf5cc3029fsi5979563plq.548.2023.12.15.03.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 03:37:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=W7zLXBgU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1FD488020FDA; Thu, 14 Dec 2023 03:48:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444290AbjLNLrn (ORCPT + 99 others); Thu, 14 Dec 2023 06:47:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444225AbjLNLrJ (ORCPT ); Thu, 14 Dec 2023 06:47:09 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 361E7D7D for ; Thu, 14 Dec 2023 03:46:48 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a1ef2f5ed01so1006548166b.0 for ; Thu, 14 Dec 2023 03:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1702554406; x=1703159206; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tYBn9/laLzrg7Vdv2MX/5C0b5odhy/gUWFCra0JFpOw=; b=W7zLXBgU/MmJZmapmnyy1jmsQHZ7zVFjlgXXG1EsktOvneRpT/IuxMOOMw9WM8K56+ SWsoyZ7uC+zoDdYkq+Idik3vzN7uxAA/y3GlzqvxcJS8db8iCKB9Z72NfU0ksgPttFIL Cm0GvfuA7aEYcqrruZpkgwpb3guc/CFjPMCAh3uGWJ3TUOUtqBLlw0TMjvlbqPlvtSTc GteAnq8rhPPTKkTR0IADYOwsJsyrmkouIArwUtjlH4xvHmMM96aRCKb+038EFGSPjpGT iNytUewClQt6tYPHSsY1hhEJnRkFKdZ6BvdZcTLjK3FTah9rN8VmniVvN1ZqgP+E6VTr 2zAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702554406; x=1703159206; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tYBn9/laLzrg7Vdv2MX/5C0b5odhy/gUWFCra0JFpOw=; b=gga2nukTSbekk9RqY8KvfxGIOsYtdbMB/jiX0OtUhtxYsxjOskdO3ENAx0Js+zOhkE zpU5mpbC9z9oaxve0arLHb12AmNEpzXcbqn75YlECI9miqkc5VGIFp0RGlBKVMdpJf6S H4mdUk3FqIFqdR0Q120W5vzEYzNqXzYw3xq98wayN3LfcFWho5xTFkNMmHhOGN3RVmxS IONKr2EykkDpVqXwD9tJoZ6aa8DSbjnAStlWDF/bUWmzmnUK5wwbNCgDhnLHmDOV6aGP 9RCTregQxJkyyZ/O2jwpp0eACsM2uAkfDoqUFyIerEAjkU1FksmKGXbx0jcqLfcIYOFW mV5Q== X-Gm-Message-State: AOJu0YwEiYE+FnXc454LRhwOyDhPA7VXhyY2MEjiPogmAAkb3wPmK3c5 nvgzUePFvxeP66bFT0fKrnY9VQ== X-Received: by 2002:a17:906:197:b0:a1b:d7a5:927a with SMTP id 23-20020a170906019700b00a1bd7a5927amr2171533ejb.183.1702554406583; Thu, 14 Dec 2023 03:46:46 -0800 (PST) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.103]) by smtp.gmail.com with ESMTPSA id ll9-20020a170907190900b00a1da2f7c1d8sm9240877ejc.77.2023.12.14.03.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:46:45 -0800 (PST) From: Claudiu X-Google-Original-From: Claudiu To: s.shtylyov@omp.ru, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, p.zabel@pengutronix.de, yoshihiro.shimoda.uh@renesas.com, wsa+renesas@sang-engineering.com, geert+renesas@glider.be Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea Subject: [PATCH net-next v2 17/21] net: ravb: Keep clock request operations grouped together Date: Thu, 14 Dec 2023 13:45:56 +0200 Message-Id: <20231214114600.2451162-18-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231214114600.2451162-1-claudiu.beznea.uj@bp.renesas.com> References: <20231214114600.2451162-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:48:28 -0800 (PST) From: Claudiu Beznea Keep clock request operations grouped togeter to have all clock-related code in a single place. This makes the code simpler to follow. Signed-off-by: Claudiu Beznea --- Changes in v2: - none; this patch is new drivers/net/ethernet/renesas/ravb_main.c | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 38999ef1ea85..a2a64c22ec41 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2768,6 +2768,20 @@ static int ravb_probe(struct platform_device *pdev) if (error) goto out_reset_assert; + priv->clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(priv->clk)) { + error = PTR_ERR(priv->clk); + goto out_reset_assert; + } + + if (info->gptp_ref_clk) { + priv->gptp_clk = devm_clk_get(&pdev->dev, "gptp"); + if (IS_ERR(priv->gptp_clk)) { + error = PTR_ERR(priv->gptp_clk); + goto out_reset_assert; + } + } + priv->refclk = devm_clk_get_optional(&pdev->dev, "refclk"); if (IS_ERR(priv->refclk)) { error = PTR_ERR(priv->refclk); @@ -2801,20 +2815,6 @@ static int ravb_probe(struct platform_device *pdev) priv->avb_link_active_low = of_property_read_bool(np, "renesas,ether-link-active-low"); - priv->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(priv->clk)) { - error = PTR_ERR(priv->clk); - goto out_rpm_put; - } - - if (info->gptp_ref_clk) { - priv->gptp_clk = devm_clk_get(&pdev->dev, "gptp"); - if (IS_ERR(priv->gptp_clk)) { - error = PTR_ERR(priv->gptp_clk); - goto out_rpm_put; - } - } - ndev->max_mtu = info->rx_max_buf_size - (ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN); ndev->min_mtu = ETH_MIN_MTU; -- 2.39.2