Changes in uspace/srv/hw/char/i8042/i8042.c [89c09ae:d9fae235] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/char/i8042/i8042.c
r89c09ae rd9fae235 164 164 static int i8042_init(void) 165 165 { 166 if (sysinfo_get_value("i8042.address.physical", &i8042_physical) != EOK) 167 return -1; 168 169 if (sysinfo_get_value("i8042.address.kernel", &i8042_kernel) != EOK) 170 return -1; 171 166 172 void *vaddr; 167 168 i8042_physical = sysinfo_value("i8042.address.physical");169 i8042_kernel = sysinfo_value("i8042.address.kernel");170 173 if (pio_enable((void *) i8042_physical, sizeof(i8042_t), &vaddr) != 0) 171 174 return -1; 175 172 176 i8042 = vaddr; 173 177 178 sysarg_t inr_a; 179 sysarg_t inr_b; 180 181 if (sysinfo_get_value("i8042.inr_a", &inr_a) != EOK) 182 return -1; 183 184 if (sysinfo_get_value("i8042.inr_b", &inr_b) != EOK) 185 return -1; 186 174 187 async_set_interrupt_received(i8042_irq_handler); 175 188 176 189 /* Disable kbd and aux */ 177 190 wait_ready(); … … 186 199 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; 187 200 i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data; 188 ipc_register_irq(sysinfo_value("i8042.inr_a"), device_assign_devno(), 0, &i8042_kbd); 189 ipc_register_irq(sysinfo_value("i8042.inr_b"), device_assign_devno(), 0, &i8042_kbd); 190 printf("i8042: registered for interrupts %d and %d\n", 191 sysinfo_value("i8042.inr_a"), sysinfo_value("i8042.inr_b")); 201 ipc_register_irq(inr_a, device_assign_devno(), 0, &i8042_kbd); 202 ipc_register_irq(inr_b, device_assign_devno(), 0, &i8042_kbd); 203 printf("%s: registered for interrupts %d and %d\n", NAME, inr_a, inr_b); 192 204 193 205 wait_ready();
Note:
See TracChangeset
for help on using the changeset viewer.