Subversion Repositories HelenOS

Rev

Rev 4347 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4347 Rev 4348
Line 38... Line 38...
38
#include <ipc/bus.h>
38
#include <ipc/bus.h>
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 <sun.h>
43
#include <sys/types.h>
44
#include <sys/types.h>
44
#include <ddi.h>
45
#include <ddi.h>
45
 
46
 
46
#define CHAN_A_STATUS   4
47
#define CHAN_A_STATUS   4
47
#define CHAN_A_DATA 6
48
#define CHAN_A_DATA 6
Line 80... Line 81...
80
    z8530_cmds
81
    z8530_cmds
81
};
82
};
82
 
83
 
83
static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call);
84
static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call);
84
 
85
 
85
int kbd_port_init(void)
86
int z8530_port_init(void)
86
{
87
{
87
    async_set_interrupt_received(z8530_irq_handler);
88
    async_set_interrupt_received(z8530_irq_handler);
88
    z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.kernel") +
89
    z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.kernel") +
89
        CHAN_A_STATUS;
90
        CHAN_A_STATUS;
90
    z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") +
91
    z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") +
Line 92... Line 93...
92
    ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
93
    ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
93
        sysinfo_value("kbd.inr"), &z8530_kbd);
94
        sysinfo_value("kbd.inr"), &z8530_kbd);
94
    return 0;
95
    return 0;
95
}
96
}
96
 
97
 
-
 
98
void z8530_port_yield(void)
-
 
99
{
-
 
100
}
-
 
101
 
-
 
102
void z8530_port_reclaim(void)
-
 
103
{
-
 
104
}
-
 
105
 
97
static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call)
106
static void z8530_irq_handler(ipc_callid_t iid, ipc_call_t *call)
98
{
107
{
99
    int scan_code = IPC_GET_ARG2(*call);
108
    int scan_code = IPC_GET_ARG2(*call);
100
    kbd_push_scancode(scan_code);
109
    kbd_push_scancode(scan_code);
101
   
110