diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-20 06:48:48 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-20 06:48:48 -0400 |
commit | 0e75148108914062cb46ad3dc8f054a628018df7 (patch) | |
tree | eff47aed6df8f388be8755d5eea3ce6be8ea6056 /arch/sh/drivers | |
parent | c563bf0965c86cc6087b09c34ca063fe96d6deca (diff) |
sh: pci: Consolidate pcibios_setup() in pci-lib.
This wasn't really being used for anything useful, so just stub it in
pci-lib.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers')
-rw-r--r-- | arch/sh/drivers/pci/ops-dreamcast.c | 6 | ||||
-rw-r--r-- | arch/sh/drivers/pci/ops-sh4.c | 35 | ||||
-rw-r--r-- | arch/sh/drivers/pci/ops-sh5.c | 5 | ||||
-rw-r--r-- | arch/sh/drivers/pci/pci-lib.c | 5 |
4 files changed, 16 insertions, 35 deletions
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c index 5bc81d5b660a..529aa4f27a89 100644 --- a/arch/sh/drivers/pci/ops-dreamcast.c +++ b/arch/sh/drivers/pci/ops-dreamcast.c | |||
@@ -154,12 +154,6 @@ static int __init gapspci_init(struct pci_channel *chan) | |||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||
157 | /* Haven't done anything here as yet */ | ||
158 | char * __devinit pcibios_setup(char *str) | ||
159 | { | ||
160 | return str; | ||
161 | } | ||
162 | |||
163 | struct pci_channel board_pci_channels[] = { | 157 | struct pci_channel board_pci_channels[] = { |
164 | { gapspci_init, &gapspci_pci_ops, &gapspci_io_resource, | 158 | { gapspci_init, &gapspci_pci_ops, &gapspci_io_resource, |
165 | &gapspci_mem_resource, 0, 1 }, | 159 | &gapspci_mem_resource, 0, 1 }, |
diff --git a/arch/sh/drivers/pci/ops-sh4.c b/arch/sh/drivers/pci/ops-sh4.c index 2a7f7b50ff0a..7cc1fccf1c52 100644 --- a/arch/sh/drivers/pci/ops-sh4.c +++ b/arch/sh/drivers/pci/ops-sh4.c | |||
@@ -106,30 +106,27 @@ struct pci_ops sh4_pci_ops = { | |||
106 | * Not really related to pci_ops, but it's common and not worth shoving | 106 | * Not really related to pci_ops, but it's common and not worth shoving |
107 | * somewhere else for now.. | 107 | * somewhere else for now.. |
108 | */ | 108 | */ |
109 | static unsigned int pci_probe = PCI_PROBE_CONF1; | ||
110 | |||
111 | int __init sh4_pci_check_direct(struct pci_channel *chan) | 109 | int __init sh4_pci_check_direct(struct pci_channel *chan) |
112 | { | 110 | { |
113 | /* | 111 | /* |
114 | * Check if configuration works. | 112 | * Check if configuration works. |
115 | */ | 113 | */ |
116 | if (pci_probe & PCI_PROBE_CONF1) { | 114 | unsigned int tmp = pci_read_reg(chan, SH4_PCIPAR); |
117 | unsigned int tmp = pci_read_reg(chan, SH4_PCIPAR); | ||
118 | |||
119 | pci_write_reg(chan, P1SEG, SH4_PCIPAR); | ||
120 | 115 | ||
121 | if (pci_read_reg(chan, SH4_PCIPAR) == P1SEG) { | 116 | pci_write_reg(chan, P1SEG, SH4_PCIPAR); |
122 | pci_write_reg(chan, tmp, SH4_PCIPAR); | ||
123 | printk(KERN_INFO "PCI: Using configuration type 1\n"); | ||
124 | request_region(chan->reg_base + SH4_PCIPAR, 8, | ||
125 | "PCI conf1"); | ||
126 | return 0; | ||
127 | } | ||
128 | 117 | ||
118 | if (pci_read_reg(chan, SH4_PCIPAR) == P1SEG) { | ||
129 | pci_write_reg(chan, tmp, SH4_PCIPAR); | 119 | pci_write_reg(chan, tmp, SH4_PCIPAR); |
120 | printk(KERN_INFO "PCI: Using configuration type 1\n"); | ||
121 | request_region(chan->reg_base + SH4_PCIPAR, 8, | ||
122 | "PCI conf1"); | ||
123 | return 0; | ||
130 | } | 124 | } |
131 | 125 | ||
132 | pr_debug("PCI: pci_check_direct failed\n"); | 126 | pci_write_reg(chan, tmp, SH4_PCIPAR); |
127 | |||
128 | printk(KERN_ERR "PCI: %s failed\n", __func__); | ||
129 | |||
133 | return -EINVAL; | 130 | return -EINVAL; |
134 | } | 131 | } |
135 | 132 | ||
@@ -155,16 +152,6 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) | |||
155 | } | 152 | } |
156 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); | 153 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); |
157 | 154 | ||
158 | char * __devinit pcibios_setup(char *str) | ||
159 | { | ||
160 | if (!strcmp(str, "off")) { | ||
161 | pci_probe = 0; | ||
162 | return NULL; | ||
163 | } | ||
164 | |||
165 | return str; | ||
166 | } | ||
167 | |||
168 | int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan) | 155 | int __attribute__((weak)) pci_fixup_pcic(struct pci_channel *chan) |
169 | { | 156 | { |
170 | /* Nothing to do. */ | 157 | /* Nothing to do. */ |
diff --git a/arch/sh/drivers/pci/ops-sh5.c b/arch/sh/drivers/pci/ops-sh5.c index 729e38a6fe07..b10e2d5f4251 100644 --- a/arch/sh/drivers/pci/ops-sh5.c +++ b/arch/sh/drivers/pci/ops-sh5.c | |||
@@ -42,11 +42,6 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) | |||
42 | } | 42 | } |
43 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); | 43 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases); |
44 | 44 | ||
45 | char * __devinit pcibios_setup(char *str) | ||
46 | { | ||
47 | return str; | ||
48 | } | ||
49 | |||
50 | static int sh5pci_read(struct pci_bus *bus, unsigned int devfn, int where, | 45 | static int sh5pci_read(struct pci_bus *bus, unsigned int devfn, int where, |
51 | int size, u32 *val) | 46 | int size, u32 *val) |
52 | { | 47 | { |
diff --git a/arch/sh/drivers/pci/pci-lib.c b/arch/sh/drivers/pci/pci-lib.c index ea8362945849..f072acafce6c 100644 --- a/arch/sh/drivers/pci/pci-lib.c +++ b/arch/sh/drivers/pci/pci-lib.c | |||
@@ -134,6 +134,11 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq) | |||
134 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); | 134 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); |
135 | } | 135 | } |
136 | 136 | ||
137 | char * __devinit pcibios_setup(char *str) | ||
138 | { | ||
139 | return str; | ||
140 | } | ||
141 | |||
137 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 142 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
138 | enum pci_mmap_state mmap_state, int write_combine) | 143 | enum pci_mmap_state mmap_state, int write_combine) |
139 | { | 144 | { |