Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[sfrench/cifs-2.6.git] / arch / sparc64 / kernel / pci_impl.h
1 /* pci_impl.h: Helper definitions for PCI controller support.
2  *
3  * Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
4  */
5
6 #ifndef PCI_IMPL_H
7 #define PCI_IMPL_H
8
9 #include <linux/types.h>
10 #include <linux/spinlock.h>
11 #include <asm/io.h>
12 #include <asm/prom.h>
13
14 extern struct pci_controller_info *pci_controller_root;
15 extern unsigned long pci_memspace_mask;
16
17 extern int pci_num_controllers;
18
19 /* PCI bus scanning and fixup support. */
20 extern struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm);
21 extern void pci_determine_mem_io_space(struct pci_pbm_info *pbm);
22
23 extern int pci_host_bridge_read_pci_cfg(struct pci_bus *bus_dev,
24                                         unsigned int devfn,
25                                         int where, int size,
26                                         u32 *value);
27 extern int pci_host_bridge_write_pci_cfg(struct pci_bus *bus_dev,
28                                          unsigned int devfn,
29                                          int where, int size,
30                                          u32 value);
31
32 /* Error reporting support. */
33 extern void pci_scan_for_target_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *);
34 extern void pci_scan_for_master_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *);
35 extern void pci_scan_for_parity_error(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *);
36
37 /* Configuration space access. */
38 extern void pci_config_read8(u8 *addr, u8 *ret);
39 extern void pci_config_read16(u16 *addr, u16 *ret);
40 extern void pci_config_read32(u32 *addr, u32 *ret);
41 extern void pci_config_write8(u8 *addr, u8 val);
42 extern void pci_config_write16(u16 *addr, u16 val);
43 extern void pci_config_write32(u32 *addr, u32 val);
44
45 #endif /* !(PCI_IMPL_H) */