init.c 912 B

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