From patchwork Sat Sep 14 08:18:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13804311 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 1B28CC02181 for ; Sat, 14 Sep 2024 08:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=A/NMzLz8Tuxq/gt5dPNpj6i4kHuPhRrw0hNedu0YR04=; b=yyRNyK0HDhVUAIUf+bnwisyRpq EEnQZmdKMbWTnnAryOURIRxRU8vpmSuoFm+xZI7ibOVljXawvkUDfPGFjVqaC65feNh0q42MBln0w Pc3hHo3B2/z0fBahH4pXvu+6wr+xgEWpDjhcH7TjLC79ExfhRAghxf33v38mJU2V/HVGs6m+F4N37 s1+9pO29h9wWS+SR0RVyaIkctgs1PfTI78OzAkRSx94Il8+OS3dloohs59a9gmv381MN9N4P3Audv X338casvIoDtNtc1nogaYgdmiuTMF037BKypnR4nCSGrso3y9RahvSnKNki/YVQwiNSVU+cLNZaGB s22Rv+PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1spO0T-00000000LnI-2nHP; Sat, 14 Sep 2024 08:19:49 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1spNzO-00000000Le7-2ylk for linux-arm-kernel@lists.infradead.org; Sat, 14 Sep 2024 08:18:44 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7A35D40007; Sat, 14 Sep 2024 08:18:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726301917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=A/NMzLz8Tuxq/gt5dPNpj6i4kHuPhRrw0hNedu0YR04=; b=ImkbUKGPiXQbqZnvZeefqE2T+XlO2xqBLvMzz3ERKEgEJWWoHmlKvoBW5skj91waHHidgv /FEQzgtpvoMZo9T9Y/V8u2LGvlhVQ8CBI5nRGcqIGG123RU7DDzNtE9duTZAzHcZ6LjHcW pvwxS/OWtZG0Q+LQWyRytZcmvrkqz6gD9g3V8QyOCRBvhOuCGo91vV0VsPF9nNui35p1+V Sg8y37iBy4OrvXlaocl4HH5SR84ftgMrzCvg7zLObpdybaqRVTZw8E9MvL9E2yuosmMkrM 5Vp7tkKhRk4v3TSskKkYMqjYQPbhneUaoRT9obs82MhbcvNie6V96euuw9LBdw== From: Maxime Chevallier To: davem@davemloft.net, Pantelis Antoniou Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Christophe JAILLET Subject: [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional Date: Sat, 14 Sep 2024 10:18:20 +0200 Message-ID: <20240914081821.209130-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240914_011842_901073_00E2448A X-CRM114-Status: GOOD ( 10.65 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some platforms that use fs_enet don't have the PER register clock. This optional dependency on the clock was incorrectly made mandatory when switching to devm_ accessors. Reported-by: Christophe JAILLET Closes: https://lore.kernel.org/netdev/4e4defa9-ef2f-4ff1-95ca-6627c24db20c@wanadoo.fr/ Fixes: c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors") Signed-off-by: Maxime Chevallier Reviewed-by: Christophe JAILLET --- This patch fixes a commit in net-next. drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index d300b01859a1..3425c4a6abcb 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c @@ -895,7 +895,7 @@ static int fs_enet_probe(struct platform_device *ofdev) * but require enable to succeed when a clock was specified/found, * keep a reference to the clock upon successful acquisition */ - clk = devm_clk_get_enabled(&ofdev->dev, "per"); + clk = devm_clk_get_optional_enabled(&ofdev->dev, "per"); if (IS_ERR(clk)) goto out_free_fpi;