Changeset e7f2ad68 in mainline


Ignore:
Timestamp:
2009-02-15T13:57:29Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ee06f2a
Parents:
826a4e8d
Message:

Get rid of CONFIG_NS16550_INTERRUPT_DRIVEN and CONFIG_I8042_INTERRUPT_DRIVEN.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r826a4e8d re7f2ad68  
    305305! [PLATFORM=ia64&MACHINE!=ski] CONFIG_NS16550 (n/y)
    306306
     307% Support for Serengeti console
     308! [PLATFORM=sparc64] CONFIG_SGCN (y/n)
     309
    307310% IOSapic on default address support
    308311! [PLATFORM=ia64&MACHINE!=ski] CONFIG_IOSAPIC (y/n)
    309 
    310 % Interrupt-driven driver for Legacy Keyboard
    311 ! [CONFIG_NS16550=n&CONFIG_IOSAPIC=y&MACHINE!=ski] CONFIG_I8042_INTERRUPT_DRIVEN (y/n)
    312 
    313 % Interrupt-driven driver for NS16550
    314 ! [CONFIG_NS16550=y&((PLATFORM!=ia64)|CONFIG_IOSAPIC=y)&MACHINE!=ski] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n)
    315 
    316 % Support for Serengeti console
    317 ! [PLATFORM=sparc64] CONFIG_SGCN (y/n)
    318312
    319313% Virtually indexed D-cache support
  • kernel/arch/ia64/src/ia64.c

    r826a4e8d re7f2ad68  
    149149}
    150150
    151 
    152 #ifdef I460GX
    153 #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_NS16550
    159         #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN
    160                 ns16550_poll();
    161         #endif 
    162 #else
    163         #ifndef CONFIG_I8042_INTERRUPT_DRIVEN
    164                 i8042_poll();
    165         #endif 
    166 #endif
    167                 thread_usleep(POLL_INTERVAL);
    168         }
    169 }
    170 #endif
    171 
    172151void arch_post_smp_init(void)
    173152{
    174         thread_t *t;
    175 
    176153        /*
    177154         * Create thread that polls keyboard.
    178155         */
    179156#ifdef SKI
    180         t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
     157        thread_t *t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
    181158        if (!t)
    182159                panic("Cannot create kkbdpoll.");
     
    193170        i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);
    194171#endif
    195         t = thread_create(i8042_kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
    196         if (!t)
    197                 panic("Cannot create kkbdpoll.");
    198         thread_ready(t);
    199172#endif
    200173
  • kernel/arch/sparc64/src/console.c

    r826a4e8d re7f2ad68  
    142142        thread_detach(THREAD);
    143143
    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)
    149145                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
    163147        while (1) {
    164 #ifdef CONFIG_NS16550
    165 #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN
    166                 if (kbd_type == KBD_NS16550)
    167                         ns16550_poll();
    168 #endif
    169 #endif
    170148#ifdef CONFIG_SGCN
    171149                if (kbd_type == KBD_SGCN)
  • kernel/arch/sparc64/src/sparc64.c

    r826a4e8d re7f2ad68  
    104104        static thread_t *t = NULL;
    105105
    106 
    107106        if (!t) {
    108107                /*
  • kernel/genarch/src/kbd/ns16550.c

    r826a4e8d re7f2ad68  
    139139        sysinfo_set_item_val("kbd.port", NULL, port);
    140140       
    141 #ifdef CONFIG_NS16550_INTERRUPT_DRIVEN
    142141        /* Enable interrupts */
    143142        ns16550_ier_write(&ns16550, IER_ERBFI);
    144143        ns16550_mcr_write(&ns16550, MCR_OUT2);
    145 #endif
    146144       
    147145        uint8_t c;
     
    199197void ns16550_poll(void)
    200198{
    201 #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN
    202         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 #endif
    222 
    223199        while (ns16550_lsr_read(&ns16550) & LSR_DATA_READY) {
    224200                uint8_t x;
Note: See TracChangeset for help on using the changeset viewer.