[RFC PATCH 8/9] pci: Add driver for Broadcom STB PCIe controller

Nicolas Saenz Julienne nsaenzjulienne at suse.de
Wed Apr 22 11:16:26 CEST 2020

Hi Sylwester,

On Tue, 2020-04-21 at 18:50 +0200, Sylwester Nawrocki wrote:
> This patch adds basic driver for the Broadcom STB PCIe host controller.
> The code is based on Linux upstream driver (pcie-brcmtsb.c) with MSI
> handling removed. The inbound access memory region is not currently
> parsed from dma-ranges DT property and is fixed as a 1:1 mapping of
> whole RAM.
> The patch has been tested on rpi4 board, i.e. on BCM2711 SoC with VL805
> USB Host Controller.
> Signed-off-by: Sylwester Nawrocki <s.nawrocki at samsung.com>
> ---

I see that you based your code on the downstream PCIe driver (the one available
in the Raspberry Pi foundation kernel repos). There's a real upstream version
of it[1], It's properly reviewed and we made a point to remove all non bcm2711
specific stuff from it, as support for other platforms (like bcm7445) isn't
there yet (it depends on supporting multiple dma-ranges in Linux, which we
don't). Also note that the Raspberry Pi foundation is moving towards using this
driver, see for example their rpi-5.6.y branch, and I belive Broadcom is doing
the same.

So I strongly suggest you base this driver on the upstream version. As I was
working towards the same goal as you I already have an implementation for
u-boot myself[2]. Feel free to use that if you find it useful. Ultimately,
whether you base it on my version or the upstream Linux version it's half the
size and easier to follow.


[2] https://github.com/vianpl/u-boot/commits/brcm-pcie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200422/d53649cb/attachment.sig>

More information about the U-Boot mailing list