pci-bridge.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 int pci_has_flag(int flag)
  39. {
  40. return pci_flags & flag;
  41. }
  42. #else
  43. static inline void pci_set_flags(int flags) { }
  44. static inline void pci_add_flags(int flags) { }
  45. static inline int pci_has_flag(int flag)
  46. {
  47. return 0;
  48. }
  49. #endif /* CONFIG_PCI */
  50. #endif /* __KERNEL__ */
  51. #endif /* _ASM_GENERIC_PCI_BRIDGE_H */