summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/io.h
blob: 5aa1a3fac8cb6dfbf05f7579da8caa609b104480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef __SPARC_IO_H
#define __SPARC_IO_H

#include <asm/page.h>      /* IO address mapping routines need this */

/*
 * Defines for io operations on the Sparc. Whether a memory access is going
 * to i/o sparc is encoded in the pte. The type bits determine whether this
 * is i/o sparc, on board memory, or VME space for VME cards. I think VME
 * space only works on sun4's
 */

extern inline unsigned long inb_local(unsigned long addr)
{
  return 0;
}

extern inline void outb_local(unsigned char b, unsigned long addr)
{
  return;
}

extern inline unsigned long inb(unsigned long addr)
{
  return 0;
}

extern inline unsigned long inw(unsigned long addr)
{
  return 0;
}

extern inline unsigned long inl(unsigned long addr)
{
  return 0;
}

extern inline void outb(unsigned char b, unsigned long addr)
{
  return;
}

extern inline void outw(unsigned short b, unsigned long addr)
{
  return;
}

extern inline void outl(unsigned int b, unsigned long addr)
{
  return;
}

/*
 * Memory functions
 */
extern inline unsigned long readb(unsigned long addr)
{
  return 0;
}

extern inline unsigned long readw(unsigned long addr)
{
  return 0;
}

extern inline unsigned long readl(unsigned long addr)
{
  return 0;
}

extern inline void writeb(unsigned short b, unsigned long addr)
{
  return;
}

extern inline void writew(unsigned short b, unsigned long addr)
{
  return;
}

extern inline void writel(unsigned int b, unsigned long addr)
{
  return;
}

#define inb_p inb
#define outb_p outb

extern inline void mapioaddr(unsigned long physaddr, unsigned long virt_addr)
{
  unsigned long page_entry;

  page_entry = physaddr >> PAGE_SHIFT;
  page_entry |= (PTE_V | PTE_ACC | PTE_NC | PTE_IO);  /* kernel io addr */

  put_pte(virt_addr, page_entry);
  return;
}

#endif /* !(__SPARC_IO_H) */