0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __ASM_MACH_PCI_H
0009 #define __ASM_MACH_PCI_H
0010
0011 #include <linux/ioport.h>
0012
0013 struct pci_sys_data;
0014 struct pci_ops;
0015 struct pci_bus;
0016 struct pci_host_bridge;
0017 struct device;
0018
0019 struct hw_pci {
0020 struct pci_ops *ops;
0021 int nr_controllers;
0022 void **private_data;
0023 int (*setup)(int nr, struct pci_sys_data *);
0024 int (*scan)(int nr, struct pci_host_bridge *);
0025 void (*preinit)(void);
0026 void (*postinit)(void);
0027 u8 (*swizzle)(struct pci_dev *dev, u8 *pin);
0028 int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin);
0029 };
0030
0031
0032
0033
0034 struct pci_sys_data {
0035 struct list_head node;
0036 int busnr;
0037 u64 mem_offset;
0038 unsigned long io_offset;
0039 struct pci_bus *bus;
0040 struct list_head resources;
0041 struct resource io_res;
0042 char io_res_name[12];
0043
0044 u8 (*swizzle)(struct pci_dev *, u8 *);
0045
0046 int (*map_irq)(const struct pci_dev *, u8, u8);
0047 void *private_data;
0048 };
0049
0050
0051
0052
0053 void pci_common_init_dev(struct device *, struct hw_pci *);
0054
0055
0056
0057
0058
0059 static inline void pci_common_init(struct hw_pci *hw)
0060 {
0061 pci_common_init_dev(NULL, hw);
0062 }
0063
0064
0065
0066
0067 #if defined(CONFIG_PCI)
0068 extern void pci_map_io_early(unsigned long pfn);
0069 #else
0070 static inline void pci_map_io_early(unsigned long pfn) {}
0071 #endif
0072
0073
0074
0075
0076 extern struct pci_ops iop3xx_ops;
0077 extern int iop3xx_pci_setup(int nr, struct pci_sys_data *);
0078 extern void iop3xx_pci_preinit(void);
0079 extern void iop3xx_pci_preinit_cond(void);
0080
0081 extern struct pci_ops dc21285_ops;
0082 extern int dc21285_setup(int nr, struct pci_sys_data *);
0083 extern void dc21285_preinit(void);
0084 extern void dc21285_postinit(void);
0085
0086 #endif