Subversion Repositories HelenOS

Rev

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

Rev 4344 Rev 4345
Line 39... Line 39...
39
#include <async.h>
39
#include <async.h>
40
#include <sysinfo.h>
40
#include <sysinfo.h>
41
#include <kbd.h>
41
#include <kbd.h>
42
#include <kbd_port.h>
42
#include <kbd_port.h>
43
#include <sys/types.h>
43
#include <sys/types.h>
-
 
44
#include <ddi.h>
44
 
45
 
45
#define CHAN_A_STATUS   4
46
#define CHAN_A_STATUS   4
46
#define CHAN_A_DATA 6
47
#define CHAN_A_DATA 6
47
 
48
 
48
#define RR0_RCA 1
49
#define RR0_RCA 1
Line 82... Line 83...
82
static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call);
83
static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call);
83
 
84
 
84
int kbd_port_init(void)
85
int kbd_port_init(void)
85
{
86
{
86
    async_set_interrupt_received(z8530_irq_handler);
87
    async_set_interrupt_received(z8530_irq_handler);
87
    z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual") +
88
    z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.kernel") +
88
        CHAN_A_STATUS;
89
        CHAN_A_STATUS;
89
    z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.virtual") +
90
    z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") +
90
        CHAN_A_DATA;
91
        CHAN_A_DATA;
91
    ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
92
    ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
92
        sysinfo_value("kbd.inr"), &z8530_kbd);
93
        sysinfo_value("kbd.inr"), &z8530_kbd);
93
    return 0;
94
    return 0;
94
}
95
}