From patchwork Mon Jul 17 15:35:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 9845497 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 9FF2960392 for ; Mon, 17 Jul 2017 15:36:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9142428531 for ; Mon, 17 Jul 2017 15:36:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85F0528554; Mon, 17 Jul 2017 15:36:16 +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_SIGNED, 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 2D53A28531 for ; Mon, 17 Jul 2017 15:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751346AbdGQPft (ORCPT ); Mon, 17 Jul 2017 11:35:49 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:33150 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338AbdGQPfq (ORCPT ); Mon, 17 Jul 2017 11:35:46 -0400 Received: by mail-wr0-f171.google.com with SMTP id a10so13786085wrd.0 for ; Mon, 17 Jul 2017 08:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=12i/ukzikjnQAmTixpKtQwmdSeC3JQn1H1hnVxNky4A=; b=kc2O+TG7Mzdc9n8kTD15vv5Ak70rd6TIt3/0qSAgqX4pDeaXZ8wHfa6mmlK2ruO8Vj fMeupRdaVBJKI5/RsMXvbEa9sLyTeO4xADr4z9pxrgGpF1EmWTJIl/epi0n3/O7blKUx 3MsIfrOlSaQD9sPJCxkfighvhdOj5yeL1sDMU= 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=12i/ukzikjnQAmTixpKtQwmdSeC3JQn1H1hnVxNky4A=; b=bQ/ntK0Dwyn2BHYEhNpyKre9E4gH2Tr2c0zrGARcXuzONb6kPAudNRofsQxC6UMxGB EG052FAhyRwIpxmXtJwUa3sihZVqq2xvhHyFCryuXzZSSJPM1n0zptmEkxL9hiKVVGnc GQsNxhGvVRZK6YdpUKXU1y06S/wakXAXfKTXDcaknDcG23G5AcVfLgh1AMVEzN11O5tt hD29iIZiumivYidvFqZ4Kp58PIjyVqh/oqcPWWifh3N5658YUb715Hg5ukaB/P9iX9sn +7h1rghMKMF7/mBZ9fZHwUrJKfO/e65frjcwmHbZdvgkGSmNPmLvqjIkZiN3MWbRGU12 UCdQ== X-Gm-Message-State: AIVw113G8u1TBv5ewS8o3YKVWHkmrj/Mj0LT0w9t35Pg4MFhEIq2eZ+9 giV1iP9Sex0KrsID X-Received: by 10.223.132.133 with SMTP id 5mr11266609wrg.132.1500305745024; Mon, 17 Jul 2017 08:35:45 -0700 (PDT) Received: from mms-0441.qualcomm.mm-sol.com ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id h68sm3074758wrh.32.2017.07.17.08.35.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 08:35:44 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org Cc: mturquette@baylibre.com, andy.gross@linaro.org, architt@codeaurora.org, hverkuil@xs4all.nl, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v3] clk: qcom: clk-smd-rpm: Fix the reported rate of branches Date: Mon, 17 Jul 2017 18:35:42 +0300 Message-Id: <20170717153542.21676-1-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170713180332.GC22780@codeaurora.org> References: <20170713180332.GC22780@codeaurora.org> 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 As there is no way to actually query the hardware for the current clock rate, now racalc_rate() just returns the last rate that was previously set. But if the rate was not set yet, we return the bogus rate of 1000Hz. The branch clocks have the same rate as their parent, so in this case we just need to remove recalc_rate ops and then the core framework will handle this automagically. The round_rate() is unused, so remove it as well. Reported-by: Archit Taneja Fixes: 00f64b58874e ("clk: qcom: Add support for SMD-RPM Clocks") Signed-off-by: Georgi Djakov --- drivers/clk/qcom/clk-smd-rpm.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c index d990fe44aef3..cc03d5508627 100644 --- a/drivers/clk/qcom/clk-smd-rpm.c +++ b/drivers/clk/qcom/clk-smd-rpm.c @@ -412,8 +412,6 @@ static const struct clk_ops clk_smd_rpm_ops = { static const struct clk_ops clk_smd_rpm_branch_ops = { .prepare = clk_smd_rpm_prepare, .unprepare = clk_smd_rpm_unprepare, - .round_rate = clk_smd_rpm_round_rate, - .recalc_rate = clk_smd_rpm_recalc_rate, }; /* msm8916 */