Rev 3981 | Rev 4042 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3981 | Rev 3982 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * Copyright (c) 2001-2004 Jakub Jermar |
2 | * Copyright (c) 2009 Jakub Jermar |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
Line 46... | Line 46... | ||
46 | #include <arch/asm.h> |
46 | #include <arch/asm.h> |
47 | #include <arch.h> |
47 | #include <arch.h> |
48 | #include <console/chardev.h> |
48 | #include <console/chardev.h> |
49 | #include <console/console.h> |
49 | #include <console/console.h> |
50 | #include <interrupt.h> |
50 | #include <interrupt.h> |
51 | #include <sysinfo/sysinfo.h> |
- | |
52 | 51 | ||
53 | /* Keyboard commands. */ |
52 | /* Keyboard commands. */ |
54 | #define KBD_ENABLE 0xf4 |
53 | #define KBD_ENABLE 0xf4 |
55 | #define KBD_DISABLE 0xf5 |
54 | #define KBD_DISABLE 0xf5 |
56 | #define KBD_ACK 0xfa |
55 | #define KBD_ACK 0xfa |
Line 146... | Line 145... | ||
146 | * Clear input buffer. |
145 | * Clear input buffer. |
147 | */ |
146 | */ |
148 | while (pio_read_8(&dev->status) & i8042_BUFFER_FULL_MASK) |
147 | while (pio_read_8(&dev->status) & i8042_BUFFER_FULL_MASK) |
149 | (void) pio_read_8(&dev->data); |
148 | (void) pio_read_8(&dev->data); |
150 | 149 | ||
151 | /* |
- | |
152 | * This is the necessary evil until the userspace driver is entirely |
- | |
153 | * self-sufficient. |
- | |
154 | */ |
- | |
155 | sysinfo_set_item_val("kbd", NULL, true); |
- | |
156 | sysinfo_set_item_val("kbd.devno", NULL, devno); |
- | |
157 | sysinfo_set_item_val("kbd.inr", NULL, inr); |
- | |
158 | #ifdef KBD_LEGACY |
- | |
159 | sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); |
- | |
160 | #endif |
- | |
161 | - | ||
162 | return true; |
150 | return true; |
163 | } |
151 | } |
164 | 152 | ||
165 | /* Called from getc(). */ |
153 | /* Called from getc(). */ |
166 | void i8042_resume(chardev_t *d) |
154 | void i8042_resume(chardev_t *d) |