linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Cc: manivannan.sadhasivam@linaro.org, helgaas@kernel.org,
	linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com,
	quic_nitegupt@quicinc.com, quic_skananth@quicinc.com,
	quic_ramkri@quicinc.com, krzysztof.kozlowski@linaro.org,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: [PATCH v4 2/9] PCI: qcom-ep: Add support for D-state change notification
Date: Fri, 28 Jul 2023 09:27:31 +0530	[thread overview]
Message-ID: <20230728035731.GE4433@thinkpad> (raw)
In-Reply-To: <1689232218-28265-3-git-send-email-quic_krichai@quicinc.com>

On Thu, Jul 13, 2023 at 12:40:11PM +0530, Krishna chaitanya chundru wrote:
> Add support to pass D-state change notification to Endpoint
> function driver.
> 
> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>

One nit below:

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

> ---
>  drivers/pci/controller/dwc/pcie-qcom-ep.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> index 0fe7f06..66fd421 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c
> @@ -561,6 +561,7 @@ static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq, void *data)
>  	struct device *dev = pci->dev;
>  	u32 status = readl_relaxed(pcie_ep->parf + PARF_INT_ALL_STATUS);
>  	u32 mask = readl_relaxed(pcie_ep->parf + PARF_INT_ALL_MASK);
> +	pci_power_t state;
>  	u32 dstate, val;
>  
>  	writel_relaxed(status, pcie_ep->parf + PARF_INT_ALL_CLEAR);
> @@ -583,11 +584,16 @@ static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq, void *data)
>  		dstate = dw_pcie_readl_dbi(pci, DBI_CON_STATUS) &
>  					   DBI_CON_STATUS_POWER_STATE_MASK;
>  		dev_dbg(dev, "Received D%d state event\n", dstate);
> +		state = dstate;
>  		if (dstate == 3) {
>  			val = readl_relaxed(pcie_ep->parf + PARF_PM_CTRL);
>  			val |= PARF_PM_CTRL_REQ_EXIT_L1;
>  			writel_relaxed(val, pcie_ep->parf + PARF_PM_CTRL);

Newline here.

- Mani

> +			state = PCI_D3hot;
> +			if (gpiod_get_value(pcie_ep->reset))
> +				state = PCI_D3cold;
>  		}
> +		pci_epc_dstate_notify(pci->ep.epc, state);
>  	} else if (FIELD_GET(PARF_INT_ALL_LINK_UP, status)) {
>  		dev_dbg(dev, "Received Linkup event. Enumeration complete!\n");
>  		dw_pcie_ep_linkup(&pci->ep);
> -- 
> 2.7.4
> 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2023-07-28  3:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  7:10 [PATCH v4 0/9] PCI: EPC: Add support to wake up host from D3 states Krishna chaitanya chundru
2023-07-13  7:10 ` [PATCH v4 1/9] PCI: endpoint: Add D-state change notifier support Krishna chaitanya chundru
2023-07-28  3:01   ` Manivannan Sadhasivam
2023-07-13  7:10 ` [PATCH v4 2/9] PCI: qcom-ep: Add support for D-state change notification Krishna chaitanya chundru
2023-07-28  3:57   ` Manivannan Sadhasivam [this message]
2023-07-13  7:10 ` [PATCH v4 3/9] PCI: epf-mhi: Add support for handling D-state notify from EPC Krishna chaitanya chundru
2023-07-28  4:09   ` Manivannan Sadhasivam
2023-07-31  5:35     ` Krishna Chaitanya Chundru
2023-08-01  5:01       ` Krishna Chaitanya Chundru
2023-08-01 17:21         ` Manivannan Sadhasivam
2023-07-13  7:10 ` [PATCH v4 4/9] PCI: qcom-ep: Update the D-state log Krishna chaitanya chundru
2023-07-28  4:15   ` Manivannan Sadhasivam
2023-07-13  7:10 ` [PATCH v4 5/9] PCI: endpoint: Add wakeup host API to EPC core Krishna chaitanya chundru
2023-07-28  4:21   ` Manivannan Sadhasivam
2023-07-31  5:36     ` Krishna Chaitanya Chundru
2023-07-13  7:10 ` [PATCH v4 6/9] PCI: dwc: Add wakeup host op to pci_epc_ops Krishna chaitanya chundru
2023-07-13  7:10 ` [PATCH v4 7/9] PCI: qcom-ep: Add wake up host op to dw_pcie_ep_ops Krishna chaitanya chundru
2023-07-13  7:10 ` [PATCH v4 8/9] PCI: epf-mhi: Add wakeup host op Krishna chaitanya chundru
2023-07-13  7:10 ` [PATCH v4 9/9] bus: mhi: ep: wake up host if the MHI state is in M3 Krishna chaitanya chundru
2023-07-28  4:34   ` Manivannan Sadhasivam
2023-07-28  5:50     ` Dan Carpenter
2023-07-28 15:35       ` Manivannan Sadhasivam
2023-07-31  5:37         ` Krishna Chaitanya Chundru
2023-07-28  5:51   ` Dan Carpenter
2023-07-31  5:37     ` Krishna Chaitanya Chundru
2023-07-28  4:37 ` [PATCH v4 0/9] PCI: EPC: Add support to wake up host from D3 states Manivannan Sadhasivam
2023-07-31  5:39   ` Krishna Chaitanya Chundru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230728035731.GE4433@thinkpad \
    --to=mani@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=quic_krichai@quicinc.com \
    --cc=quic_nitegupt@quicinc.com \
    --cc=quic_ramkri@quicinc.com \
    --cc=quic_skananth@quicinc.com \
    --cc=quic_vbadigan@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).