15 #include <linux/string.h>
16 #include <linux/pci.h>
19 #include <linux/kernel.h>
21 #include <linux/module.h>
23 #include <linux/slab.h>
24 #include <asm/machvec.h>
35 "PCI IO bus 0",
"PCI IO bus 1",
"PCI IO bus 2",
"PCI IO bus 3",
36 "PCI IO bus 4",
"PCI IO bus 5",
"PCI IO bus 6",
"PCI IO bus 7"
40 "PCI mem bus 0",
"PCI mem bus 1",
"PCI mem bus 2",
"PCI mem bus 3",
41 "PCI mem bus 4",
"PCI mem bus 5",
"PCI mem bus 6",
"PCI mem bus 7"
109 unsigned int class = dev->
class >> 8;
130 unsigned long alignto;
142 start = (start + 0x3ff) & ~0x3ff;
167 start =
ALIGN(start, alignto);
168 if (hose->sparse_mem_base && size <= 7 * 16*
MB) {
169 if (((start / (16*
MB)) & 0x7) == 0) {
170 start &= ~(128*
MB - 1);
172 start =
ALIGN(start, alignto);
174 if (start/(128*
MB) != (start + size - 1)/(128*
MB)) {
175 start &= ~(128*
MB - 1);
176 start += (128 + 16)*
MB;
177 start =
ALIGN(start, alignto);
191 if (alpha_mv.init_pci)
198 #ifdef ALPHA_RESTORE_SRM_SETUP
199 static struct pdev_srm_saved_conf *srm_saved_configs;
204 struct pdev_srm_saved_conf *
tmp;
205 static int printed = 0;
207 if (!alpha_using_srm || pci_has_flag(PCI_PROBE_ONLY))
220 tmp->next = srm_saved_configs;
225 srm_saved_configs =
tmp;
231 struct pdev_srm_saved_conf *
tmp;
234 if (pci_has_flag(PCI_PROBE_ONLY))
238 for (tmp = srm_saved_configs;
tmp; tmp = tmp->next) {
249 if (pci_has_flag(PCI_PROBE_ONLY) && dev &&
275 if (lat >= 16)
return;
276 printk(
"PCI: Setting latency timer of device %s to 64\n",
295 if (pci_has_flag(PCI_PROBE_ONLY) ||
306 pcibios_claim_console_setup(
void)
321 int need_domain_info = 0;
327 for (next_busno = 0, hose = hose_head; hose; hose = hose->next) {
328 sg_base = hose->sg_pci ? hose->sg_pci->dma_base : ~0;
333 end = hose->mem_space->start + pci_mem_end;
334 if (hose->mem_space->end > end)
335 hose->mem_space->end =
end;
337 INIT_LIST_HEAD(&resources);
339 hose->io_space->start);
341 hose->mem_space->start);
346 hose->need_domain_info = need_domain_info;
350 if (next_busno > 224) {
352 need_domain_info = 1;
356 pcibios_claim_console_setup();
371 hose_tail = &hose->next;
398 for(hose = hose_head; hose; hose = hose->next)
399 if (hose->
index == bus)
break;
400 if (!hose)
return -
ENODEV;
403 if (bus == 0 && dfn == 0) {
414 switch (which & ~IOBASE_FROM_HOSE) {
418 return hose->sparse_mem_base;
420 return hose->dense_mem_base;
422 return hose->sparse_io_base;
424 return hose->dense_io_base;
426 return hose->bus->number;