diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-29 08:38:13 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-29 08:38:13 -0500 |
commit | 320e68da59353fe6ad51b81f6865c4b674ad66ea (patch) | |
tree | 9fc7f0f07a6a656a6384736f17f7d52da9a9f79e /arch/sh/include/asm/pci.h | |
parent | ac8ab54a8e41a5ed0ee2161d45b6dc855490989f (diff) |
sh: support PCI domains.
Newer SH parts are now commonly shipping with multiple controllers, so
we wire up PCI domain support to deal with them. Shamelessly cloned from
the MIPS implementation.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/pci.h')
-rw-r--r-- | arch/sh/include/asm/pci.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h index f362d8a045e7..d124a009889f 100644 --- a/arch/sh/include/asm/pci.h +++ b/arch/sh/include/asm/pci.h | |||
@@ -15,6 +15,7 @@ | |||
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 | struct resource *io_resource; |
@@ -24,8 +25,10 @@ struct pci_channel { | |||
24 | unsigned long mem_offset; | 25 | unsigned long mem_offset; |
25 | 26 | ||
26 | unsigned long reg_base; | 27 | unsigned long reg_base; |
27 | |||
28 | unsigned long io_map_base; | 28 | unsigned long io_map_base; |
29 | |||
30 | unsigned int index; | ||
31 | unsigned int need_domain_info; | ||
29 | }; | 32 | }; |
30 | 33 | ||
31 | extern void register_pci_controller(struct pci_channel *hose); | 34 | extern void register_pci_controller(struct pci_channel *hose); |
@@ -108,6 +111,14 @@ extern void pcibios_resource_to_bus(struct pci_dev *dev, | |||
108 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 111 | extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
109 | struct pci_bus_region *region); | 112 | struct pci_bus_region *region); |
110 | 113 | ||
114 | #define pci_domain_nr(bus) ((struct pci_channel *)(bus)->sysdata)->index | ||
115 | |||
116 | static inline int pci_proc_domain(struct pci_bus *bus) | ||
117 | { | ||
118 | struct pci_channel *hose = bus->sysdata; | ||
119 | return hose->need_domain_info; | ||
120 | } | ||
121 | |||
111 | /* Chances are this interrupt is wired PC-style ... */ | 122 | /* Chances are this interrupt is wired PC-style ... */ |
112 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 123 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
113 | { | 124 | { |