arm: a37xx: pci: Implement re-issuing config requests on CRS response
authorPali Rohár <pali@kernel.org>
Fri, 27 Aug 2021 12:14:44 +0000 (14:14 +0200)
committerStefan Roese <sr@denx.de>
Fri, 10 Sep 2021 07:01:51 +0000 (09:01 +0200)
commitd9ac6e28afae08f4d0c2116db4279fa59ea7c838
treea6a909ee9f6c202f1cfea44d9bc2839c043f46ec
parent758262bc266aa65cfbfd74033c3ac1e4e67c92ec
arm: a37xx: pci: Implement re-issuing config requests on CRS response

According to PCIe base specification, if CRS Software Visibility is not
enabled, the Root Complex must re-issue the Configuration Request as a new
Request.

Normally this part of Root Complex is implemented in hardware but aardvark
is somehow special and does not implement it in hardware and expect that
handling of config requests are fully implemented in software.

This re-issuing functionality is required also because U-Boot does not
support CRS Software Visibility feature and therefore expects that Root
Complex re-issues requests as is specified in PCIe base specification.

Retry / re-issue config request up to the PIO_MAX_RETRIES, to prevent
infinite loop. After retry count exceed PIO_MAX_RETRIES, returns failure.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/pci/pci-aardvark.c