Hi Nicolas, On 22.04.2020 11:16, Nicolas Saenz Julienne wrote: > 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.
Thanks, I'm going to reuse you code, it looks much cleaner. I started working on this PCIe driver back at end of 2019, then that task was postponed for few months. I should have been following better related Linux mainline works. Now, when it all more or less works I will try reuse your code. > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/pcie-brcmstb.c?h=v5.7-rc2 > [2] > https://protect2.fireeye.com/url?k=14361ea6-49a8854c-143795e9-0cc47a6cba04-df90fb3bfec30a2d&q=1&u=https%3A%2F%2Fgithub.com%2Fvianpl%2Fu-boot%2Fcommits%2Fbrcm-pcie > -- Regards, Sylwester

