Thread (12 messages) 12 messages, 4 authors, 2024-02-01

Re: [PATCH v12 2/3] PCI: dwc: Implement general suspend/resume functionality for L2/L3 transitions

From: Frank Li <Frank.li@nxp.com>
Date: 2024-02-01 17:08:36
Also in: imx, linux-devicetree, linux-pci, lkml

On Thu, Feb 01, 2024 at 10:50:25AM -0600, Bjorn Helgaas wrote:
On Mon, Aug 21, 2023 at 02:48:14PM -0400, Frank Li wrote:
quoted
Introduce helper function dw_pcie_get_ltssm() to retrieve SMLH_LTSS_STATE.
...
quoted
diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
index 615660640801..91d13f9b21b1 100644
--- a/drivers/pci/controller/dwc/pcie-designware.h
+++ b/drivers/pci/controller/dwc/pcie-designware.h
quoted
@@ -364,6 +375,7 @@ struct dw_pcie_ops {
 	void    (*write_dbi2)(struct dw_pcie *pcie, void __iomem *base, u32 reg,
 			      size_t size, u32 val);
 	int	(*link_up)(struct dw_pcie *pcie);
+	enum dw_pcie_ltssm (*get_ltssm)(struct dw_pcie *pcie);
This has already been applied as
https://git.kernel.org/linus/4774faf854f5 ("PCI: dwc: Implement
generic suspend/resume functionality"), but this .get_ltssm() pointer
doesn't seem to be used anywhere.  Should we remove it until we need
it?
Could you place hold on for a while? I am working on imx PCIe. One old
imx6 may need it!

If not, I will submit patch to clean it. My new patches depend on

https://lore.kernel.org/imx/ZbJ+tFPn3aOYHCwf@lizhi-Precision-Tower-5810/T/#t (local)

All already reviewed, could you please pick up these, so I can continue
my futher work.

Another
https://lore.kernel.org/imx/20240201-pme_msg-v2-0-6767052fe6a4@nxp.com/T/#t (local)
was under review.

After these, suspend/resume will become simple and common for all dwc
platform.

Frank.
quoted
+static inline enum dw_pcie_ltssm dw_pcie_get_ltssm(struct dw_pcie *pci)
+{
+	u32 val;
+
+	if (pci->ops && pci->ops->get_ltssm)
+		return pci->ops->get_ltssm(pci);
+
+	val = dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0);
+
+	return (enum dw_pcie_ltssm)FIELD_GET(PORT_LOGIC_LTSSM_STATE_MASK, val);
+}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help