lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] PCI: dwc: Move forward the iATU detection process
From
Date
On 26.03.2021 18:05, Marek Szyprowski wrote:
> On 25.03.2021 21:19, Bjorn Helgaas wrote:
>> On Thu, Mar 25, 2021 at 10:24:28AM +0100, Marek Szyprowski wrote:
>>> On 25.01.2021 05:48, Zhiqiang Hou wrote:
>>>> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>>>>
>>>> In the dw_pcie_ep_init(), it depends on the detected iATU region
>>>> numbers to allocate the in/outbound window management bit map.
>>>> It fails after the commit 281f1f99cf3a ("PCI: dwc: Detect number
>>>> of iATU windows").
>>>>
>>>> So this patch move the iATU region detection into a new function,
>>>> move forward the detection to the very beginning of functions
>>>> dw_pcie_host_init() and dw_pcie_ep_init(). And also remove it
>>>> from the dw_pcie_setup(), since it's more like a software
>>>> perspective initialization step than hardware setup.
>>>>
>>>> Fixes: 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows")
>>>> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>>> This patch causes exynos-pcie to hang during the initialization. It
>>> looks that some resources are not enabled yet, so calling
>>> dw_pcie_iatu_detect() much earlier causes a hang. When I have some
>>> time,
>>> I will try to identify what is needed to call it properly.
>> Thanks, I dropped it for now.  We can add it back after we figure out
>> what the exynos issue is.
> Thanks, I will try to identify at which point of initialization it is
> safe to call iATU region detection.

I've just checked and it is enough to move the

dw_pcie_iatu_detect(pci);

after

pp->ops->host_init(pp);

in dw_pcie_host_init() to fix driver operation on Exynos SoCs with the
$subject patch applied.

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

\
 
 \ /
  Last update: 2021-03-30 09:52    [W:0.115 / U:2.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site