PCI: pci-bridge-emul: Fix big-endian support
authorGrzegorz Jaszczyk <jaz@semihalf.com>
Tue, 16 Jul 2019 12:13:46 +0000 (14:13 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 17 Oct 2019 11:42:48 +0000 (12:42 +0100)
commite0d9d30b73548fbfe5c024ed630169bdc9a08aee
tree835d3cd58be17e18abaf4edefb36c52ab7d3a93d
parente078723f9cccd509482fd7f30a4afb1125ca7a2a
PCI: pci-bridge-emul: Fix big-endian support

Perform conversion to little-endian before every write to configuration
space and convert it back to CPU endianness on reads.

Additionally, initialise every multiple byte field of config space with
the cpu_to_le* macro, which is required since the structure describing
config space of emulated bridge assumes little-endian convention.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/pci-bridge-emul.c
drivers/pci/pci-bridge-emul.h