Changes in uspace/srv/hid/kbd/port/z8530.c [d9fae235:36e9cd1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/kbd/port/z8530.c
rd9fae235 r36e9cd1 30 30 * @ingroup kbd 31 31 * @{ 32 */ 32 */ 33 33 /** @file 34 * @brief 34 * @brief Z8530 keyboard port driver. 35 35 */ 36 36 … … 44 44 #include <sys/types.h> 45 45 #include <ddi.h> 46 #include <errno.h>47 46 48 #define CHAN_A_STATUS 49 #define CHAN_A_DATA 47 #define CHAN_A_STATUS 4 48 #define CHAN_A_DATA 6 50 49 51 #define RR0_RCA 50 #define RR0_RCA 1 52 51 53 52 static irq_cmd_t z8530_cmds[] = { 54 53 { 55 54 .cmd = CMD_PIO_READ_8, 56 .addr = (void *) 0, /* Will be patched in run-time */55 .addr = (void *) 0, /* will be patched in run-time */ 57 56 .dstarg = 1 58 57 }, … … 70 69 { 71 70 .cmd = CMD_PIO_READ_8, 72 .addr = (void *) 0, /* Will be patched in run-time */71 .addr = (void *) 0, /* will be patched in run-time */ 73 72 .dstarg = 2 74 73 }, … … 87 86 int z8530_port_init(void) 88 87 { 89 sysarg_t kaddr;90 if (sysinfo_get_value("kbd.address.kernel", &kaddr) != EOK)91 return -1;92 93 sysarg_t inr;94 if (sysinfo_get_value("kbd.inr", &inr) != EOK)95 return -1;96 97 z8530_cmds[0].addr = (void *) kaddr + CHAN_A_STATUS;98 z8530_cmds[3].addr = (void *) kaddr + CHAN_A_DATA;99 100 88 async_set_interrupt_received(z8530_irq_handler); 101 ipc_register_irq(inr, device_assign_devno(), inr, &z8530_kbd); 102 89 z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.kernel") + 90 CHAN_A_STATUS; 91 z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") + 92 CHAN_A_DATA; 93 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 94 sysinfo_value("kbd.inr"), &z8530_kbd); 103 95 return 0; 104 96 }
Note:
See TracChangeset
for help on using the changeset viewer.