linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	PCI <linux-pci@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Jingoo Han <jingoohan1@gmail.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [PATCH v2 5/6] pci: dwc: pci-exynos: rework the driver to support Exynos5433 variant
Date: Tue, 27 Oct 2020 14:24:58 +0100	[thread overview]
Message-ID: <4cad3d12-e47b-18a3-7c9f-1947415a14b6@samsung.com> (raw)
In-Reply-To: <86df523b-cf3d-5a88-5ccc-c6f2ca9830a4@samsung.com>

Hi

On 27.10.2020 13:04, Marek Szyprowski wrote:
> On 26.10.2020 20:14, Rob Herring wrote:
>> On Fri, Oct 23, 2020 at 2:58 AM Marek Szyprowski
>> <m.szyprowski@samsung.com> wrote:
>>> From: Jaehoon Chung <jh80.chung@samsung.com>
>>>
>>> Exynos5440 SoC support has been dropped since commit 8c83315da1cf 
>>> ("ARM:
>>> dts: exynos: Remove Exynos5440"). Rework this driver to support DWC 
>>> PCIe
>>> variant found in the Exynos5433 SoCs.
>>>
>>> The main difference in Exynos5433 variant is lack of the MSI support
>>> (the MSI interrupt is not even routed to the CPU).
>>>
>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>> [mszyprow: reworked the driver to support only Exynos5433 variant,
>>>             simplified code, rebased onto current kernel code, added
>>>             regulator support, converted to the regular platform 
>>> driver,
>>>             removed MSI related code, rewrote commit message]
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
>>> ---
>>>   drivers/pci/controller/dwc/Kconfig      |   3 +-
>>>   drivers/pci/controller/dwc/pci-exynos.c | 358 
>>> ++++++++++--------------
>>>   drivers/pci/quirks.c                    |   1 +
>>>   3 files changed, 145 insertions(+), 217 deletions(-) 
...
>>> +static int __maybe_unused exynos_pcie_suspend_noirq(struct device 
>>> *dev)
>>> +{
>> Why noirq variant needed? Lot's of PCI host drivers do this and I've
>> yet to get a reason...
> Frankly, I have no idea, but switching to SET_LATE_SYSTEM_SLEEP_PM_OPS 
> breaks system suspend/resume operation - the board doesn't resume from 
> suspend. If this is really important I will add some more logs and try 
> to find what happens between late/early and noirq phases.

It looks that PCI framework does something with the device or controller 
in noirq phase, so the driver cannot shutdown the controller earlier. 
Here is a relevant part from the kernel log after system suspend/resume 
cycle captured with init_calldebug enabled:

$ dmesg | grep pci
brcmfmac 0000:01:00.0: calling pci_pm_suspend+0x0/0x248 @ 96, parent: 
0000:00:00.0
brcmfmac 0000:01:00.0: pci_pm_suspend+0x0/0x248 returned 0 after 650 usecs
pcieport 0000:00:00.0: calling pci_pm_suspend+0x0/0x248 @ 7, parent: 
pci0000:00
pcieport 0000:00:00.0: pci_pm_suspend+0x0/0x248 returned 0 after 85 usecs
exynos-pcie 15700000.pcie: calling platform_pm_suspend+0x0/0x68 @ 447, 
parent: soc@0
exynos-pcie 15700000.pcie: platform_pm_suspend+0x0/0x68 returned 0 after 
4 usecs
exynos_pcie_phy 15680000.pcie-phy: calling platform_pm_suspend+0x0/0x68 
@ 447, parent: soc@0
exynos_pcie_phy 15680000.pcie-phy: platform_pm_suspend+0x0/0x68 returned 
0 after 3 usecs
brcmfmac 0000:01:00.0: calling pci_pm_suspend_late+0x0/0x50 @ 448, 
parent: 0000:00:00.0
brcmfmac 0000:01:00.0: pci_pm_suspend_late+0x0/0x50 returned 0 after 4 usecs
pcieport 0000:00:00.0: calling pci_pm_suspend_late+0x0/0x50 @ 449, 
parent: pci0000:00
pcieport 0000:00:00.0: pci_pm_suspend_late+0x0/0x50 returned 0 after 4 usecs
exynos-pcie 15700000.pcie: calling exynos_pcie_suspend_late+0x0/0x30 @ 
447, parent: soc@0
exynos-pcie 15700000.pcie: exynos_pcie_suspend_late 439
exynos-pcie 15700000.pcie: exynos_pcie_suspend_late+0x0/0x30 returned 0 
after 17 usecs
brcmfmac 0000:01:00.0: calling pci_pm_suspend_noirq+0x0/0x278 @ 449, 
parent: 0000:00:00.0
brcmfmac 0000:01:00.0: pci_pm_suspend_noirq+0x0/0x278 returned 0 after 
24272 usecs
pcieport 0000:00:00.0: calling pci_pm_suspend_noirq+0x0/0x278 @ 448, 
parent: pci0000:00
pcieport 0000:00:00.0: pci_pm_suspend_noirq+0x0/0x278 returned 0 after 
196 usecs
exynos-pcie 15700000.pcie: calling exynos_pcie_suspend_noirq+0x0/0x40 @ 
447, parent: soc@0
exynos-pcie 15700000.pcie: exynos_pcie_suspend_noirq+0x0/0x40 returned 0 
after 653 usecs
exynos-pcie 15700000.pcie: calling exynos_pcie_resume_noirq+0x0/0x38 @ 
447, parent: soc@0
exynos-pcie 15700000.pcie: Link up
exynos-pcie 15700000.pcie: exynos_pcie_resume_noirq+0x0/0x38 returned 0 
after 91433 usecs
pcieport 0000:00:00.0: calling pci_pm_resume_noirq+0x0/0x140 @ 96, 
parent: pci0000:00
pcieport 0000:00:00.0: pci_pm_resume_noirq+0x0/0x140 returned 0 after 
316 usecs
brcmfmac 0000:01:00.0: calling pci_pm_resume_noirq+0x0/0x140 @ 143, 
parent: 0000:00:00.0
brcmfmac 0000:01:00.0: pci_pm_resume_noirq+0x0/0x140 returned 0 after 
25470 usecs
exynos-pcie 15700000.pcie: calling exynos_pcie_resume_late+0x0/0x30 @ 
447, parent: soc@0
exynos-pcie 15700000.pcie: exynos_pcie_resume_late 445
exynos-pcie 15700000.pcie: exynos_pcie_resume_late+0x0/0x30 returned 0 
after 24 usecs
pcieport 0000:00:00.0: calling pci_pm_resume_early+0x0/0x48 @ 449, 
parent: pci0000:00
pcieport 0000:00:00.0: pci_pm_resume_early+0x0/0x48 returned 0 after 3 usecs
brcmfmac 0000:01:00.0: calling pci_pm_resume_early+0x0/0x48 @ 448, 
parent: 0000:00:00.0
brcmfmac 0000:01:00.0: pci_pm_resume_early+0x0/0x48 returned 0 after 3 usecs
exynos_pcie_phy 15680000.pcie-phy: calling platform_pm_resume+0x0/0x60 @ 
447, parent: soc@0
exynos_pcie_phy 15680000.pcie-phy: platform_pm_resume+0x0/0x60 returned 
0 after 4 usecs
exynos-pcie 15700000.pcie: calling platform_pm_resume+0x0/0x60 @ 447, 
parent: soc@0
exynos-pcie 15700000.pcie: platform_pm_resume+0x0/0x60 returned 0 after 
4 usecs
pcieport 0000:00:00.0: calling pci_pm_resume+0x0/0xe0 @ 96, parent: 
pci0000:00
pcieport 0000:00:00.0: pci_pm_resume+0x0/0xe0 returned 0 after 54 usecs
brcmfmac 0000:01:00.0: calling pci_pm_resume+0x0/0xe0 @ 142, parent: 
0000:00:00.0
brcmfmac 0000:01:00.0: pci_pm_resume+0x0/0xe0 returned 0 after 554 usecs


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2020-10-27 13:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20201023075754eucas1p2ee617893ba13493236814235c619bc56@eucas1p2.samsung.com>
2020-10-23  7:57 ` [PATCH v2 0/6] Add DW PCIe support for Exynos5433 SoCs Marek Szyprowski
     [not found]   ` <CGME20201023075754eucas1p2a4c9c5467f25a575bec34984fe6bb43b@eucas1p2.samsung.com>
2020-10-23  7:57     ` [PATCH v2 1/6] dt-bindings: pci: drop samsung,exynos5440-pcie binding Marek Szyprowski
2020-10-24  2:59       ` Jingoo Han
     [not found]   ` <CGME20201023075755eucas1p290b7bc020e46b86fe5e7591877f87117@eucas1p2.samsung.com>
2020-10-23  7:57     ` [PATCH v2 2/6] dt-bindings: pci: add the samsung,exynos-pcie binding Marek Szyprowski
2020-10-23  9:26       ` Krzysztof Kozlowski
     [not found]   ` <CGME20201023075755eucas1p165641c7528ea987a2e1d9d28198c0e9e@eucas1p1.samsung.com>
2020-10-23  7:57     ` [PATCH v2 3/6] dt-bindings: phy: add the samsung,exynos-pcie-phy binding Marek Szyprowski
2020-10-23  9:28       ` Krzysztof Kozlowski
     [not found]   ` <CGME20201023075756eucas1p2c27cc3e6372127d107e5b84c810ba98f@eucas1p2.samsung.com>
2020-10-23  7:57     ` [PATCH v2 4/6] phy: samsung: phy-exynos-pcie: rework driver to support Exynos5433 PCIe PHY Marek Szyprowski
2020-10-24  3:00       ` Jingoo Han
2020-10-26 18:50       ` Rob Herring
2020-10-27 12:28         ` Marek Szyprowski
     [not found]   ` <CGME20201023075756eucas1p18765653e747842eef4b438aff32ef136@eucas1p1.samsung.com>
2020-10-23  7:57     ` [PATCH v2 5/6] pci: dwc: pci-exynos: rework the driver to support Exynos5433 variant Marek Szyprowski
2020-10-23 15:09       ` kernel test robot
2020-10-24  3:12       ` Jingoo Han
2020-10-26  2:49         ` Jaehoon Chung
2020-10-26  4:08           ` Jingoo Han
2020-10-26 19:14       ` Rob Herring
2020-10-27 12:04         ` Marek Szyprowski
2020-10-27 13:24           ` Marek Szyprowski [this message]
     [not found]   ` <CGME20201023075757eucas1p13e4e7f5177bd3f789ac0d2a8aa57c86e@eucas1p1.samsung.com>
2020-10-23  7:57     ` [PATCH v2 6/6] arm64: dts: exynos: add the WiFi/PCIe support to TM2(e) boards Marek Szyprowski

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=4cad3d12-e47b-18a3-7c9f-1947415a14b6@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jh80.chung@samsung.com \
    --cc=jingoohan1@gmail.com \
    --cc=kishon@ti.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@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).