Rev 4347 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4347 | Rev 4348 | ||
---|---|---|---|
Line 153... | Line 153... | ||
153 | #ifdef CONFIG_PC_KBD |
153 | #ifdef CONFIG_PC_KBD |
154 | /* |
154 | /* |
155 | * Initialize the i8042 controller. Then initialize the keyboard |
155 | * Initialize the i8042 controller. Then initialize the keyboard |
156 | * module and connect it to i8042. Enable keyboard interrupts. |
156 | * module and connect it to i8042. Enable keyboard interrupts. |
157 | */ |
157 | */ |
158 | indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
158 | i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
- | 159 | if (i8042_instance) { |
|
- | 160 | kbrd_instance_t *kbrd_instance = kbrd_init(); |
|
159 | if (kbrdin) { |
161 | if (kbrd_instance) { |
160 | kbrd_init(kbrdin); |
162 | indev_t *sink = stdin_wire(); |
- | 163 | indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
|
- | 164 | i8042_wire(i8042_instance, kbrd); |
|
161 | trap_virtual_enable_irqs(1 << IRQ_KBD); |
165 | trap_virtual_enable_irqs(1 << IRQ_KBD); |
162 | } |
166 | } |
- | 167 | } |
|
163 | 168 | ||
164 | /* |
169 | /* |
165 | * This is the necessary evil until the userspace driver is entirely |
170 | * This is the necessary evil until the userspace driver is entirely |
166 | * self-sufficient. |
171 | * self-sufficient. |
167 | */ |
172 | */ |
Line 235... | Line 240... | ||
235 | void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
240 | void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
236 | { |
241 | { |
237 | return addr; |
242 | return addr; |
238 | } |
243 | } |
239 | 244 | ||
- | 245 | void arch_reboot(void) |
|
- | 246 | { |
|
- | 247 | #ifdef CONFIG_PC_KBD |
|
- | 248 | i8042_cpu_reset((i8042_t *) I8042_BASE); |
|
- | 249 | #endif |
|
- | 250 | } |
|
- | 251 | ||
240 | /** @} |
252 | /** @} |
241 | */ |
253 | */ |