Subversion Repositories HelenOS

Rev

Rev 3655 | Rev 4220 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3655 Rev 3978
Line 42... Line 42...
42
#include <arch/types.h>
42
#include <arch/types.h>
43
#include <debug.h>
43
#include <debug.h>
44
#include <print.h>
44
#include <print.h>
45
#include <func.h>
45
#include <func.h>
46
#include <arch/asm.h>
46
#include <arch/asm.h>
-
 
47
#include <sysinfo/sysinfo.h>
47
 
48
 
48
#define SABRE_INTERNAL_REG  0
49
#define SABRE_INTERNAL_REG  0
49
#define PSYCHO_INTERNAL_REG 2   
50
#define PSYCHO_INTERNAL_REG 2   
50
 
51
 
51
#define OBIO_IMR_BASE   0x200
52
#define OBIO_IMR_BASE   0x200
Line 106... Line 107...
106
 
107
 
107
    pci->model = PCI_SABRE;
108
    pci->model = PCI_SABRE;
108
    pci->op = &pci_sabre_ops;
109
    pci->op = &pci_sabre_ops;
109
    pci->reg = (uint64_t *) hw_map(paddr, reg[SABRE_INTERNAL_REG].size);
110
    pci->reg = (uint64_t *) hw_map(paddr, reg[SABRE_INTERNAL_REG].size);
110
 
111
 
-
 
112
    /*
-
 
113
     * Set sysinfo data needed by the uspace OBIO driver.
-
 
114
     */
-
 
115
    sysinfo_set_item_val("obio.base.physical", NULL, paddr);
-
 
116
    sysinfo_set_item_val("kbd.cir.obio", NULL, 1);
-
 
117
 
111
    return pci;
118
    return pci;
112
}
119
}
113
 
120
 
114
 
121
 
115
/** Initialize the Psycho PCI controller.
122
/** Initialize the Psycho PCI controller.
Line 147... Line 154...
147
 
154
 
148
    pci->model = PCI_PSYCHO;
155
    pci->model = PCI_PSYCHO;
149
    pci->op = &pci_psycho_ops;
156
    pci->op = &pci_psycho_ops;
150
    pci->reg = (uint64_t *) hw_map(paddr, reg[PSYCHO_INTERNAL_REG].size);
157
    pci->reg = (uint64_t *) hw_map(paddr, reg[PSYCHO_INTERNAL_REG].size);
151
 
158
 
-
 
159
    /*
-
 
160
     * Set sysinfo data needed by the uspace OBIO driver.
-
 
161
     */
-
 
162
    sysinfo_set_item_val("obio.base.physical", NULL, paddr);
-
 
163
    sysinfo_set_item_val("kbd.cir.obio", NULL, 1);
-
 
164
 
152
    return pci;
165
    return pci;
153
}
166
}
154
 
167
 
155
void obio_enable_interrupt(pci_t *pci, int inr)
168
void obio_enable_interrupt(pci_t *pci, int inr)
156
{
169
{