diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 03:43:28 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 03:43:28 -0400 |
commit | 959f85f8a3223c116bbe95dd8a9b207790b5d4d3 (patch) | |
tree | e7da9ccf292f860bfa0ff9cc8b2682cd1d6bad4d /include/asm-sh/pci.h | |
parent | e108b2ca2349f510ce7d7f910eda89f71d710d84 (diff) |
sh: Consolidated SH7751/SH7780 PCI support.
This cleans up quite a lot of the PCI mess that we
currently have, and attempts to consolidate the
duplication in the SH7780 and SH7751 PCI controllers.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 18a109de0f2..6ccc948fe21 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) |