Changeset ff685c9 in mainline for uspace/srv/kbd/port/ns16550.c
- Timestamp:
- 2009-03-03T23:00:33Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 150385b9
- Parents:
- 9cd98796
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/kbd/port/ns16550.c
r9cd98796 rff685c9 87 87 static void ns16550_irq_handler(ipc_callid_t iid, ipc_call_t *call); 88 88 89 uint16_t ns16550_port; 89 static uintptr_t ns16550_physical; 90 static uintptr_t ns16550_kernel; 90 91 91 92 int kbd_port_init(void) 92 93 { 94 void *vaddr; 95 93 96 async_set_interrupt_received(ns16550_irq_handler); 94 97 95 ns16550_port = sysinfo_value("kbd.port"); 96 ns16550_kbd.cmds[0].addr = (void *) (ns16550_port + LSR_REG); 97 ns16550_kbd.cmds[3].addr = (void *) (ns16550_port + RBR_REG); 98 ns16550_physical = sysinfo_value("kbd.address.physical"); 99 ns16550_kernel = sysinfo_value("kbd.address.kernel"); 100 ns16550_kbd.cmds[0].addr = (void *) (ns16550_kernel + LSR_REG); 101 ns16550_kbd.cmds[3].addr = (void *) (ns16550_kernel + RBR_REG); 98 102 ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 99 103 0, &ns16550_kbd); 100 iospace_enable(task_get_id(), ns16550_port, 8); 101 102 return 0; 104 return pio_enable((void *) ns16550_physical, 8, &vaddr); 103 105 } 104 106
Note:
See TracChangeset
for help on using the changeset viewer.