Changes in uspace/srv/hw/char/i8042/i8042.c [d9fae235:89c09ae] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/char/i8042/i8042.c
rd9fae235 r89c09ae 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 172 166 void *vaddr; 167 168 i8042_physical = sysinfo_value("i8042.address.physical"); 169 i8042_kernel = sysinfo_value("i8042.address.kernel"); 173 170 if (pio_enable((void *) i8042_physical, sizeof(i8042_t), &vaddr) != 0) 174 171 return -1; 175 176 172 i8042 = vaddr; 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 173 187 174 async_set_interrupt_received(i8042_irq_handler); 188 175 189 176 /* Disable kbd and aux */ 190 177 wait_ready(); … … 199 186 i8042_kbd.cmds[0].addr = (void *) &((i8042_t *) i8042_kernel)->status; 200 187 i8042_kbd.cmds[3].addr = (void *) &((i8042_t *) i8042_kernel)->data; 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); 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")); 204 192 205 193 wait_ready();
Note:
See TracChangeset
for help on using the changeset viewer.