cns3xxx: use actual size reads for PCIe
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Mon, 7 Jan 2019 10:59:49 +0000 (11:59 +0100)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Tue, 8 Jan 2019 12:13:16 +0000 (13:13 +0100)
commitc3fef269d61fd9fc860dcfd812984276790fd712
tree7692041c1fc04abdd627e36c93828ed2845b4e9d
parent367ccf7a2d4ff7bec492fd7802b00ac38cbcd707
cns3xxx: use actual size reads for PCIe

upstream commit 802b7c06adc7 ("ARM: cns3xxx: Convert PCI to use generic config accessors")
reimplemented cns3xxx_pci_read_config() using pci_generic_config_read32(),
which preserved the property of only doing 32-bit reads.

It also replaced cns3xxx_pci_write_config() with pci_generic_config_write(),
so it changed writes from always being 32 bits to being the actual size,
which works just fine.

Due to:
- The documentation does not mention that only 32 bit access is allowed.
- Writes are already executed using the actual size
- Extensive testing shows that 8b, 16b and 32b reads work as intended

It makes perfectly sense to also swap 32 bit reading in favor of actual size.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
target/linux/generic/backport-4.14/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch [new file with mode: 0644]
target/linux/generic/backport-4.9/101-arm-cns3xxx-use-actual-size-reads-for-PCIe.patch [new file with mode: 0644]