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: 107995 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4668547qge; Mon, 17 Jul 2017 08:35:55 -0700 (PDT) X-Received: by 10.98.71.203 with SMTP id p72mr7860084pfi.106.1500305754885; Mon, 17 Jul 2017 08:35:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500305754; cv=none; d=google.com; s=arc-20160816; b=mN0icy9RQaFm6DAf2u+IjbZ+4pRxlg3Ma2zl6inECy5/v8B4pMI85yOId5zmqfqLD3 kej011v9Kt0SEx9erUtWvgUrMBG+eghzQxOeqvJWFAoogsPxUcHbt+v5cNCahQ12DiVI pc6bRoG5/Aw7FZliTASvOk6PDygVoDxeJZcEkO+s9FZ1kPrar5l0VmCz41ybxLBJ084N X4htTerffKxquqZHpUtHOvYEhUOR/riKxT2B3Ki7cbD0H5pTm5FYL3Qo3quShRp7pWy5 jAPcJha26OSziGnfNKHvL99kkF7w6xAZvChQ78+zFZcQoEsamc+H8hmXdpdsA9qXX6H6 HPAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=12i/ukzikjnQAmTixpKtQwmdSeC3JQn1H1hnVxNky4A=; b=BeFBthWSPwGXg0kAWE8VAd4PvDax/zP3JM1GDnkIHi3z4ruKGyp9BpTMt2bJTcfx4t 6mJtsZ7OjrOn3p+Is4MhmA6EuQACn5llp5j8anUT+rl8bJMavgbTzsrf4tYZuTxVTiNT 4W6NJvXk1qXavooO+4Vepsq9UIw7vXvDPpfV7KYRj7vsdmPvQ41Z0Ev4XXM9J0PmJrq5 v4uuuJInCufm0XsCxH3Go1HNdfGZSaalgwqmix65cwcZNjUo8VD/G2CZF3JTjGrmm/74 cyRo3c3dYljvUZDUJ2SO3rTXcznP2l3kFfWV6TBOXokeNelzSjIKRMFzJDGeaTWHQAut l76g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=kc2O+TG7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90si13217876plc.78.2017.07.17.08.35.54; Mon, 17 Jul 2017 08:35:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=kc2O+TG7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393AbdGQPfv (ORCPT + 25 others); Mon, 17 Jul 2017 11:35:51 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:33150 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbdGQPfq (ORCPT ); Mon, 17 Jul 2017 11:35:46 -0400 Received: by mail-wr0-f170.google.com with SMTP id a10so13786082wrd.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=GnhqsLoaxj2lTAFtutnXSzZ+i7yBG+FAomAeoSdIAQe9TgSrOo5HbjzDbBSFMJeWgk 3sClk2FNZcvm0LbX2oWZwaTLoTj8fjJIgBMkUIM1iFeM6jq6mxApeG6B1UGROvxWz5bC O6KFynBGTaGkr7dwMqssp3sbWYCf5pNsZmPDrGHdJg1+ZGmczElXa2DHSYV/5xAWAR9v ZjgmcKsTj/8DC8YWh0hPCsu6bdhkkLV2KCAXEPC0FUPIcn0MYQvytKYuY/dob85FaBR0 0hrBRDnLXSKQd0Xxg6GcU5DZ6IpUUA8/GQFGtsiRdJyZZM/VjjIrkxraGBkWLQ7HWSCv MVdw== X-Gm-Message-State: AIVw112PMSnp1guYAy0qkhrd5UMbTLb6FRfPbPnIMTQISxTb/vBi9glf oUeg8mjsTLTEhj5X 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) 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 */