diff options
author | Matthew Wilcox <matthew@wil.cx> | 2008-02-10 09:45:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-10 15:52:46 -0500 |
commit | b6ce068a1285a24185b01be8a49021827516b3e1 (patch) | |
tree | ea1420fefff86f2e2ee4ed83f08ec2dd99a86dc5 /arch/x86/pci/pci.h | |
parent | a0ca9909609470ad779b9b9cc68ce96e975afff7 (diff) |
Change pci_raw_ops to pci_raw_read/write
We want to allow different implementations of pci_raw_ops for standard
and extended config space on x86. Rather than clutter generic code with
knowledge of this, we make pci_raw_ops private to x86 and use it to
implement the new raw interface -- raw_pci_read() and raw_pci_write().
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/pci/pci.h')
-rw-r--r-- | arch/x86/pci/pci.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h index 36cb44c397c3..3431518d921a 100644 --- a/arch/x86/pci/pci.h +++ b/arch/x86/pci/pci.h | |||
@@ -85,10 +85,17 @@ extern spinlock_t pci_config_lock; | |||
85 | extern int (*pcibios_enable_irq)(struct pci_dev *dev); | 85 | extern int (*pcibios_enable_irq)(struct pci_dev *dev); |
86 | extern void (*pcibios_disable_irq)(struct pci_dev *dev); | 86 | extern void (*pcibios_disable_irq)(struct pci_dev *dev); |
87 | 87 | ||
88 | extern int pci_conf1_write(unsigned int seg, unsigned int bus, | 88 | struct pci_raw_ops { |
89 | unsigned int devfn, int reg, int len, u32 value); | 89 | int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, |
90 | extern int pci_conf1_read(unsigned int seg, unsigned int bus, | 90 | int reg, int len, u32 *val); |
91 | unsigned int devfn, int reg, int len, u32 *value); | 91 | int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn, |
92 | int reg, int len, u32 val); | ||
93 | }; | ||
94 | |||
95 | extern struct pci_raw_ops *raw_pci_ops; | ||
96 | extern struct pci_raw_ops *raw_pci_ext_ops; | ||
97 | |||
98 | extern struct pci_raw_ops pci_direct_conf1; | ||
92 | 99 | ||
93 | extern int pci_direct_probe(void); | 100 | extern int pci_direct_probe(void); |
94 | extern void pci_direct_init(int type); | 101 | extern void pci_direct_init(int type); |