lithium.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _ASM_X86_VISWS_LITHIUM_H
  2. #define _ASM_X86_VISWS_LITHIUM_H
  3. #include <asm/fixmap.h>
  4. /*
  5. * Lithium is the SGI Visual Workstation I/O ASIC
  6. */
  7. #define LI_PCI_A_PHYS 0xfc000000 /* Enet is dev 3 */
  8. #define LI_PCI_B_PHYS 0xfd000000 /* PIIX4 is here */
  9. /* see set_fixmap() and asm/fixmap.h */
  10. #define LI_PCIA_VADDR (fix_to_virt(FIX_LI_PCIA))
  11. #define LI_PCIB_VADDR (fix_to_virt(FIX_LI_PCIB))
  12. /* Not a standard PCI? (not in linux/pci.h) */
  13. #define LI_PCI_BUSNUM 0x44 /* lo8: primary, hi8: sub */
  14. #define LI_PCI_INTEN 0x46
  15. /* LI_PCI_INTENT bits */
  16. #define LI_INTA_0 0x0001
  17. #define LI_INTA_1 0x0002
  18. #define LI_INTA_2 0x0004
  19. #define LI_INTA_3 0x0008
  20. #define LI_INTA_4 0x0010
  21. #define LI_INTB 0x0020
  22. #define LI_INTC 0x0040
  23. #define LI_INTD 0x0080
  24. /* More special purpose macros... */
  25. static inline void li_pcia_write16(unsigned long reg, unsigned short v)
  26. {
  27. *((volatile unsigned short *)(LI_PCIA_VADDR+reg))=v;
  28. }
  29. static inline unsigned short li_pcia_read16(unsigned long reg)
  30. {
  31. return *((volatile unsigned short *)(LI_PCIA_VADDR+reg));
  32. }
  33. static inline void li_pcib_write16(unsigned long reg, unsigned short v)
  34. {
  35. *((volatile unsigned short *)(LI_PCIB_VADDR+reg))=v;
  36. }
  37. static inline unsigned short li_pcib_read16(unsigned long reg)
  38. {
  39. return *((volatile unsigned short *)(LI_PCIB_VADDR+reg));
  40. }
  41. #endif /* _ASM_X86_VISWS_LITHIUM_H */