Changeset e7f2ad68 in mainline
- Timestamp:
- 2009-02-15T13:57:29Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ee06f2a
- Parents:
- 826a4e8d
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r826a4e8d re7f2ad68 305 305 ! [PLATFORM=ia64&MACHINE!=ski] CONFIG_NS16550 (n/y) 306 306 307 % Support for Serengeti console 308 ! [PLATFORM=sparc64] CONFIG_SGCN (y/n) 309 307 310 % IOSapic on default address support 308 311 ! [PLATFORM=ia64&MACHINE!=ski] CONFIG_IOSAPIC (y/n) 309 310 % Interrupt-driven driver for Legacy Keyboard311 ! [CONFIG_NS16550=n&CONFIG_IOSAPIC=y&MACHINE!=ski] CONFIG_I8042_INTERRUPT_DRIVEN (y/n)312 313 % Interrupt-driven driver for NS16550314 ! [CONFIG_NS16550=y&((PLATFORM!=ia64)|CONFIG_IOSAPIC=y)&MACHINE!=ski] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n)315 316 % Support for Serengeti console317 ! [PLATFORM=sparc64] CONFIG_SGCN (y/n)318 312 319 313 % Virtually indexed D-cache support -
kernel/arch/ia64/src/ia64.c
r826a4e8d re7f2ad68 149 149 } 150 150 151 152 #ifdef I460GX153 #define POLL_INTERVAL 50000 /* 50 ms */154 /** Kernel thread for polling keyboard. */155 static void i8042_kkbdpoll(void *arg)156 {157 while (1) {158 #ifdef CONFIG_NS16550159 #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN160 ns16550_poll();161 #endif162 #else163 #ifndef CONFIG_I8042_INTERRUPT_DRIVEN164 i8042_poll();165 #endif166 #endif167 thread_usleep(POLL_INTERVAL);168 }169 }170 #endif171 172 151 void arch_post_smp_init(void) 173 152 { 174 thread_t *t;175 176 153 /* 177 154 * Create thread that polls keyboard. 178 155 */ 179 156 #ifdef SKI 180 t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);157 thread_t *t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); 181 158 if (!t) 182 159 panic("Cannot create kkbdpoll."); … … 193 170 i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); 194 171 #endif 195 t = thread_create(i8042_kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);196 if (!t)197 panic("Cannot create kkbdpoll.");198 thread_ready(t);199 172 #endif 200 173 -
kernel/arch/sparc64/src/console.c
r826a4e8d re7f2ad68 142 142 thread_detach(THREAD); 143 143 144 #ifdef CONFIG_Z8530 145 if (kbd_type == KBD_Z8530) { 146 /* 147 * The z8530 driver is interrupt-driven. 148 */ 144 if (kbd_type != KBD_SGCN) 149 145 return; 150 } 151 #endif 152 153 #ifdef CONFIG_NS16550 154 #ifdef CONFIG_NS16550_INTERRUPT_DRIVEN 155 if (kbd_type == KBD_NS16550) { 156 /* 157 * The ns16550 driver is interrupt-driven. 158 */ 159 return; 160 } 161 #endif 162 #endif 146 163 147 while (1) { 164 #ifdef CONFIG_NS16550165 #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN166 if (kbd_type == KBD_NS16550)167 ns16550_poll();168 #endif169 #endif170 148 #ifdef CONFIG_SGCN 171 149 if (kbd_type == KBD_SGCN) -
kernel/arch/sparc64/src/sparc64.c
r826a4e8d re7f2ad68 104 104 static thread_t *t = NULL; 105 105 106 107 106 if (!t) { 108 107 /* -
kernel/genarch/src/kbd/ns16550.c
r826a4e8d re7f2ad68 139 139 sysinfo_set_item_val("kbd.port", NULL, port); 140 140 141 #ifdef CONFIG_NS16550_INTERRUPT_DRIVEN142 141 /* Enable interrupts */ 143 142 ns16550_ier_write(&ns16550, IER_ERBFI); 144 143 ns16550_mcr_write(&ns16550, MCR_OUT2); 145 #endif146 144 147 145 uint8_t c; … … 199 197 void ns16550_poll(void) 200 198 { 201 #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN202 ipl_t ipl;203 204 ipl = interrupts_disable();205 spinlock_lock(&ns16550_irq.lock);206 207 if (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) {208 if (ns16550_irq.notif_cfg.notify && ns16550_irq.notif_cfg.answerbox) {209 /*210 * Send IPC notification.211 */212 ipc_irq_send_notif(&ns16550_irq);213 spinlock_unlock(&ns16550_irq.lock);214 interrupts_restore(ipl);215 return;216 }217 }218 219 spinlock_unlock(&ns16550_irq.lock);220 interrupts_restore(ipl);221 #endif222 223 199 while (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) { 224 200 uint8_t x;
Note:
See TracChangeset
for help on using the changeset viewer.