38,8 → 38,8 |
#include <genarch/kbd/key.h> |
#include <genarch/kbd/scanc.h> |
#include <genarch/kbd/scanc_sun.h> |
#include <arch/drivers/fhc.h> |
#include <arch/drivers/z8530.h> |
#include <arch/drivers/kbd.h> |
#include <arch/interrupt.h> |
#include <cpu.h> |
#include <arch/asm.h> |
64,7 → 64,6 |
.read = key_read |
}; |
|
void z8530_interrupt(int n, istate_t *istate); |
void z8530_wait(void); |
|
/** Initialize keyboard and service interrupts using kernel routine */ |
71,13 → 70,12 |
void z8530_grab(void) |
{ |
} |
|
/** Resume the former interrupt vector */ |
void z8530_release(void) |
{ |
} |
|
#include <print.h> |
|
/** Initialize z8530. */ |
void z8530_init(void) |
{ |
84,13 → 82,22 |
chardev_initialize("z8530_kbd", &kbrd, &ops); |
stdin = &kbrd; |
|
(void) z8530_read_a(RR8); |
|
z8530_write_a(WR1, WR1_IARCSC); /* interrupt on all characters */ |
z8530_write_a(WR2, 12); /* FIXME: IRQ12 ??? */ |
|
/* 8 bits per character and enable receiver */ |
z8530_write_a(WR3, WR3_RX8BITSCH | WR3_RX_ENABLE); |
|
z8530_write_a(WR9, WR9_MIE); /* Master Interrupt Enable. */ |
|
/* |
* We need to initialize the FireHose Controller, |
* to which is this z8530 attached. Otherwise |
* interrupts generated by the z8530 would not |
* be forwarded to the CPU. |
*/ |
fhc_init(); |
} |
|
/** Process z8530 interrupt. |
98,8 → 105,9 |
* @param n Interrupt vector. |
* @param istate Interrupted state. |
*/ |
void z8530_interrupt(int n, istate_t *istate) |
void z8530_interrupt(void) |
{ |
z8530_poll(); |
} |
|
/** Wait until the controller reads its data. */ |