Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2289783pxb; Wed, 9 Feb 2022 15:17:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiYAzQ1IyW8QlpPyVQZFSr2dqSE5yWdFGPDyrIVc5PqnXSYg6I2oF2PPgKW+kOTkxRydxw X-Received: by 2002:a17:90a:e7ce:: with SMTP id kb14mr6046667pjb.202.1644448633411; Wed, 09 Feb 2022 15:17:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644448633; cv=none; d=google.com; s=arc-20160816; b=LbBxJXMZFJnV81r58UZeKfVben2tswbJF5omIMLn/tS4jPf63I8ywA7ugr6qXku1aY e6layla022QLEcVBAvtMXDOK5N19C13+X7tdFoo5zjCG8k99WpIOdHeN5w/GTRQSFxUW Z/SAxooZyVyz2c8XeCY9UxcRaqMqnkfbpiLkTmf9Ha8mTxv/i7q+3L78Ypv+fqJoueAD PxVs87vbpW3WwErdKkS6V7dVwBkMlL2SeqOxLO0He+C7pyvri0Ngz4A+IDzPUbUca9lY VVEsrEK86DBcRpqmbiBHxdL3F/R06BPtHsaSpFACzUxYa3oKqjoUYkku6NoIKrIX2Ha3 Ii6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7sNMbEN2ZWSKBSAKG7biB3FxMf95az/sXODaHaCSWMs=; b=qFy4Kbktp3gRl2dFImFNqrdqNtPpvd/4wN9b6830JYUFxsINf0yzeYepgE0CR0+J+v DNx6P4+eqQKVMABFFfwHrfCRgcQ/xIGQbY5L2RF2e/ZDKyxEcT5sBoaynqJnIDNCfOBu wXKuvyoe5w4CdfPWqPNa7k8WOkNdAxjxo9g4EPa7QWbUluEAJ6tDB0/pI/qFRlt+kv5I yp2ydPXqCPWF/jMVXoNoNr4RTuN7v5AEcKTLLeTLpirGeis/WmFn9rVLmVMnPuwoM79C 43j4kALhsL/e6WDcTdoOX5lqhi3LZSDthrjHR+jQLO1lpeznGc0A04vQ8gy3R3lwQIAM 7tpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xdcjIPjB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id my10si1322387pjb.134.2022.02.09.15.17.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 15:17:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xdcjIPjB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D63EBE054ADC; Wed, 9 Feb 2022 15:15:30 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236034AbiBIWfP (ORCPT + 99 others); Wed, 9 Feb 2022 17:35:15 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:49832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236025AbiBIWfK (ORCPT ); Wed, 9 Feb 2022 17:35:10 -0500 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFBA4E019269 for ; Wed, 9 Feb 2022 14:35:11 -0800 (PST) Received: by mail-oo1-xc2f.google.com with SMTP id 189-20020a4a03c6000000b003179d7b30d8so4220721ooi.2 for ; Wed, 09 Feb 2022 14:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7sNMbEN2ZWSKBSAKG7biB3FxMf95az/sXODaHaCSWMs=; b=xdcjIPjBdfsq47myDzGlv/zDnSvqcldTrssyKMmoNbBcmUw17fDaGp0J/7YeM0yqmg s8qWJDlGouztaI3L3dssm+Cpw12Gr8ov9SLFvidB+1pfLT8ol8I+JprQAoRBrzqqrboZ nbXLMNrQFM1FxTGR9rCmePKWeLdWhoR/y5dfoPvdJz9aFLZ+TN2pxPw6d9x/VIJuj36Z eNTwsOF1QO3RaM49fcz4iuxlbP58AFsMFNuprEf3paG49jotMgGznnttTKdpyvTJtONz AxIlSS+bv2EvMq+7ollItzv1rZG4cyXWmZORmzxdjX9tjb1Dc0LvVir9lQHsGl0NbMxu dDAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7sNMbEN2ZWSKBSAKG7biB3FxMf95az/sXODaHaCSWMs=; b=om84PQsyukY8g4jXBv+Y1rFzKxUomdAMPJsUww0bobZTLk5HGFApFe4azQwSOuuxOl jlVdo3sVhy732m5JbDQVjAoXDSvsr1zyrPgx9T5kcBB5i1/7WvOCpRsa38+1ac9rWBNn ASta+ahX8NB6QGFocT1yXVaHV7nBmwR7KUNU8j5XIOQMJcF7oqTl/q4hkEuFMOYhQyAl fYFlOkEMDVmKVEAGVirxoIJ7h9NuijYDG0XASWiXvuj4fbIqLt2t8/3aU3vk12PnyKk3 ao6jyYntv93SzXVuvLtuIJ7tRG9Gs3x5F8uaiuiPmRtswupJDpXiTiRQ6PHrEYjUINLS 931w== X-Gm-Message-State: AOAM5330QrUwlSRVNv2IWnSt+LKTmjScN3pO5eSXStlTGpEnzBEQCyFQ 3CwN5kD4ttK/QG6fASh95DJotA== X-Received: by 2002:a4a:e1cb:: with SMTP id n11mr1840337oot.46.1644446111200; Wed, 09 Feb 2022 14:35:11 -0800 (PST) Received: from builder.lan ([2600:1700:a0:3dc8:3697:f6ff:fe85:aac9]) by smtp.gmail.com with ESMTPSA id s64sm7233725oos.0.2022.02.09.14.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 14:35:10 -0800 (PST) Date: Wed, 9 Feb 2022 16:35:08 -0600 From: Bjorn Andersson To: Taniya Das Cc: Stephen Boyd , Michael Turquette ? , Rajendra Nayak , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [v1 1/2] clk: qcom: gdsc: Use the default transition delay for GDSCs Message-ID: References: <20220209172513.17873-1-tdas@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209172513.17873-1-tdas@codeaurora.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 09 Feb 11:25 CST 2022, Taniya Das wrote: > Do not update the transition delay and use the default reset values. > > Fixes: 45dd0e55317cc ("clk: qcom: Add support for GDSCs) > Signed-off-by: Taniya Das > --- > drivers/clk/qcom/gdsc.c | 6 +++++- > drivers/clk/qcom/gdsc.h | 1 + > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c > index 7e1dd8ccfa38..e7b213450640 100644 > --- a/drivers/clk/qcom/gdsc.c > +++ b/drivers/clk/qcom/gdsc.c > @@ -380,7 +380,11 @@ static int gdsc_init(struct gdsc *sc) > */ > mask = HW_CONTROL_MASK | SW_OVERRIDE_MASK | > EN_REST_WAIT_MASK | EN_FEW_WAIT_MASK | CLK_DIS_WAIT_MASK; > - val = EN_REST_WAIT_VAL | EN_FEW_WAIT_VAL | CLK_DIS_WAIT_VAL; > + > + regmap_read(sc->regmap, sc->gdscr, &val); > + > + if (!(sc->flags & DEFAULT_TRANSITION_DELAY)) I dug a little bit more into this and noticed that on various platforms CLK_DIS_WAIT_VAL for the GPU_CX GDSC is supposed to be 8 (whereas both hw default and CLK_DIS_WAIT_VAL is 2). I'm not able to find anything helpful in the git log describing what the value does, but it seems that a "just use hw default" flag won't cut it for this scenario. Regards, Bjorn > + val |= EN_REST_WAIT_VAL | EN_FEW_WAIT_VAL | CLK_DIS_WAIT_VAL; > ret = regmap_update_bits(sc->regmap, sc->gdscr, mask, val); > if (ret) > return ret; > diff --git a/drivers/clk/qcom/gdsc.h b/drivers/clk/qcom/gdsc.h > index d7cc4c21a9d4..1bd3ecdd0b0a 100644 > --- a/drivers/clk/qcom/gdsc.h > +++ b/drivers/clk/qcom/gdsc.h > @@ -53,6 +53,7 @@ struct gdsc { > #define ALWAYS_ON BIT(6) > #define RETAIN_FF_ENABLE BIT(7) > #define NO_RET_PERIPH BIT(8) > +#define DEFAULT_TRANSITION_DELAY BIT(9) > struct reset_controller_dev *rcdev; > unsigned int *resets; > unsigned int reset_count; > -- > Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member > of the Code Aurora Forum, hosted by the Linux Foundation. >