OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [asm-sparc/] [io.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* $Id: io.h,v 1.1.1.1 2001-09-10 07:44:43 simons 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)
18
{
19
        return 0;
20
}
21
 
22
extern inline void outb_local(unsigned char b, unsigned long addr)
23
{
24
        return;
25
}
26
 
27
extern inline unsigned long inb(unsigned long addr)
28
{
29
        return 0;
30
}
31
 
32
extern inline unsigned long inw(unsigned long addr)
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)
43
{
44
        return;
45
}
46
 
47
extern inline void outw(unsigned short b, unsigned long addr)
48
{
49
        return;
50
}
51
 
52
extern inline void outl(unsigned int b, unsigned long addr)
53
{
54
        return;
55
}
56
 
57
/*
58
 * Memory functions
59
 */
60
extern inline unsigned long readb(unsigned long addr)
61
{
62
        return 0;
63
}
64
 
65
extern inline unsigned long readw(unsigned long addr)
66
{
67
        return 0;
68
}
69
 
70
extern inline unsigned long readl(unsigned long addr)
71
{
72
        return 0;
73
}
74
 
75
extern inline void writeb(unsigned short b, unsigned long addr)
76
{
77
        return;
78
}
79
 
80
extern inline void writew(unsigned short b, unsigned long addr)
81
{
82
        return;
83
}
84
 
85
extern inline void writel(unsigned int b, unsigned long addr)
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,
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) */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.