init.c 1016 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include <linux/pci.h>
  2. #include <linux/init.h>
  3. #include <asm/pci_x86.h>
  4. /* arch_initcall has too random ordering, so call the initializers
  5. in the right sequence from here. */
  6. static __init int pci_arch_init(void)
  7. {
  8. #ifdef CONFIG_PCI_DIRECT
  9. int type = 0;
  10. type = pci_direct_probe();
  11. #endif
  12. if (!(pci_probe & PCI_PROBE_NOEARLY))
  13. pci_mmcfg_early_init();
  14. #ifdef CONFIG_PCI_OLPC
  15. if (!pci_olpc_init())
  16. return 0; /* skip additional checks if it's an XO */
  17. #endif
  18. #ifdef CONFIG_PCI_BIOS
  19. pci_pcbios_init();
  20. #endif
  21. /*
  22. * don't check for raw_pci_ops here because we want pcbios as last
  23. * fallback, yet it's needed to run first to set pcibios_last_bus
  24. * in case legacy PCI probing is used. otherwise detecting peer busses
  25. * fails.
  26. */
  27. #ifdef CONFIG_PCI_DIRECT
  28. pci_direct_init(type);
  29. #endif
  30. if (!raw_pci_ops && !raw_pci_ext_ops)
  31. printk(KERN_ERR
  32. "PCI: Fatal: No config space access function found\n");
  33. dmi_check_pciprobe();
  34. dmi_check_skip_isa_align();
  35. return 0;
  36. }
  37. arch_initcall(pci_arch_init);