From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.6544.1664549136985363659 for ; Fri, 30 Sep 2022 07:45:37 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jeremy.linton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1EC72143D; Fri, 30 Sep 2022 07:45:43 -0700 (PDT) Received: from [192.168.122.164] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 46C6E3F792; Fri, 30 Sep 2022 07:45:36 -0700 (PDT) Message-ID: Date: Fri, 30 Sep 2022 09:45:31 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [edk2-platforms PATCH 0/2] Platform/RaspberryPi: SyncPcie() fixes To: Adrien Thierry , Ard Biesheuvel , Leif Lindholm , devel@edk2.groups.io References: <20220929195335.61495-1-athierry@redhat.com> From: "Jeremy Linton" In-Reply-To: <20220929195335.61495-1-athierry@redhat.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/29/22 14:53, Adrien Thierry wrote: > This patch series does a few fixes in the SyncPcie() function, more > specifically in the logic that deletes the pci node to prevent Linux from > resetting the XHCI controller. Hmm, that code not being exactly right isn't surprising, I went through about a dozen revisions looking for the one that fixed it consistently and in the end this version worked with some older kernels (and likely dt) but doesn't work with any of the recent ones. But... I think I found an actual fix a couple months ago while testing the DT->SMCCC pci config space code. Which is to update the ranges property as well. With that change the firmware can reset the XHCI controller in recent Linux's, so there isn't a need to remove the XHCI node. There is a copy of the patch hiding on my github https://github.com/jlinton/edk2-platforms/commit/50540bd24f93b633c3597b5dc58c1a1a3b49bf7f#diff-373e67aaa16dd9ac2428d5acc3d73ef218b2ed6d24f3350d5af558cba03cf5adR378 along with a change to update the compatible property to pci-host-smc-generic and remove the ranges property which should be ignored... :) If you just add the range tweak, does that fix the XHCI config in your setup too? I really need to start getting many of those old/stale patches cleaned up and merged, but its not been a high priority. > > Adrien Thierry (2): > Platform/RaspberryPi: fix pci DT node address in SyncPcie() > Platform/RaspberryPi: delete usb node instead of pci in SyncPcie() > > Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > > base-commit: e55f0527dde48a5f139c1b8f35acc4e6b59dd794