pci-bridge.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License
  4. * as published by the Free Software Foundation; either version
  5. * 2 of the License, or (at your option) any later version.
  6. */
  7. #ifndef _ASM_GENERIC_PCI_BRIDGE_H
  8. #define _ASM_GENERIC_PCI_BRIDGE_H
  9. #ifdef __KERNEL__
  10. enum {
  11. /* Force re-assigning all resources (ignore firmware
  12. * setup completely)
  13. */
  14. PCI_REASSIGN_ALL_RSRC = 0x00000001,
  15. /* Re-assign all bus numbers */
  16. PCI_REASSIGN_ALL_BUS = 0x00000002,
  17. /* Do not try to assign, just use existing setup */
  18. PCI_PROBE_ONLY = 0x00000004,
  19. /* Don't bother with ISA alignment unless the bridge has
  20. * ISA forwarding enabled
  21. */
  22. PCI_CAN_SKIP_ISA_ALIGN = 0x00000008,
  23. /* Enable domain numbers in /proc */
  24. PCI_ENABLE_PROC_DOMAINS = 0x00000010,
  25. /* ... except for domain 0 */
  26. PCI_COMPAT_DOMAIN_0 = 0x00000020,
  27. };
  28. #ifdef CONFIG_PCI
  29. extern unsigned int pci_flags;
  30. static inline void pci_set_flags(int flags)
  31. {
  32. pci_flags = flags;
  33. }
  34. static inline void pci_add_flags(int flags)
  35. {
  36. pci_flags |= flags;
  37. }
  38. static inline void pci_clear_flags(int flags)
  39. {
  40. pci_flags &= ~flags;
  41. }
  42. static inline int pci_has_flag(int flag)
  43. {
  44. return pci_flags & flag;
  45. }
  46. #else
  47. static inline void pci_set_flags(int flags) { }
  48. static inline void pci_add_flags(int flags) { }
  49. static inline void pci_clear_flags(int flags) { }
  50. static inline int pci_has_flag(int flag)
  51. {
  52. return 0;
  53. }
  54. #endif /* CONFIG_PCI */
  55. #endif /* __KERNEL__ */
  56. #endif /* _ASM_GENERIC_PCI_BRIDGE_H */