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

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