From patchwork Fri May 3 21:22:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10929205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 536751395 for ; Fri, 3 May 2019 21:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43EC628714 for ; Fri, 3 May 2019 21:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37E8728796; Fri, 3 May 2019 21:22:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D79F928714 for ; Fri, 3 May 2019 21:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=t/L0q9IZiCKWBSGWykEwXq3eJj39LQnM2JjALhpT3qk=; b=FP1n6ck8DTmu42 OOiH/2c3OamQvxHu9StJ6RsruKTBElG/+/q1JcG8E/8P+nqiy7YVLh6qvnTgW9Xc4JXz9LGY2dPRT GKc/apjkPQ1CfWcPdUDX4JbCFb6Sj1nwrOYE3NDD9u54bnXymHDB28w1BVOg2L+q9r1jryRl9ahmr +yeQLp0z1Tmgz2SwSA4z7a9YgpuzwXdEIh/0D0pHhEk53cIHKkdECxF9jW5nl+wIlOKZGh6sibQSF gj8gV/kDAggJIB8CpPfiE8N3HbKo9Ku6/LDcvjNj14czSS0P8ot+e3IPpEfRerwvEgjYehistNYq0 3bPyc3wh1/90Gb7HqJRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMfdT-00033L-Gb; Fri, 03 May 2019 21:22:27 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMfdQ-00032I-QW for linux-rockchip@lists.infradead.org; Fri, 03 May 2019 21:22:26 +0000 Received: by mail-pf1-x444.google.com with SMTP id 13so3177514pfw.9 for ; Fri, 03 May 2019 14:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AZfe6Xnlp8VFcttQXUP5Y4s8do4K2Dab61b+eO+6utA=; b=Ywbl7kJHsqNmfa+P0RIOnALkQVqOBZ3rOjAKRARApKe6qorHXO9plEnJ/E6KwmYq9p zZLP1ryFyIwSpDYvxAgWBdgSVsDbm8/Y40/VsTq7CjRlcbtLl6TmN18VUjgl0m4+nbGn Y+IoChQEJB/RlVWi/5OUaY6N6KwVRUrqKLgH4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AZfe6Xnlp8VFcttQXUP5Y4s8do4K2Dab61b+eO+6utA=; b=e8xLuZvJN4CvzPAa/CZWPea0dOoFM1scyHArk/9Xkn2GVW8xSs/6uHJ0QyU7o2K4P1 RmZ++mN6WeW+cZWnTca00RppLNI6N8D7i6+rn7/zwLlVO3aA4Nrd5plp3sjfOc0UTx5R MWnJaoLhQxXIe/7OIEdCJf7UD7nNG9YQCCcXjAVR/vcklLlweYHzlAAxD6hapfHLav/j B6tS5WeHPq5tSf18BoKHetOD2kLY1MVxEw573RDCc/xHTAL7gjaEym0sxQ8MXtQ3v20E gJwF8dLF74jdVbM/pxV1Nzbp8+CE/rifXmPUjnMVdAzrLe7Ew1F0X3vWckCv39WwXJAA 87fg== X-Gm-Message-State: APjAAAVxIG1LZosQWa7v2BnyYlRPtu4dnzCNRJkAOpQnPxr2xS39ijSk +PbIC0UypAKABCqdExl1YXuOdg== X-Google-Smtp-Source: APXvYqxHbkpyVU3AFiwBC4zYibpjEWUdOnTxjcv/gquMISFOa13IJ3gYibHW3sbdWh1EyzOUBzcDlA== X-Received: by 2002:a62:3501:: with SMTP id c1mr14483708pfa.184.1556918542223; Fri, 03 May 2019 14:22:22 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id b77sm9206722pfj.99.2019.05.03.14.22.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2019 14:22:21 -0700 (PDT) From: Douglas Anderson To: Heiko Stuebner , Shawn Lin Subject: [PATCH] clk: rockchip: Don't yell about bad mmc phases when getting Date: Fri, 3 May 2019 14:22:08 -0700 Message-Id: <20190503212208.223232-1-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190503_142224_888380_78D761BF X-CRM114-Status: GOOD ( 12.71 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hal@halemmerich.com, Stephen Boyd , Michael Turquette , Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, mka@chromium.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP At boot time, my rk3288-veyron devices yell with 8 lines that look like this: [ 0.000000] rockchip_mmc_get_phase: invalid clk rate This is because the clock framework at clk_register() time tries to get the phase but we don't have a parent yet. While the errors appear to be harmless they are still ugly and, in general, we don't want yells like this in the log unless they are important. There's no real reason to be yelling here. We can still return -EINVAL to indicate that the phase makes no sense without a parent. If someone really tries to do tuning and the clock is reported as 0 then we'll see the yells in rockchip_mmc_set_phase(). Fixes: 4bf59902b500 ("clk: rockchip: Prevent calculating mmc phase if clock rate is zero") Signed-off-by: Douglas Anderson Reviewed-by: Heiko Stuebner --- drivers/clk/rockchip/clk-mmc-phase.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c index 026a26bb702d..dbec84238ecd 100644 --- a/drivers/clk/rockchip/clk-mmc-phase.c +++ b/drivers/clk/rockchip/clk-mmc-phase.c @@ -61,10 +61,8 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw) u32 delay_num = 0; /* See the comment for rockchip_mmc_set_phase below */ - if (!rate) { - pr_err("%s: invalid clk rate\n", __func__); + if (!rate) return -EINVAL; - } raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift);