summaryrefslogtreecommitdiffstats
path: root/arch/ppc/kernel/pci.h
blob: 231f1d9521e7b37329b1400ffd44cb1f87742e71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

#ifndef __PPC_KERNEL_PCI_H__
#define __PPC_KERNEL_PCI_H__

extern unsigned long isa_io_base;
extern unsigned long isa_mem_base;
extern unsigned long pci_dram_offset;

extern unsigned int  *pci_config_address;
extern unsigned char *pci_config_data;

void fix_intr(struct device_node *node, struct pci_dev *dev);

#define decl_config_access_method(name) \
extern int name##_pcibios_read_config_byte(unsigned char bus, \
	unsigned char dev_fn, unsigned char offset, unsigned char *val); \
extern int name##_pcibios_read_config_word(unsigned char bus, \
	unsigned char dev_fn, unsigned char offset, unsigned short *val); \
extern int name##_pcibios_read_config_dword(unsigned char bus, \
	unsigned char dev_fn, unsigned char offset, unsigned int *val); \
extern int name##_pcibios_write_config_byte(unsigned char bus, \
	unsigned char dev_fn, unsigned char offset, unsigned char val); \
extern int name##_pcibios_write_config_word(unsigned char bus, \
	unsigned char dev_fn, unsigned char offset, unsigned short val); \
extern int name##_pcibios_write_config_dword(unsigned char bus, \
	unsigned char dev_fn, unsigned char offset, unsigned int val)

#define set_config_access_method(name) \
	ppc_md.pcibios_read_config_byte = name##_pcibios_read_config_byte; \
	ppc_md.pcibios_read_config_word = name##_pcibios_read_config_word; \
	ppc_md.pcibios_read_config_dword = name##_pcibios_read_config_dword; \
	ppc_md.pcibios_write_config_byte = name##_pcibios_write_config_byte; \
	ppc_md.pcibios_write_config_word = name##_pcibios_write_config_word; \
	ppc_md.pcibios_write_config_dword = name##_pcibios_write_config_dword

#endif /* __PPC_KERNEL_PCI_H__ */