root/include/asm-sparc/io.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. inb_local
  2. outb_local
  3. inb
  4. inw
  5. outb
  6. outw
  7. outl
  8. readb
  9. readw
  10. readl
  11. writeb
  12. writew
  13. writel
  14. mapioaddr

   1 #ifndef __SPARC_IO_H
   2 #define __SPARC_IO_H
   3 
   4 #include <linux/kernel.h>
   5 
   6 #include <asm/page.h>      /* IO address mapping routines need this */
   7 #include <asm/system.h>
   8 
   9 /*
  10  * Defines for io operations on the Sparc. Whether a memory access is going
  11  * to i/o sparc is encoded in the pte. The type bits determine whether this
  12  * is i/o sparc, on board memory, or VME space for VME cards. I think VME
  13  * space only works on sun4's
  14  */
  15 
  16 extern inline unsigned long inb_local(unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  17 {
  18   return 0;
  19 }
  20 
  21 extern inline void outb_local(unsigned char b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  22 {
  23   return;
  24 }
  25 
  26 extern inline unsigned long inb(unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  27 {
  28   return 0;
  29 }
  30 
  31 extern inline unsigned long inw(unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  32 {
  33   return 0;
  34 }
  35 
  36 extern inline unsigned long inl(unsigned long addr)
  37 {
  38   return 0;
  39 }
  40 
  41 extern inline void outb(unsigned char b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  42 {
  43   return;
  44 }
  45 
  46 extern inline void outw(unsigned short b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  47 {
  48   return;
  49 }
  50 
  51 extern inline void outl(unsigned int b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  52 {
  53   return;
  54 }
  55 
  56 /*
  57  * Memory functions
  58  */
  59 extern inline unsigned long readb(unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  60 {
  61   return 0;
  62 }
  63 
  64 extern inline unsigned long readw(unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  65 {
  66   return 0;
  67 }
  68 
  69 extern inline unsigned long readl(unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  70 {
  71   return 0;
  72 }
  73 
  74 extern inline void writeb(unsigned short b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  75 {
  76   return;
  77 }
  78 
  79 extern inline void writew(unsigned short b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  80 {
  81   return;
  82 }
  83 
  84 extern inline void writel(unsigned int b, unsigned long addr)
     /* [previous][next][first][last][top][bottom][index][help] */
  85 {
  86   return;
  87 }
  88 
  89 #define inb_p inb
  90 #define outb_p outb
  91 
  92 extern void sun4c_mapioaddr(unsigned long, unsigned long, int bus_type, int rdonly);
  93 extern void srmmu_mapioaddr(unsigned long, unsigned long, int bus_type, int rdonly);
  94 
  95 extern inline void mapioaddr(unsigned long physaddr, unsigned long virt_addr,
     /* [previous][next][first][last][top][bottom][index][help] */
  96                              int bus, int rdonly)
  97 {
  98         switch(sparc_cpu_model) {
  99         case sun4c:
 100                 sun4c_mapioaddr(physaddr, virt_addr, bus, rdonly);
 101                 break;
 102         case sun4m:
 103         case sun4d:
 104         case sun4e:
 105                 srmmu_mapioaddr(physaddr, virt_addr, bus, rdonly);
 106                 break;
 107         default:
 108                 printk("mapioaddr: Trying to map IO space for unsupported machine.\n");
 109                 printk("mapioaddr: sparc_cpu_model = %d\n", sparc_cpu_model);
 110                 printk("mapioaddr: Halting...\n");
 111                 halt();
 112         };
 113         return;
 114 }
 115 
 116 extern void *sparc_alloc_io (void *, void *, int, char *, int, int);
 117 extern void *sparc_dvma_malloc (int, char *);
 118 
 119 #endif /* !(__SPARC_IO_H) */

/* [previous][next][first][last][top][bottom][index][help] */