lithium.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. #ifndef __I386_LITHIUM_H
  2. #define __I386_LITHIUM_H
  3. #include <linux/config.h>
  4. /*
  5.  * Lithium is the I/O ASIC on the SGI 320 and 540 Visual Workstations
  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. #ifdef CONFIG_X86_VISWS_APIC
  16. /* More special purpose macros... */
  17. static __inline void li_pcia_write16(unsigned long reg, unsigned short v)
  18. {
  19. *((volatile unsigned short *)(LI_PCIA_VADDR+reg))=v;
  20. }
  21. static __inline unsigned short li_pcia_read16(unsigned long reg)
  22. {
  23.  return *((volatile unsigned short *)(LI_PCIA_VADDR+reg));
  24. }
  25. static __inline void li_pcib_write16(unsigned long reg, unsigned short v)
  26. {
  27. *((volatile unsigned short *)(LI_PCIB_VADDR+reg))=v;
  28. }
  29. static __inline unsigned short li_pcib_read16(unsigned long reg)
  30. {
  31. return *((volatile unsigned short *)(LI_PCIB_VADDR+reg));
  32. }
  33. #endif
  34. #endif