home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / include / asm-sparc / io.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-20  |  1.7 KB  |  101 lines

  1. #ifndef __SPARC_IO_H
  2. #define __SPARC_IO_H
  3.  
  4. #include <asm/page.h>      /* IO address mapping routines need this */
  5.  
  6. /*
  7.  * Defines for io operations on the Sparc. Whether a memory access is going
  8.  * to i/o sparc is encoded in the pte. The type bits determine whether this
  9.  * is i/o sparc, on board memory, or VME space for VME cards. I think VME
  10.  * space only works on sun4's
  11.  */
  12.  
  13. extern inline unsigned long inb_local(unsigned long addr)
  14. {
  15.   return 0;
  16. }
  17.  
  18. extern inline void outb_local(unsigned char b, unsigned long addr)
  19. {
  20.   return;
  21. }
  22.  
  23. extern inline unsigned long inb(unsigned long addr)
  24. {
  25.   return 0;
  26. }
  27.  
  28. extern inline unsigned long inw(unsigned long addr)
  29. {
  30.   return 0;
  31. }
  32.  
  33. extern inline unsigned long inl(unsigned long addr)
  34. {
  35.   return 0;
  36. }
  37.  
  38. extern inline void outb(unsigned char b, unsigned long addr)
  39. {
  40.   return;
  41. }
  42.  
  43. extern inline void outw(unsigned short b, unsigned long addr)
  44. {
  45.   return;
  46. }
  47.  
  48. extern inline void outl(unsigned int b, unsigned long addr)
  49. {
  50.   return;
  51. }
  52.  
  53. /*
  54.  * Memory functions
  55.  */
  56. extern inline unsigned long readb(unsigned long addr)
  57. {
  58.   return 0;
  59. }
  60.  
  61. extern inline unsigned long readw(unsigned long addr)
  62. {
  63.   return 0;
  64. }
  65.  
  66. extern inline unsigned long readl(unsigned long addr)
  67. {
  68.   return 0;
  69. }
  70.  
  71. extern inline void writeb(unsigned short b, unsigned long addr)
  72. {
  73.   return;
  74. }
  75.  
  76. extern inline void writew(unsigned short b, unsigned long addr)
  77. {
  78.   return;
  79. }
  80.  
  81. extern inline void writel(unsigned int b, unsigned long addr)
  82. {
  83.   return;
  84. }
  85.  
  86. #define inb_p inb
  87. #define outb_p outb
  88.  
  89. extern inline void mapioaddr(unsigned long physaddr, unsigned long virt_addr)
  90. {
  91.   unsigned long page_entry;
  92.  
  93.   page_entry = physaddr >> PAGE_SHIFT;
  94.   page_entry |= (PTE_V | PTE_ACC | PTE_NC | PTE_IO);  /* kernel io addr */
  95.  
  96.   put_pte(virt_addr, page_entry);
  97.   return;
  98. }
  99.  
  100. #endif /* !(__SPARC_IO_H) */
  101.