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>
This commit is contained in:
Grzegorz Jaszczyk 2019-07-16 14:13:46 +02:00 • committed by Lorenzo Pieralisi
commit e0d9d30b73
2 changed files with 52 additions and 51 deletions