From patchwork Sun Jul 9 13:28:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 9831787 X-Patchwork-Delegate: sboyd@codeaurora.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 C998E602BD for ; Sun, 9 Jul 2017 13:28:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B75DE283DA for ; Sun, 9 Jul 2017 13:28:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA9B1283D8; Sun, 9 Jul 2017 13:28:41 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 42923283DA for ; Sun, 9 Jul 2017 13:28:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752194AbdGIN2k (ORCPT ); Sun, 9 Jul 2017 09:28:40 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35804 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbdGIN2j (ORCPT ); Sun, 9 Jul 2017 09:28:39 -0400 Received: by mail-wr0-f196.google.com with SMTP id z45so18889412wrb.2; Sun, 09 Jul 2017 06:28:39 -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=2GbKaNiN1Eu7C0rDJWVVv//S3icCseb0KIXZAzN6Hvk=; b=PZ9cvwiWJXMMatkHOKGjdXIq6BdEZEUf+oT2WK4U1xX7b7W1lPSK1QZe/EER9S7UkE worvms1+pRYRBxQksCTAb0GejWYFXElivHGQbEDIlWFMUoEm/6+TuFWbmKczINijH+Cu jGB4NFRRtrkvv82Y0aOnWUwXz4DW9/VsPRcJ9IafwjuwBXqSHy2xkJgWy93XumQgN9sN CpUl9dd8ruXcvRF3gsWbtHaj6b0j5qT+8Fy6oB/BpSvEokoEfcNo5VUgHOYIIMKqTeD9 lWbxcUrtjQ7DEOurEGRDRoQBhBLiq9Dj8IhCnD+NP3OSRt4u1S+iGWH9+H5BeQqhZL7u NRJg== 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=2GbKaNiN1Eu7C0rDJWVVv//S3icCseb0KIXZAzN6Hvk=; b=SpVU3ODtObwY4qUEVNOsD5JEOeYAKqqrStmz6PCV8EdvM+x0cIFUNhagWhLwOaeBVV ezf5mGblNPCY609Y7ckK5F8QxhI1NYeeuD98cwosmc+OE6AjDIAWuHQ8W8kIra9iQlGt zshg2V5UuxoISlokJ9NZtMYTgUx8dZw8NC07sFHb/382LwOPDnLsAWv0SCje6vkT1Nvp LLy5QY+2qeW0rkYuj9UmbbX3PPoAHxVsPMw61OrKgLCwEd8wAJpLsWYlk6k7cTURQQ4H OwnADJypDV0GSZUD+XllZCk6IlS0YgghruejLEoUvYdbm0AD025gS1NcKUtIOM83Ab8i GUXQ== X-Gm-Message-State: AIVw110tCfrLQyoJ3+qXdH/oK6EpDYk17CEB8GFLLcA6jEB6hb3krDHb UHMiibGvc0Ykn8B0vjQ= X-Received: by 10.28.35.201 with SMTP id j192mr4826223wmj.103.1499606918034; Sun, 09 Jul 2017 06:28:38 -0700 (PDT) Received: from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id o197sm8482585wmd.9.2017.07.09.06.28.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jul 2017 06:28:37 -0700 (PDT) From: Marek Vasut X-Google-Original-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 V3 3/8] clk: vc5: Do not warn about disabled output buffer input muxes Date: Sun, 9 Jul 2017 15:28:09 +0200 Message-Id: <20170709132814.2339-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170709132814.2339-1-marek.vasut+renesas@gmail.com> References: <20170709132814.2339-1-marek.vasut+renesas@gmail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Laurent Pinchart on Salvator-XS with the display LVDS output. --- V2: Drop chunk adding useless newline V3: None --- drivers/clk/clk-versaclock5.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index d835d48cf14d..248689d89632 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;