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/config.h>
10 #include <linux/spinlock.h>
16 struct pcifront_device;
21 struct pcifront_device *pdev;
24 static inline struct pcifront_device *
25 pcifront_get_pdev(struct pcifront_sd *sd)
30 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
31 struct pcifront_device *pdev)
37 #if defined(CONFIG_PCI_DOMAINS)
38 static inline int pci_domain_nr(struct pci_bus *bus)
40 struct pcifront_sd *sd = bus->sysdata;
43 static inline int pci_proc_domain(struct pci_bus *bus)
45 return pci_domain_nr(bus);
47 #endif /* CONFIG_PCI_DOMAINS */
52 #define pcifront_sd pci_controller
54 static inline struct pcifront_device *
55 pcifront_get_pdev(struct pcifront_sd *sd)
57 return (struct pcifront_device *)sd->platform_data;
60 static inline void pcifront_init_sd(struct pcifront_sd *sd, int domain,
61 struct pcifront_device *pdev)
64 sd->acpi_handle = NULL;
68 sd->platform_data = pdev;
73 extern spinlock_t pci_bus_lock;
75 #endif /* __KERNEL__ */
77 #endif /* __XEN_ASM_PCIFRONT_H__ */