Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp48515lqh; Wed, 27 Mar 2024 14:27:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVruNrZygXBOa1SuSte/mYIYujloTIOlf8/v44Q0cCif+vbelXcgQsCzeJxMPJaWOdSwJrMaHTyU7DuaJOfyoq7WnCJEZfpqoW+Lm3TJA== X-Google-Smtp-Source: AGHT+IGjg9QYNQHaMyexmIiU+Rses0q0idIy3vuut2tvJ+pQzInHlFAm3WSz9M+nIIY+ejlu+tAK X-Received: by 2002:a17:907:98e:b0:a47:3322:4a6d with SMTP id bf14-20020a170907098e00b00a4733224a6dmr518790ejc.21.1711574851622; Wed, 27 Mar 2024 14:27:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711574851; cv=pass; d=google.com; s=arc-20160816; b=K4DuiETqAsuJn4w4cbW6ppbugSnkYdp6AyrtL4yDjIouyUQLIyTseEfPPh6gn2Qrmc Q5ag2Ogz2jhybxVzT5jtWYknjo09WsrNu4F7JtCQTipek3gSCYHOMVqpCNZo7Z9rDZom oDoFEY3XTczSv7SnhM71GQ4KPnlEyCE9WvWxAz/uUvwFkbok6VVhKvqGMnmXmdMQ2kvP OcMe0Ls+r3p4GJyHLP8ugYDGzjAzdIfD4ltI5+ptt3jmhi5j7IxoRqErip00sznuvSAB kgHcKmURA2UBKFqTWdvr1RHOp/KrfouEIxPh8si8oNm8iXsVU9g4PFOt2cOZn/LDCZq0 3LAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=K+tGtRil4SrQkzoQjrHa8/2JGLOrwO/8SeqSS+CQSpY=; fh=yL9I6px0NfiPuZsSR05xZdwx404AEpza0M9Qohw+HnM=; b=uaqUvmIMovbBsd8j24oC2S1HsH9Oc7zkQT1MlVGVDACNIHtAWdALAIYJwYHSbpY2KT znCh7cPYyrcHGXsNCGOZZBuIeHXNRe5qYzd/1KRH9l4bFvt8FVhwWADkbksc06sJ7659 loh7EN2ls1mRe8T7dHtt1GyUS9CUdFbhxdSdxDPJZS39+cSF1oFwNZbTFQKR3NoXJTnU VBwV1YPuJ5Eq0CFPhQXSI0sGbskGW+Nkj8fWZdAaSl7sZMo20D8BM79lHxsn7cquhkfu GK38Oym33M7afiiO+s6CPG6cv7znk47jM7RXYcejfUJfg/p8bFADPxVQbNxuQ2/f6gym coNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pS5I75bz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-122022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i14-20020a1709064fce00b00a4df683614asi2065196ejw.615.2024.03.27.14.27.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 14:27:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pS5I75bz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-122022-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122022-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 322311F27D8F for ; Wed, 27 Mar 2024 21:27:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76CC4153587; Wed, 27 Mar 2024 21:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pS5I75bz" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAA7F1514E3 for ; Wed, 27 Mar 2024 21:27:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711574841; cv=none; b=qsMSyrvHTkvEsTyOIFGETaoipP7kr9kGepsdHMZ5xoxUJX+2FDJ3eTkXpw7HAdyV/UHRfNfRROOrURhlCLjTz1om89WicWZc3JCPMcfkEOzgRSkmIPNJWjDOfEKMDfQBddnj5Ki4vHj8C82Ic/kukV1Tk798s8f4NiV1hbIIw0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711574841; c=relaxed/simple; bh=yc5HwDxh0Cq57l5em6EJgDWkC64vTATP/bKHfpjFDTY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=j51NLfCfvTXVhFU3de8qjecTcC95td5U85eQYx7iImVReYcNeXwDIgsw7qCXrY0JeMaEam/UxEnMWqgpGtv4Td9o7YrdH2MFfOrO6M+hwXw9DZzMr9sHs/wVgUsWr6AnGOjJTrLe94GMSBsnf4gCf4rh8v5CkH7uqQhLJasfxhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pS5I75bz; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a47385a4379so250868466b.0 for ; Wed, 27 Mar 2024 14:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711574838; x=1712179638; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=K+tGtRil4SrQkzoQjrHa8/2JGLOrwO/8SeqSS+CQSpY=; b=pS5I75bznfK9M0wDjAlmJcWT+OlqcjQlVyAvvGAQmvXTmCOwHTdSGTGNRDe026ZNmv KBGNmjeck/HN30dgNmRQtUOApAh8ecgJ4X2CfQcZn2L6GQoanAojyctqtc9rRz3c455b 8oY0IgdgzzaHVcF1dupvVr8mgNqX4USovOVsERTyo7NPhEfXtZaeY85fJ9S/3RaDhQ/8 gNwdz64SgJvtY9eZp3Qcm1B+loWkeBdNeFEMDWk/XB+JIYVl4glJctFz/K7rFuTD28eD Cs/pRnAUNDSsGoxbZ0tQyTqXcZ4Thlz55OA214TKo9Et16KueS+Cyl8IeaUkMYbNoxsS 4vRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711574838; x=1712179638; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=K+tGtRil4SrQkzoQjrHa8/2JGLOrwO/8SeqSS+CQSpY=; b=BvELfnNxcgZ1/Q4FB33VIZi7bsOCl13nrKf56GV51EB1Bj/YrarOyeVOtVR6X3oVSm XdP+MuEFoKnvRguTxmGrFQLhxuKn2jlBsN1VQJuZzr1FxznRAK7rJu7dXkB55JltQAGr dpwRU5IMMPdHuV6xixE+N6cuXwkdQ6k+x3ZNm8AYFLQO7P65IRZGK5w81fCvLXRBFL1G lG58WzR+Rfm4EdL0vy1Jj9SGiCrZwVMOhFk/yV5nXo7Es9tn4faPHTu8yIfnxtiL4iQ4 MWG0DhmO0N6JaKFoAfaLSyjbDhFtYj7IA60l1AUT16nH35X8xDctf9gZOiPknYCg1yPq R1+w== X-Forwarded-Encrypted: i=1; AJvYcCWwasd8XPiqVWLpkWq9zulrQUiZfwLbJPTcWL9s07I7swwIloj9bXCEohnlNlYogdJp1J8IQ/DNRh0CRDvbkedo5d/fzF7s4h2mnRZ8 X-Gm-Message-State: AOJu0YxrKC9TP8sO1sYyIrHLBVOvg+4yvmacJbvx8Gl4sekUKzo3TdbF VDpZGibbHfZrc/9vMdSV+pGWoajDXj+Zx+dLA3DrR+f/Z81gfEKxjNwcVKjzoWo= X-Received: by 2002:a17:906:1682:b0:a46:a8b8:f4cf with SMTP id s2-20020a170906168200b00a46a8b8f4cfmr367819ejd.35.1711574838038; Wed, 27 Mar 2024 14:27:18 -0700 (PDT) Received: from [192.168.92.47] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id b2-20020a1709062b4200b00a4725e4f53asm5877732ejg.40.2024.03.27.14.27.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Mar 2024 14:27:17 -0700 (PDT) Message-ID: Date: Wed, 27 Mar 2024 22:27:15 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] PCI: qcom: properly implement RC shutdown/power up To: Bjorn Helgaas Cc: Bjorn Andersson , Manivannan Sadhasivam , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Marijn Suijten , Bjorn Andersson References: <20240327212050.GA1538555@bhelgaas> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhT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5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20240327212050.GA1538555@bhelgaas> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 27.03.2024 10:20 PM, Bjorn Helgaas wrote: > On Wed, Mar 27, 2024 at 08:49:09PM +0100, Konrad Dybcio wrote: >> Currently, we've only been minimizing the power draw while keeping the >> RC up at all times. This is suboptimal, as it draws a whole lot of power >> and prevents the SoC from power collapsing. >> >> Implement full shutdown and re-initialization to allow for powering off >> the controller. >> >> This is mainly intended for SC8280XP with a broken power rail setup, >> which requires a full RC shutdown/reinit in order to reach SoC-wide >> power collapse, but sleeping is generally better than not sleeping and >> less destructive suspend can be implemented later for platforms that >> support it. > > Second try (first at > https://lore.kernel.org/all/20240212213216.GA1145794@bhelgaas/): > > - Capitalize subject lines to match history (sorry, I didn't mention > the first time) > > - Drop or replace "properly" with something specific > > - "... minimizing power draw while keeping RC up at all times ... > draws a whole lot of power" doesn't quite make sense to me > > - Reword or explain "power collapse" > > - No COMPILE_TEST provision (maybe it turned out to be impractical?) > > - Magic delay numbers below with no citation or explanation. Even a > short comment could be a hint about how to verify and potentially > change in the future. A #define for readl_poll_timeout() would be > helpful as a place for a comment and because the name could > include "_US" to show the units. > > - Add "()" after function names in comments Sorry Bjorn, I came back to this series after some time and didn't revisit your message. I'll be sure not to forget the next time around. Konrad