From: Florian Fainelli <f.fainelli@gmail.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
Mathias Nyman <mathias.nyman@intel.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com
Cc: linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
oneukum@suse.com, linux-kernel@vger.kernel.org,
tim.gover@raspberrypi.org, linux-rpi-kernel@lists.infradead.org,
phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] usb: xhci-pci: Raspberry Pi FW loader for VIA VL805
Date: Mon, 17 Feb 2020 13:40:59 -0800 [thread overview]
Message-ID: <e8543571-f1bc-ff58-474f-a1824d97df68@gmail.com> (raw)
In-Reply-To: <7bd53a3ee156037132e85415589168345461ad7c.camel@suse.de>
On 2/17/2020 1:19 PM, Nicolas Saenz Julienne wrote:
> On Mon, 2020-02-17 at 12:52 -0800, Florian Fainelli wrote:
>>
>> 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 be
>>> 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.
>>>
>>> Based on Tim Gover's downstream implementation.
>>>
>>> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
>>
>> 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)
Humm, not a big fan of having to have pcie-brcmstb.c become aware of a
firmware loader, because this does not scale great over PCIe root
complex controller drivers for one and this is such a Pi4 (not even
2711) specialism that it feels a bit too much... might as well go with
your existing patch, just address Greg's feedback?
Or how about introducing a type of fixup that could trigger a probe
deferral?
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-02-17 21:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 10:07 [PATCH] usb: xhci-pci: Raspberry Pi FW loader for VIA VL805 Nicolas Saenz Julienne
2020-02-17 10:36 ` Greg Kroah-Hartman
2020-02-17 11:12 ` Nicolas Saenz Julienne
2020-02-17 17:47 ` Stefan Wahren
2020-02-17 19:39 ` Nicolas Saenz Julienne
2020-02-17 20:52 ` Florian Fainelli
2020-02-17 21:19 ` Nicolas Saenz Julienne
2020-02-17 21:40 ` Florian Fainelli [this message]
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=e8543571-f1bc-ff58-474f-a1824d97df68@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=nsaenzjulienne@suse.de \
--cc=oneukum@suse.com \
--cc=phil@raspberrypi.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=tim.gover@raspberrypi.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).