2 * PCI Frontend - arch-dependendent declarations
4 * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
6 #ifndef __XEN_ASM_PCIFRONT_H__
7 #define __XEN_ASM_PCIFRONT_H__
9 #include <linux/spinlock.h>
17 struct pcifront_device;
19 #define pcifront_sd pci_sysdata
21 static inline struct pcifront_device *
22 pcifront_get_pdev(struct pcifront_sd *sd)
27 static inline void pcifront_init_sd(struct pcifront_sd *sd,
28 unsigned int domain, unsigned int bus,
29 struct pcifront_device *pdev)
35 static inline void pcifront_setup_root_resources(struct pci_bus *bus,
36 struct pcifront_sd *sd)
42 #include <linux/acpi.h>
44 #define pcifront_sd pci_controller
46 extern void xen_add_resource(struct pci_controller *, unsigned int,
47 unsigned int, struct acpi_resource *);
48 extern void xen_pcibios_setup_root_windows(struct pci_bus *,
49 struct pci_controller *);
51 static inline struct pcifront_device *
52 pcifront_get_pdev(struct pcifront_sd *sd)
54 return (struct pcifront_device *)sd->platform_data;
57 static inline void pcifront_setup_root_resources(struct pci_bus *bus,
58 struct pcifront_sd *sd)
60 xen_pcibios_setup_root_windows(bus, sd);
65 extern struct rw_semaphore pci_bus_sem;
67 #endif /* __KERNEL__ */
69 #endif /* __XEN_ASM_PCIFRONT_H__ */