Subversion Repositories HelenOS

Rev

Rev 4347 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4347 Rev 4348
Line 195... Line 195...
195
#ifdef CONFIG_PC_KBD
195
#ifdef CONFIG_PC_KBD
196
    /*
196
    /*
197
     * Initialize the i8042 controller. Then initialize the keyboard
197
     * Initialize the i8042 controller. Then initialize the keyboard
198
     * module and connect it to i8042. Enable keyboard interrupts.
198
     * module and connect it to i8042. Enable keyboard interrupts.
199
     */
199
     */
200
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
200
    i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
-
 
201
    if (i8042_instance) {
-
 
202
        kbrd_instance_t *kbrd_instance = kbrd_init();
201
    if (kbrdin) {
203
        if (kbrd_instance) {
202
        kbrd_init(kbrdin);
204
            indev_t *sink = stdin_wire();
-
 
205
            indev_t *kbrd = kbrd_wire(kbrd_instance, sink);
-
 
206
            i8042_wire(i8042_instance, kbrd);
203
        trap_virtual_enable_irqs(1 << IRQ_KBD);
207
            trap_virtual_enable_irqs(1 << IRQ_KBD);
-
 
208
        }
204
    }
209
    }
205
   
210
   
206
    /*
211
    /*
207
     * This is the necessary evil until the userspace driver is entirely
212
     * This is the necessary evil until the userspace driver is entirely
208
     * self-sufficient.
213
     * self-sufficient.
Line 279... Line 284...
279
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller)
284
void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller)
280
{
285
{
281
    return addr;
286
    return addr;
282
}
287
}
283
 
288
 
-
 
289
void arch_reboot(void)
-
 
290
{
-
 
291
#ifdef CONFIG_PC_KBD
-
 
292
    i8042_cpu_reset((i8042_t *) I8042_BASE);
-
 
293
#endif
-
 
294
}
-
 
295
 
284
/** @}
296
/** @}
285
 */
297
 */