Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp110028iob; Tue, 17 May 2022 20:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLIYwKjNWW7LBgNBRVHbWUuLeQqeEyxoAUFl81Ek5PNPUF6BoOVyMe2xMfnQui25kPN+HU X-Received: by 2002:a17:902:820e:b0:161:b3df:46ea with SMTP id x14-20020a170902820e00b00161b3df46eamr4321915pln.13.1652844693113; Tue, 17 May 2022 20:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652844693; cv=none; d=google.com; s=arc-20160816; b=PQrUSme8uI4LXd42uc45GpsQ7OTrUdlqcqS+x1MgUMddz3l1XZ3F27GLCKcDYKi3VH S9dYjAGv1G4Y0c+jFtvWihWZp7WjkMmlZrUzhJNhZBCyy7b9Ikf8f+ZdtGqVl5MSrExi 5YBiem29NH/8pgpKIB2MVsRSnLbopiAg4HASh2Ugv34erLpXRuxLXm0K4JqGpZ2zc/fT v2EYdnhr+x7zoKknJryvLxkIfdUxK8/Y0trAlO9I8qCeFspobdFFb6rd8Qem1BfCy/He +nzwXp/F5fLmXHMNBbkokHknHG5TI+Bife0xep8erW+idQlGkg1hO+xdkdsqafIQuuEz 8oFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WX9lP7cN1XhMLxAyp1fuinpNzyHjtW9iix4zXAbknMw=; b=lz7MFO9j/7n2P1QkTwsxZjKqEzpKzz8/JtYd+TEXbOAHIaVpfdazSpwlvZrexEETrV vGt7/gmM3RTKDN9iwKCEgJpHA3qHJZguCD/UK9z1hf/+3M+WumtVl4Ofi2aj3qM7i8XZ gSAfk+zsYu0l7T9IWsaO2KunJksS5BTK0NqJl3RWtM2hsrgnEOxeQSaeXtZ9clMjISu4 qgj9X1gP56LdsGFOzbTPq2sTYUUxKi/NcUZa+dEWwL89stm95oucJMt8eGodSZr9WISs cEImwqujZmF/93dFPxJGnLzZLrJZ/+gXDDOLO6vDm5CbTYxo/DPDrMGkG3/GzqQ2HHli P+Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z8ufLbQ+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h2-20020a170902b94200b001616793df50si1158337pls.263.2022.05.17.20.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:31:33 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z8ufLbQ+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 551565B3E3; Tue, 17 May 2022 20:25:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349575AbiEQTJ4 (ORCPT + 99 others); Tue, 17 May 2022 15:09:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344856AbiEQTJx (ORCPT ); Tue, 17 May 2022 15:09:53 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7A9E13D4A for ; Tue, 17 May 2022 12:09:51 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id l20-20020a17090a409400b001dd2a9d555bso3153215pjg.0 for ; Tue, 17 May 2022 12:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WX9lP7cN1XhMLxAyp1fuinpNzyHjtW9iix4zXAbknMw=; b=Z8ufLbQ+4mZKJyLdDDFC62aZ5/hDqWVFsdPEZUe33bzH3AdGyPj61awGDS5cNbbHDg W0naIEoFAgkHlY99tWGdn5v6aLiFChtOCWg8sJMnXMl7EZ0442nl51aORC6xH7dmy/JF XiGHxnjy8cCUW0mftFfTsk9zgCOzTxU4pzhd0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WX9lP7cN1XhMLxAyp1fuinpNzyHjtW9iix4zXAbknMw=; b=2kbnJX/TTrGMk7UZXATJbD++9Qe9o+upq+AV3Pp0DFWv9Rpblz+0bAxGoah923pTEV nyycmbT8k0VOkM0zvrNF8ngbX2HKJ78Hs7xGKtUkObzHfjN6xa706RtLCYCntW29drff GrAIP9nZR6MYTOTIgcyLLw7/RWL+ZcU0ySo8iEm9bG9Gomucm/wHOUFDWGaNBL+jYgg/ 1HTgMnwVwUoK/QJ/2yYIy8dhfYfMsjYmqCW0RF5Yj0RHzogSSBiDQsnWGJanSTn6/tyt TxF+A7ORsLG8NxFXhQ0ieRrlzthr54mbg/oFNrrc9BFvk2k7J+h3KdWITu9gZysKtidF Fo2Q== X-Gm-Message-State: AOAM533QnVJDOJuMA+GY4sIyp1GCdcmWJxrD40Is91R5HHQx7hoDBGq6 0lEkIb1UrSRshptQ0LcIcmgLDA== X-Received: by 2002:a17:903:1211:b0:15e:8208:8cc0 with SMTP id l17-20020a170903121100b0015e82088cc0mr23524064plh.52.1652814591197; Tue, 17 May 2022 12:09:51 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:be81:6c26:5643:b3d9]) by smtp.gmail.com with ESMTPSA id f16-20020a170902ab9000b0015e8d4eb246sm9498265plr.144.2022.05.17.12.09.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 12:09:50 -0700 (PDT) From: Stephen Boyd To: Michael Turquette , Stephen Boyd , Bjorn Andersson Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, linux-arm-msm@vger.kernel.org, Alex Elder , Taniya Das Subject: [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs Date: Tue, 17 May 2022 12:09:49 -0700 Message-Id: <20220517190949.2922197-1-swboyd@chromium.org> X-Mailer: git-send-email 2.36.0.550.gb090851708-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 The sleep/wake state doesn't need to be set here because of specific RPMh behavior that carries over the active state when sleep/wake state hasn't been modified. Add a note to the code so we aren't tempted to set the sleep/wake states. Cc: Alex Elder Cc: Taniya Das Signed-off-by: Stephen Boyd --- This superseedes a previous patch[1] I sent that tried to fix this. drivers/clk/qcom/clk-rpmh.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index aed907982344..c07cab6905cb 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -274,6 +274,11 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable) cmd.addr = c->res_addr; cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state); + /* + * Send only an active only state request. RPMh continues to + * use the active state when we're in sleep/wake state as long + * as the sleep/wake state has never been set. + */ ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable); if (ret) { dev_err(c->dev, "set active state of %s failed: (%d)\n", base-commit: 42226c989789d8da4af1de0c31070c96726d990c -- https://chromeos.dev [1] https://lore.kernel.org/r/20220412194505.614002-1-swboyd@chromium.org