Changeset 21df2e5 in mainline
- Timestamp:
- 2009-02-21T20:49:01Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0c33687a
- Parents:
- 7bdd725
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/kbd/port/ns16550.c
r7bdd725 r21df2e5 51 51 #define LSR_REG 5 /** Line Status Register. */ 52 52 53 irq_cmd_t ns16550_cmds[1] = { 54 { CMD_PORT_READ_1, 0, 0, 2 }, 53 #define LSR_DATA_READY 0x01 54 55 static irq_cmd_t ns16550_cmds[] = { 56 { 57 .cmd = CMD_PIO_READ_8, 58 .addr = (void *) 0, /* will be patched in run-time */ 59 .dstarg = 1 60 }, 61 { 62 .cmd = CMD_BTEST, 63 .value = LSR_DATA_READY, 64 .srcarg = 1, 65 .dstarg = 3 66 }, 67 { 68 .cmd = CMD_PREDICATE, 69 .value = 2, 70 .srcarg = 3 71 }, 72 { 73 .cmd = CMD_PIO_READ_8, 74 .addr = (void *) 0, /* will be patched in run-time */ 75 .dstarg = 2 76 }, 77 { 78 .cmd = CMD_ACCEPT 79 } 55 80 }; 56 81 57 82 irq_code_t ns16550_kbd = { 58 1,83 sizeof(ns16550_cmds) / sizeof(irq_cmd_t), 59 84 ns16550_cmds 60 85 }; … … 69 94 70 95 ns16550_port = sysinfo_value("kbd.port"); 71 ns16550_kbd.cmds[0].addr = (void *) (ns16550_port + RBR_REG); 96 ns16550_kbd.cmds[0].addr = (void *) (ns16550_port + LSR_REG); 97 ns16550_kbd.cmds[3].addr = (void *) (ns16550_port + RBR_REG); 72 98 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 73 99 0, &ns16550_kbd); … … 76 102 return 0; 77 103 } 78 79 #define LSR_DATA_READY 0x0180 104 81 105 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call)
Note:
See TracChangeset
for help on using the changeset viewer.