Changes in uspace/srv/hid/input/port/ns16550.c [a31aad1:5da7199] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/input/port/ns16550.c
ra31aad1 r5da7199 70 70 #define LSR_DATA_READY 0x01 71 71 72 static irq_pio_range_t ns16550_ranges[] = {73 {74 .base = 0,75 .size = 876 }77 };78 79 72 static irq_cmd_t ns16550_cmds[] = { 80 73 { … … 105 98 106 99 irq_code_t ns16550_kbd = { 107 sizeof(ns16550_ranges) / sizeof(irq_pio_range_t),108 ns16550_ranges,109 100 sizeof(ns16550_cmds) / sizeof(irq_cmd_t), 110 101 ns16550_cmds … … 114 105 115 106 static uintptr_t ns16550_physical; 107 static uintptr_t ns16550_kernel; 116 108 117 109 static kbd_dev_t *kbd_dev; … … 132 124 return -1; 133 125 126 if (sysinfo_get_value("kbd.address.kernel", &ns16550_kernel) != EOK) 127 return -1; 128 134 129 sysarg_t inr; 135 130 if (sysinfo_get_value("kbd.inr", &inr) != EOK) 136 131 return -1; 137 132 138 ns16550_kbd.ranges[0].base = ns16550_physical; 139 ns16550_kbd.cmds[0].addr = (void *) (ns16550_physical + LSR_REG); 140 ns16550_kbd.cmds[3].addr = (void *) (ns16550_physical + RBR_REG); 133 ns16550_kbd.cmds[0].addr = (void *) (ns16550_kernel + LSR_REG); 134 ns16550_kbd.cmds[3].addr = (void *) (ns16550_kernel + RBR_REG); 141 135 142 136 async_set_interrupt_received(ns16550_irq_handler); 143 irq_register(inr, device_assign_devno(), inr, &ns16550_kbd);137 register_irq(inr, device_assign_devno(), inr, &ns16550_kbd); 144 138 145 139 return pio_enable((void *) ns16550_physical, 8, &vaddr);
Note:
See TracChangeset
for help on using the changeset viewer.