Changeset 2b017ba in mainline for kernel/genarch/src/kbd/z8530.c


Ignore:
Timestamp:
2006-10-16T20:51:55Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5f9b4d9a
Parents:
e3890b3f
Message:

Replace the old IRQ dispatcher and IPC notifier with new implementation.
Note that all architectures except for sparc64 are now broken
and don't even compile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/kbd/z8530.c

    re3890b3f r2b017ba  
    4141#include <arch/drivers/z8530.h>
    4242#include <ddi/irq.h>
     43#include <ipc/irq.h>
    4344#include <arch/interrupt.h>
    4445#include <arch/drivers/kbd.h>
     
    5960#define IGNORE_CODE     0x7f            /* all keys up */
    6061
    61 bool z8530_belongs_to_kernel = true;
    62 
    6362static z8530_t z8530;           /**< z8530 device structure. */
    6463static irq_t z8530_irq;         /**< z8530's IRQ. */
     
    7372};
    7473
    75 void z8530_wait(void);
    76 
    77 /** Initialize keyboard and service interrupts using kernel routine */
     74/** Initialize keyboard and service interrupts using kernel routine. */
    7875void z8530_grab(void)
    7976{
    80         z8530_belongs_to_kernel = true;
    81 }
    82 
    83 /** Resume the former interrupt vector */
     77}
     78
     79/** Resume the former IPC notification behavior. */
    8480void z8530_release(void)
    8581{
    86         z8530_belongs_to_kernel = false;
    8782}
    8883
     
    132127{
    133128        z8530_poll();
    134 }
    135 
    136 /** Wait until the controller reads its data. */
    137 void z8530_wait(void) {
    138129}
    139130
     
    195186        /*
    196187         * So far, we know we got this interrupt through the FHC.
    197          * Since we don't have enough information about the FHC and
    198          * because the interrupt looks like level sensitive,
     188         * Since we don't have enough documentation about the FHC
     189         * and because the interrupt looks like level sensitive,
    199190         * we cannot handle it by scheduling one of the level
    200191         * interrupt traps. Process the interrupt directly.
    201192         */
    202         if (z8530_belongs_to_kernel)
     193        if (irq->notif_cfg.answerbox)
     194                ipc_irq_send_notif(irq);
     195        else
    203196                z8530_interrupt();
    204         else
    205                 ipc_irq_send_notif(0);
    206197        fhc_clear_interrupt(central_fhc, irq->inr);
    207198}
Note: See TracChangeset for help on using the changeset viewer.