linux-stable/arch/arm/mach-cns3xxx
Koen Vandeputte 432dd7064a ARM: cns3xxx: Use actual size reads for PCIe
commit 802b7c06ad ("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.

Given that:

- 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

Allow read access of any size by replacing pci_generic_config_read32()
with the pci_generic_config_read() accessors.

Fixes: 802b7c06ad ("ARM: cns3xxx: Convert PCI to use generic config accessors")
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Acked-by: Arnd Bergmann <arnd@arndb.de>
CC: Krzysztof Halasa <khalasa@piap.pl>
CC: Olof Johansson <olof@lixom.net>
CC: Robin Leblon <robin.leblon@ncentric.com>
CC: Rob Herring <robh@kernel.org>
CC: Russell King <linux@armlinux.org.uk>
CC: Tim Harvey <tharvey@gateworks.com>
2019-01-31 15:07:16 -06:00
..
cns3xxx.h CNS3xxx: remove unused *_VIRT definitions 2016-03-02 20:09:15 +01:00
cns3420vb.c ARM: cns3xxx: fix allmodconfig panic in pci driver 2014-09-04 23:39:57 +02:00
core.c ARM: remove duplicate 'const' annotations' 2017-05-19 10:12:55 +02:00
core.h ARM: cns3xxx: fix allmodconfig panic in pci driver 2014-09-04 23:39:57 +02:00
devices.c ARM: cns3xxx: make mach header files local 2013-03-14 17:34:55 +01:00
devices.h ARM: cns3xxx: Add support for AHCI controllers 2010-06-08 17:37:09 +04:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcie.c ARM: cns3xxx: Use actual size reads for PCIe 2019-01-31 15:07:16 -06:00
pm.c ARM: cns3xxx: don't export static symbol 2015-03-13 11:02:15 +01:00
pm.h ARM: cns3xxx: make mach header files local 2013-03-14 17:34:55 +01:00