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