From patchwork Thu Jun 29 10:18:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 9816337 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9E0576020A for ; Thu, 29 Jun 2017 10:19:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91D79285D9 for ; Thu, 29 Jun 2017 10:19:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 86C9E2869A; Thu, 29 Jun 2017 10:19:36 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 292C2285D9 for ; Thu, 29 Jun 2017 10:19:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752547AbdF2KTf (ORCPT ); Thu, 29 Jun 2017 06:19:35 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36404 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbdF2KTe (ORCPT ); Thu, 29 Jun 2017 06:19:34 -0400 Received: by mail-wr0-f196.google.com with SMTP id 77so36340122wrb.3; Thu, 29 Jun 2017 03:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Lj7QAejhTOqVVpvPJAOJ/jlxm0cu6LkLqtDkDE9GXs4=; b=P1OQxJC+ggLsSTDEqXWDCJ8Vf+anZq9XWuVSgf2y3AaXtmYrWcDgSGt0e46JcjRp10 huzO0uX3WiGg2nI7ujPDOFN+oSpSFcBt+u90VtUSHtymsrloo6bq//1LSMF4MgIuET9+ USUSYBPFZdfQ154QACdhwwrwMI2oSzPJzWv26YVBTyJZciCWkV0WHf0LXqASs4M4ztQp 8N2q3ByZ694AK912TOZrKpbunScbYOu2TIoluPTat3aJpt0k/k6td8qghR6hnoOFq4s3 EE1lx1CFey0aL3QcELLPB53xs0vKAGrL7Du3gR1QsWs3z+WyYnlhzfnOpRi6+ueOTtC+ HSVQ== 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:in-reply-to :references; bh=Lj7QAejhTOqVVpvPJAOJ/jlxm0cu6LkLqtDkDE9GXs4=; b=AyIia+/a6N7oClisyhrtVbZeBCOs4IjbYzjArf05XLL2VYhrGSixHOhRzMNWH3wyqs jihuMDh/XvRjswm6GxO9xWSlncWEzZUTA/WcI6KXb7W0DX/A1sy4+B2mbjMpbzLe/BKO NE86I+k7Xj0kxDzHh8OiRaNbrW1RTiKDA8d4IUgAueXj82tN7tFjbi9socFUmZOu5Pg8 VyyqbEFQy01medLd8BT2+4jnYR9qwVlHpVjMLzPEmXVgcJ3LFFO7BeOhQ6/4m7lHfiN7 ay94WkI/0TyxedDeaeHeUMoiEIGlYItdXzBZBnuui5oSbwbPqlcC0dyCUC005oTYsKDf uG5w== X-Gm-Message-State: AKS2vOz9vMkK/6Zg9GXHRPga498Chui4tsTs24sldGewXiHGggL65u5K lbhTUEOnIrM345x3224= X-Received: by 10.223.165.13 with SMTP id i13mr24172683wrb.35.1498731573162; Thu, 29 Jun 2017 03:19:33 -0700 (PDT) Received: from chi.lan (cst-prg-169-255.cust.vodafone.cz. [46.135.169.255]) by smtp.gmail.com with ESMTPSA id t74sm7623653wmt.19.2017.06.29.03.19.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 03:19:32 -0700 (PDT) From: Marek Vasut To: linux-clk@vger.kernel.org Cc: Marek Vasut , Stephen Boyd , Alexey Firago , Michael Turquette , Laurent Pinchart , linux-renesas-soc@vger.kernel.org Subject: [PATCH 3/8] clk: vc5: Do not warn about disabled output buffer input muxes Date: Thu, 29 Jun 2017 12:18:46 +0200 Message-Id: <20170629101851.23972-3-marek.vasut@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170629101851.23972-1-marek.vasut@gmail.com> References: <20170629101851.23972-1-marek.vasut@gmail.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marek Vasut The output buffer input mux can be configured in either of three states -- disabled, input from FOD, input from previous output. If the output buffer input mux is set to disabled, the code in vc5_clk_out_get_parent() would consider this an invalid setting and warn about it, which is not necessarily the case. In case the output buffer input mux is disabled, default to input from FOD to have some parent and don't print the warning. Signed-off-by: Marek Vasut Cc: Stephen Boyd Cc: Alexey Firago Cc: Michael Turquette Cc: Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org --- drivers/clk/clk-versaclock5.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index d835d48cf14d..766fcc5cc0b3 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -541,6 +541,9 @@ static unsigned char vc5_clk_out_get_parent(struct clk_hw *hw) regmap_read(vc5->regmap, VC5_OUT_DIV_CONTROL(hwdata->num), &src); src &= mask; + if (src == 0) /* Input mux set to DISABLED */ + return 0; + if ((src & fodclkmask) == VC5_OUT_DIV_CONTROL_EN_FOD) return 0; @@ -549,6 +552,7 @@ static unsigned char vc5_clk_out_get_parent(struct clk_hw *hw) dev_warn(&vc5->client->dev, "Invalid clock output configuration (%02x)\n", src); + return 0; }