From patchwork Sat Jul 1 20:04:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 9820969 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 6347A602CC for ; Sat, 1 Jul 2017 20:05:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55639269E2 for ; Sat, 1 Jul 2017 20:05:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49B5D2846D; Sat, 1 Jul 2017 20:05:45 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 E2B88269E2 for ; Sat, 1 Jul 2017 20:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbdGAUFm (ORCPT ); Sat, 1 Jul 2017 16:05:42 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35371 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752012AbdGAUFk (ORCPT ); Sat, 1 Jul 2017 16:05:40 -0400 Received: by mail-wr0-f195.google.com with SMTP id z45so41762338wrb.2; Sat, 01 Jul 2017 13:05: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=7PtJmRCggs7gTX7A/2PCHxnpH1bg7a+YaAZcOXF21Ks=; b=ZlK2G5mEvtxe/gtje42HvBd3Cx/nsyit80GimPCUWdW8oR+KJ0d7aDKQiFVHb8Evam OnqeO6vWs4664CuRkcqwK8xq30rerW5zP/JlILLLAibWUXX3yn7wE2EH0IywjkxkWRdZ ocnJgRaYhuMOuynKRDBvHyboKZ6IyqgW8HAgdFTxMh+p5fNJhPu2n6xJ7R+Wtj7ImbFL fbfcDa/eq0NUN+fvzMCoqI8H56dOQ5nkLgMz13sXuh/QTA1YmkRwWmoD1DVhwAhuFwab XixPpTiC64/HNTQI3N7IY7xMK5ply/wnjvdIGzQ/MicnK/NMcA80cMLueEr+rwG+kDyM 8zUQ== 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=7PtJmRCggs7gTX7A/2PCHxnpH1bg7a+YaAZcOXF21Ks=; b=M8jo8h1GqXMeGKsa2IBn6RrkKf3FLzQz+MiB+oiBhq0qfWs50G8Dv+gJGnqGroL8F+ IegTCVgl4GC0ebtRXnEHqpUujUJQ8/Wf6eji0ID5ZMFaiF7/6fISCvdQAdeCy9tHjHHs u396xs5dqGE+1uro/wSB7dkpWNG5EgFxNNfFxpSH+IzzhLOzKFGO6GMJbzCF2IIlmtEb XxKReX1+5OhX5pipEQlNQB9vdnnPbss4IwekM1rBqLK6xTva+JJ5zUV/IOTgjT0GkP3X fqelchYC9nVGtUzgXdNSUfjPjreTIX6vjVtBNudo9bJ9EcZh8nyiHniZodBe9f7HUYXm 9FqQ== X-Gm-Message-State: AKS2vOz3uzMe3/ck1Us+I2EINrD3g5grjcr4O/s5AsxgSLXi2Ry6DWKu dSC0gUO4HSGcQFJxIHA= X-Received: by 10.223.181.148 with SMTP id c20mr13384555wre.80.1498939533739; Sat, 01 Jul 2017 13:05:33 -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 s30sm18150137wrc.13.2017.07.01.13.05.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2017 13:05:33 -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 V2 3/8] clk: vc5: Do not warn about disabled output buffer input muxes Date: Sat, 1 Jul 2017 22:04:53 +0200 Message-Id: <20170701200459.11505-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170701200459.11505-1-marek.vasut+renesas@gmail.com> References: <20170701200459.11505-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 --- 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;