From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.15259.1664481236051991351 for ; Thu, 29 Sep 2022 12:53:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ciGOrLzp; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: athierry@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664481235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JETWl9GJ7TlDPElfyhe9WSorE7M87k3HcGa+yb0sU9U=; b=ciGOrLzpnKnMNgop6SQlKQaSaGZy52PaGsichW7a3JH6ZEY320tGDdsQKCT/p4vMbw5T8H 6y2h7SDwKf/xr3AB8SQD2GCw2O6Zra3vqOCHfwRLf+WLF9H980P8Rew5dEa/Y08m9sh1Dz F2jBmOhHaYNXgw76xo165l4glPjEiG0= Received: from mail-oa1-f71.google.com (mail-oa1-f71.google.com [209.85.160.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-389-AwNOgeSHOiuoQAOgfTFRvw-1; Thu, 29 Sep 2022 15:53:54 -0400 X-MC-Unique: AwNOgeSHOiuoQAOgfTFRvw-1 Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-131e0b58b39so766147fac.18 for ; Thu, 29 Sep 2022 12:53:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=JETWl9GJ7TlDPElfyhe9WSorE7M87k3HcGa+yb0sU9U=; b=bTWQX9BwatakOpfDlkVrpQ3JyrkwKJdc/WaRlK28uhkX0O2QaqNxYxdr6/7/0OPm0R esfO+b32X2BPXeFC6texM3WOesv8pF92LXh/4K4PLqX7bZGpgPa7QTJ1Cys7IHSxABCJ cSKnha4XBlZX/fk2RguLW0vSbuWrGNrJQMjb9tuxH7ZRWPeN+rjhd+XLjmmLigU4R875 QLcRGCvEP370czj/SyJpNyvgghuH8wSftCrS1Dw0osXmLQe27av1HJIVgQ7aSSKtwB4n vD9Id6GRurIHrwd61EO0E8HvK3qu0vaZyLQogRF4uM7GHcRpis+8VL+/nODmjUp+G8X7 62Fg== X-Gm-Message-State: ACrzQf0JqS64PDbMaP3lUYOA91tFRBDJTL/ac+uFU8D1XssExHzOr66F pbEf7yPFJpaB2BO4T8YeSWyQPJ+4PsJY5FXvgrd1i8baZmRrUl2hSUNe0GJEue/X9X8Es7Q/vW5 wycj/hfE9B6kazg== X-Received: by 2002:a05:6808:916:b0:350:138f:ad76 with SMTP id w22-20020a056808091600b00350138fad76mr7680449oih.111.1664481233327; Thu, 29 Sep 2022 12:53:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7dhntyKUPE8FddE/Xyr35oYuBmUv9+JcvznXtHZz0R0ImW/vqdSQtCwg0X5x6UhXbNc+qkqA== X-Received: by 2002:a05:6808:916:b0:350:138f:ad76 with SMTP id w22-20020a056808091600b00350138fad76mr7680439oih.111.1664481233152; Thu, 29 Sep 2022 12:53:53 -0700 (PDT) Return-Path: Received: from fedora.redhat.com (modemcable149.19-202-24.mc.videotron.ca. [24.202.19.149]) by smtp.gmail.com with ESMTPSA id 110-20020a9d0ef7000000b00654625c0c4dsm139529otj.17.2022.09.29.12.53.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 12:53:52 -0700 (PDT) From: "Adrien Thierry" To: Ard Biesheuvel , Leif Lindholm , Jeremy Linton , devel@edk2.groups.io Cc: Adrien Thierry Subject: [edk2-platforms PATCH 2/2] Platform/RaspberryPi: delete usb node instead of pci in SyncPcie() Date: Thu, 29 Sep 2022 15:53:35 -0400 Message-Id: <20220929195335.61495-3-athierry@redhat.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220929195335.61495-1-athierry@redhat.com> References: <20220929195335.61495-1-athierry@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true In SyncPcie(), the pci node is removed from the device tree to make sure the XHCI controller is not reset by Linux in DT mode. However, we should only remove the usb child node and not the whole pci node. Removing the whole pci node prevents Linux to bypass XHCI handoff for the Raspberry Pi 4 [1]. Moreover, removing the usb node seems to have been the original intent according to the error messages shown if the node is not detected. [1] https://elixir.bootlin.com/linux/latest/source/drivers/usb/host/pci-quirks.c#L1258 Fixes: efff29cdcdb7 ("Platform/RaspberryPi: Always use non translating DMA in DT mode") Signed-off-by: Adrien Thierry --- Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c index 55c9d185fc..26334e50b8 100644 --- a/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c +++ b/Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c @@ -388,7 +388,7 @@ SyncPcie ( * triggering the mailbox by removing the node. */ - Node = fdt_path_offset (mFdtImage, "/scb/pcie@7d500000/pci@0,0"); + Node = fdt_path_offset (mFdtImage, "/scb/pcie@7d500000/pci@0,0/usb@0,0"); if (Node < 0) { // This can happen on CM4/etc which doesn't have an onboard XHCI DEBUG ((DEBUG_INFO, "%a: failed to locate /scb/pcie@7d500000/pci@0/usb@0\n", __FUNCTION__)); -- 2.37.3