Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5150382ybv; Mon, 17 Feb 2020 13:24:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxlwGcPN6wfBR0pzlN3sZ1dbN0UdsH2UYNKoCvmxofBhFWMa+bJaElnp8FNPlZE/13ELzbh X-Received: by 2002:a9d:1c96:: with SMTP id l22mr13816823ota.322.1581974680557; Mon, 17 Feb 2020 13:24:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581974680; cv=none; d=google.com; s=arc-20160816; b=E9SdOnx5qopMjoi8An5/wSajUul7ARtnz/EemsIat6gHcN6yxzHfNSb9bga3qIo5f1 JxgKb2OgP2aiNITLizJvJuiKqF1MUN/YdZlbnG3k6AQgRszbU86bDSucYEnVNOvoW6V4 yatDGf5bKEWt8XDjpQ2VXzY5fSUixkes6YM4ezooBJPBiF1N+tb27QlbnQrDx6vHeKM2 MN2Jm/oK+usY8lCzbVD7kFduXID3dNBWzHiI0553wReZDVAcMadNu4O2d1fUxLsFjk9f L4/XIBNCjUgCgMdCat/Edzc9LNEXMNrmuG8wMnIBiFtjs3n2E86gluk6KZUdeXBmzABO 4QQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=oi6VSojMNo37qNDHDFuuiOXdqSsydRpJ72aECxuLHmg=; b=W4wGy2Y9aDPGqVk797RwU31/s1BazVmwYTubvVhIvNtPfOi2NnyptXoTDJLU6SGx1N TjaIWAtgi0i8u3E5gXqegbc6tpqZ7rPxpcDtyemrCu4Z2fFTQ+hAUrxdap1fiU1nhdq/ ZRJZoG1mlU+T0JWS6f4OTlAZqY/ttnTy7XKjiB/q5GuarRwzJOD898sDyVUTh1ZR4ZcE nJgXXtw2eH8gb1wcOEydKX1MtgRr23XtmAbQP/cO/HXRyFZFiWAyMD+JGz6OD/BsiUWM OKn1UaX2rOthz6JWWPCHXfeWCNDqU/wY5rWJmp3i5EWZLMJmapVAi6iodaX/ik9VFcLj steA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si749135otq.95.2020.02.17.13.24.25; Mon, 17 Feb 2020 13:24:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729880AbgBQVTZ (ORCPT + 99 others); Mon, 17 Feb 2020 16:19:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:42838 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728935AbgBQVTZ (ORCPT ); Mon, 17 Feb 2020 16:19:25 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CA941AD6C; Mon, 17 Feb 2020 21:19:22 +0000 (UTC) Message-ID: <7bd53a3ee156037132e85415589168345461ad7c.camel@suse.de> Subject: Re: [PATCH] usb: xhci-pci: Raspberry Pi FW loader for VIA VL805 From: Nicolas Saenz Julienne To: Florian Fainelli , Mathias Nyman , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com Cc: oneukum@suse.com, phil@raspberrypi.com, tim.gover@raspberrypi.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Date: Mon, 17 Feb 2020 22:19:20 +0100 In-Reply-To: <185f8cae-9898-ee72-00f1-ec79d98c43f4@gmail.com> References: <20200217100701.19949-1-nsaenzjulienne@suse.de> <185f8cae-9898-ee72-00f1-ec79d98c43f4@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-6v5SE9lBM19zZDAYXHDY" User-Agent: Evolution 3.34.3 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-6v5SE9lBM19zZDAYXHDY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2020-02-17 at 12:52 -0800, Florian Fainelli wrote: >=20 > On 2/17/2020 2:07 AM, Nicolas Saenz Julienne wrote: > > On the Raspberry Pi 4, after a PCI reset, VL805's firmware may either b= e > > loaded directly from an EEPROM or, if not present, by the SoC's > > VideCore. Inform VideCore that VL805 was just reset, or defer xhci's > > probe if not yet joinable trough the mailbox interface. > >=20 > > Based on Tim Gover's downstream implementation. > >=20 > > Signed-off-by: Nicolas Saenz Julienne >=20 > Would it work if you registered the firmware loading as pci fixup such > that you would not even have to mangle xhci-pci.c at all and all the > logic could be contained within drivers/firmware/raspberrypi.c? Not that simple, PCI fix-ups don't allow for probe deferring. We depend on = the firmware and mailbox drivers to be up prior running this, so it's essential= . We could cheat and do the deferring first thing during pcie-brcmstb's probe. Actually this might be a workable solution (as in upstreamable): - Wait for firmware to be up in pcie-brcmstb.c - Add firmware code in firmware/raspberrypi.c - Perform call in usb's quirk_usb_early_handoff() (usb/host/pci-quirks.c) Regards, Nicolas --=-6v5SE9lBM19zZDAYXHDY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl5LA1gACgkQlfZmHno8 x/7pOQf/Rc4PUoWjbSaEnRadMhclCH4wKP/YYX30qB8pP4LdbbBhlVyFrL1pYqsA 7SM/sYXSi77ZudG91Qdw0KZQO+8d8R/sC0AliG5qNe0qkc314TwqjAcu90kXkbEF lvLFkocleihvGcVPjY9LEwk2bPqSY4ScYt/WhrfGIaqvqyJ/ISqliY6HFlbjJfjq 323xSs7Jp0SXjl8h2yOhL0kgV6HS/NTUbwUrW0lRXvZWjDyi0CM1uyxCgUy4EiRC wsSutseZ95JKX8Sw78dLrE1H0qQel1cAIbZSNb6/lVOvFinq8lKhh+EJVHmAiwOl 7o2HJ9OsjY6Lb4mqgcvoPqFPVl5/tQ== =bl1/ -----END PGP SIGNATURE----- --=-6v5SE9lBM19zZDAYXHDY--