xen/arm: Add new device type for PCI
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Fri, 8 Oct 2021 22:38:17 +0000 (15:38 -0700)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Fri, 8 Oct 2021 22:38:17 +0000 (15:38 -0700)
commit305f19306b4f16448a53ceebe6e6aa19513738ed
tree0f541412411866fa4fbca1e414b7c0fefe9751d4
parentb11380f6cd58ce40422473262b2b4c2b210447a1
xen/arm: Add new device type for PCI

Add new device type (DEV_PCI) to distinguish PCI devices from platform
DT devices, so some drivers, like IOMMU, can handle PCI devices
differently.

Also add a helper which is when given a struct device returns the
corresponding struct pci_dev which this device is a part of.

Because of the header cross-dependencies, e.g. we need both
struct pci_dev and struct arch_pci_dev at the same time, this cannot be
done with an inline.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
xen/arch/arm/pci/pci.c
xen/include/asm-arm/device.h
xen/include/asm-arm/pci.h