From patchwork Mon Feb 8 13:56:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 12075599 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3506BC433DB for ; Mon, 8 Feb 2021 14:07:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF9BC64E2E for ; Mon, 8 Feb 2021 14:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232083AbhBHOGr (ORCPT ); Mon, 8 Feb 2021 09:06:47 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:57090 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231717AbhBHN6f (ORCPT ); Mon, 8 Feb 2021 08:58:35 -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 22/24] net: stmmac: Call stmmaceth clock as system clock in warn-message Date: Mon, 8 Feb 2021 16:56:06 +0300 Message-ID: <20210208135609.7685-23-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 X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org By all means of the stmmac_clk clock usage it isn't CSR clock, but the system or application clock, which in particular cases can be used as a clock source for the CSR interface. Make sure the warning message correctly identify the clock. While at it add error message printout if actual CSR clock failed to be requested. Signed-off-by: Serge Semin --- 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/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index a6e35c84e135..7cbde9d99133 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -573,7 +573,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) STMMAC_RESOURCE_NAME); if (IS_ERR(plat->stmmac_clk)) { rc = PTR_ERR(plat->stmmac_clk); - dev_err_probe(&pdev->dev, rc, "Cannot get CSR clock\n"); + dev_err_probe(&pdev->dev, rc, "Cannot get system clock\n"); goto error_dma_cfg_alloc; } clk_prepare_enable(plat->stmmac_clk); @@ -581,6 +581,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) plat->pclk = devm_clk_get_optional(&pdev->dev, "pclk"); if (IS_ERR(plat->pclk)) { rc = PTR_ERR(plat->pclk); + dev_err_probe(&pdev->dev, rc, "Cannot get CSR clock\n"); goto error_pclk_get; } clk_prepare_enable(plat->pclk);