Module Name: src Committed By: tnn Date: Sun Oct 11 15:33:18 UTC 2020
Modified Files: src/sys/arch/arm/rockchip: rk3399_pcie.c Log Message: rk3399_pci: support for PCI express switches / bridges / multiple buses There were two isses that prevented this from working: 1. We must use type 1 configuration cycles when accessing bus 2 and beyond, but type 0 configuration cycles for bus 0 and 1. 2. The hardware address decoder cannot be used to decode the bus portion of the ECAM address. Due to the physical SoC address of the remote device region not having sufficient alignment the wrong bus address would go out on the wire. Also the mapped region is too small to address busses beyond bus31. Fix: Reduce the number of ECAM translated bits to dev+func only. For each configuration space access, acquire an exclusive lock and reprogram the translator with the correct bus number and access type. Config space is accessed sufficiently infrequent for this to not cause any performance problems. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/rockchip/rk3399_pcie.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.