From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757652AbbICRXL (ORCPT ); Thu, 3 Sep 2015 13:23:11 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:3733 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757631AbbICRXJ (ORCPT ); Thu, 3 Sep 2015 13:23:09 -0400 Date: Thu, 3 Sep 2015 10:22:59 -0700 From: Bjorn Andersson To: Georgi Djakov CC: Stephen Boyd , , , , Subject: Re: [PATCH v2 1/2] clk: qcom: Add support for RPM Clocks Message-ID: <20150903172259.GV13472@usrtlx11787.corpusers.net> References: <1438620489-32515-1-git-send-email-georgi.djakov@linaro.org> <1438620489-32515-2-git-send-email-georgi.djakov@linaro.org> <20150902203154.GA15099@codeaurora.org> <55E869F2.5020008@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <55E869F2.5020008@linaro.org> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 03 Sep 08:40 PDT 2015, Georgi Djakov wrote: > Hi Stephen, > > On 09/02/2015 11:31 PM, Stephen Boyd wrote: > > On 08/03, Georgi Djakov wrote: > >> diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c > >> new file mode 100644 > >> index 000000000000..e564673ec3a5 > >> --- /dev/null > >> +++ b/drivers/clk/qcom/clk-smd-rpm.c > > [..] > > >> +static int clk_smd_rpm_set_rate(struct clk_hw *hw, unsigned long rate, > >> + unsigned long parent_rate) > >> +{ > >> + struct clk_smd_rpm *r = to_clk_smd_rpm(hw); > >> + int ret = 0; > >> + > >> + if (r->enabled) { > >> + u32 value; > >> + struct clk_smd_rpm *peer = r->peer; > >> + > >> + /* Take peer clock's rate into account only if it's enabled. */ > >> + if (peer->enabled) > > > > This peer stuff almost doesn't even matter because we're only > > sending active set requests. Why can't this code be updated to > > send both active and sleep set requests? The sleep set stuff > > won't be cached, etc., but I don't see a problem in doing both. > > Otherwise we should drop all the peer stuff until we introduce > > active only clocks. > > Initially I tried sending both active and sleep sets, but as they are > not cached like in downstream (yet) i got hangs during boot. Disabling > caching in downstream kernel also caused the same hangs, so i left > this out for now. Will try debugging it further. > This sounds odd, although I presume the downstream code is rarely/never tested with the caching disabled. Can you please retry this with [1] applied (should be in -next), the RPM fifo is tiny, so I would not be surprised if this could be your problem. [1] https://lkml.org/lkml/2015/8/24/756 Regards, Bjorn