diff options
Diffstat (limited to 'include/asm-sh/pci.h')
-rw-r--r-- | include/asm-sh/pci.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/include/asm-sh/pci.h b/include/asm-sh/pci.h index 18a109de0f2e..6ccc948fe216 100644 --- a/include/asm-sh/pci.h +++ b/include/asm-sh/pci.h | |||
@@ -32,6 +32,34 @@ extern struct pci_channel board_pci_channels[]; | |||
32 | #define PCIBIOS_MIN_IO board_pci_channels->io_resource->start | 32 | #define PCIBIOS_MIN_IO board_pci_channels->io_resource->start |
33 | #define PCIBIOS_MIN_MEM board_pci_channels->mem_resource->start | 33 | #define PCIBIOS_MIN_MEM board_pci_channels->mem_resource->start |
34 | 34 | ||
35 | /* | ||
36 | * I/O routine helpers | ||
37 | */ | ||
38 | #ifdef CONFIG_CPU_SUBTYPE_SH7780 | ||
39 | #define PCI_IO_AREA 0xFE400000 | ||
40 | #define PCI_IO_SIZE 0x00400000 | ||
41 | #else | ||
42 | #define PCI_IO_AREA 0xFE240000 | ||
43 | #define PCI_IO_SIZE 0X00040000 | ||
44 | #endif | ||
45 | |||
46 | #define PCI_MEM_SIZE 0x01000000 | ||
47 | |||
48 | #define SH4_PCIIOBR_MASK 0xFFFC0000 | ||
49 | #define pci_ioaddr(addr) (PCI_IO_AREA + (addr & ~SH4_PCIIOBR_MASK)) | ||
50 | |||
51 | #if defined(CONFIG_PCI) | ||
52 | #define is_pci_ioaddr(port) \ | ||
53 | (((port) >= PCIBIOS_MIN_IO) && \ | ||
54 | ((port) < (PCIBIOS_MIN_IO + PCI_IO_SIZE))) | ||
55 | #define is_pci_memaddr(port) \ | ||
56 | (((port) >= PCIBIOS_MIN_MEM) && \ | ||
57 | ((port) < (PCIBIOS_MIN_MEM + PCI_MEM_SIZE))) | ||
58 | #else | ||
59 | #define is_pci_ioaddr(port) (0) | ||
60 | #define is_pci_memaddr(port) (0) | ||
61 | #endif | ||
62 | |||
35 | struct pci_dev; | 63 | struct pci_dev; |
36 | 64 | ||
37 | extern void pcibios_set_master(struct pci_dev *dev); | 65 | extern void pcibios_set_master(struct pci_dev *dev); |
@@ -98,11 +126,12 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
98 | #endif | 126 | #endif |
99 | 127 | ||
100 | /* Board-specific fixup routines. */ | 128 | /* Board-specific fixup routines. */ |
101 | extern void pcibios_fixup(void); | 129 | void pcibios_fixup(void); |
102 | extern void pcibios_fixup_irqs(void); | 130 | int pcibios_init_platform(void); |
131 | int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); | ||
103 | 132 | ||
104 | #ifdef CONFIG_PCI_AUTO | 133 | #ifdef CONFIG_PCI_AUTO |
105 | extern int pciauto_assign_resources(int busno, struct pci_channel *hose); | 134 | int pciauto_assign_resources(int busno, struct pci_channel *hose); |
106 | #endif | 135 | #endif |
107 | 136 | ||
108 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) | 137 | static inline void pcibios_add_platform_entries(struct pci_dev *dev) |