diff options
Diffstat (limited to 'arch/sh/include/asm/pci.h')
| -rw-r--r-- | arch/sh/include/asm/pci.h | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h index 67f3999b544e..1042f7f0a48b 100644 --- a/arch/sh/include/asm/pci.h +++ b/arch/sh/include/asm/pci.h | |||
| @@ -15,20 +15,49 @@ | |||
| 15 | */ | 15 | */ |
| 16 | struct pci_channel { | 16 | struct pci_channel { |
| 17 | struct pci_channel *next; | 17 | struct pci_channel *next; |
| 18 | struct pci_bus *bus; | ||
| 18 | 19 | ||
| 19 | struct pci_ops *pci_ops; | 20 | struct pci_ops *pci_ops; |
| 20 | struct resource *io_resource; | 21 | |
| 21 | struct resource *mem_resource; | 22 | struct resource *resources; |
| 23 | unsigned int nr_resources; | ||
| 22 | 24 | ||
| 23 | unsigned long io_offset; | 25 | unsigned long io_offset; |
| 24 | unsigned long mem_offset; | 26 | unsigned long mem_offset; |
| 25 | 27 | ||
| 26 | unsigned long reg_base; | 28 | unsigned long reg_base; |
| 27 | |||
| 28 | unsigned long io_map_base; | 29 | unsigned long io_map_base; |
| 30 | |||
| 31 | unsigned int index; | ||
| 32 | unsigned int need_domain_info; | ||
| 33 | |||
| 34 | /* Optional error handling */ | ||
| 35 | struct timer_list err_timer, serr_timer; | ||
| 36 | unsigned int err_irq, serr_irq; | ||
| 29 | }; | 37 | }; |
| 30 | 38 | ||
| 31 | extern void register_pci_controller(struct pci_channel *hose); | 39 | /* arch/sh/drivers/pci/pci.c */ |
| 40 | extern int register_pci_controller(struct pci_channel *hose); | ||
| 41 | extern void pcibios_report_status(unsigned int status_mask, int warn); | ||
| 42 | |||
| 43 | /* arch/sh/drivers/pci/common.c */ | ||
| 44 | extern int early_read_config_byte(struct pci_channel *hose, int top_bus, | ||
| 45 | int bus, int devfn, int offset, u8 *value); | ||
| 46 | extern int early_read_config_word(struct pci_channel *hose, int top_bus, | ||
| 47 | int bus, int devfn, int offset, u16 *value); | ||
| 48 | extern int early_read_config_dword(struct pci_channel *hose, int top_bus, | ||
| 49 | int bus, int devfn, int offset, u32 *value); | ||
| 50 | extern int early_write_config_byte(struct pci_channel *hose, int top_bus, | ||
| 51 | int bus, int devfn, int offset, u8 value); | ||
| 52 | extern int early_write_config_word(struct pci_channel *hose, int top_bus, | ||
| 53 | int bus, int devfn, int offset, u16 value); | ||
| 54 | extern int early_write_config_dword(struct pci_channel *hose, int top_bus, | ||
| 55 | int bus, int devfn, int offset, u32 value); | ||
| 56 | extern void pcibios_enable_timers(struct pci_channel *hose); | ||
| 57 | extern unsigned int pcibios_handle_status_errors(unsigned long addr, | ||
| 58 | unsigned int status, struct pci_channel *hose); | ||
| 59 | extern int pci_is_66mhz_capable(struct pci_channel *hose, | ||
| 60 | int top_bus, int current_bus); | ||
| 32 | 61 | ||
| 33 | extern unsigned long PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM; | 62 | extern unsigned long PCIBIOS_MIN_IO, PCIBIOS_MIN_MEM; |
| 34 | 63 | ||
| @@ -99,20 +128,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
| 99 | } | 128 | } |
| 100 | #endif | 129 | #endif |
| 101 | 130 | ||
| 102 | #ifdef CONFIG_SUPERH32 | ||
| 103 | /* | ||
| 104 | * If we're on an SH7751 or SH7780 PCI controller, PCI memory is mapped | ||
| 105 | * at the end of the address space in a special non-translatable area. | ||
| 106 | */ | ||
| 107 | #define PCI_MEM_FIXED_START 0xfd000000 | ||
| 108 | #define PCI_MEM_FIXED_END (PCI_MEM_FIXED_START + 0x01000000) | ||
| 109 | |||
| 110 | #define is_pci_memory_fixed_range(s, e) \ | ||
| 111 | ((s) >= PCI_MEM_FIXED_START && (e) < PCI_MEM_FIXED_END) | ||
| 112 | #else | ||
| 113 | #define is_pci_memory_fixed_range(s, e) (0) | ||
| 114 | #endif | ||
| 115 | |||
| 116 | /* Board-specific fixup routines. */ | 131 | /* Board-specific fixup routines. */ |
| 117 | int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); | 132 | int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); |
| 118 | 133 | ||
| @@ -122,6 +137,14 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev, | |||
| 122 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 137 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
| 123 | struct pci_bus_region *region); | 138 | struct pci_bus_region *region); |
| 124 | 139 | ||
| 140 | #define pci_domain_nr(bus) ((struct pci_channel *)(bus)->sysdata)->index | ||
| 141 | |||
| 142 | static inline int pci_proc_domain(struct pci_bus *bus) | ||
| 143 | { | ||
| 144 | struct pci_channel *hose = bus->sysdata; | ||
| 145 | return hose->need_domain_info; | ||
| 146 | } | ||
| 147 | |||
| 125 | /* Chances are this interrupt is wired PC-style ... */ | 148 | /* Chances are this interrupt is wired PC-style ... */ |
| 126 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 149 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
| 127 | { | 150 | { |
