Changeset 0d107f31 in mainline for kernel/genarch/src/kbd/z8530.c


Ignore:
Timestamp:
2006-10-13T20:42:54Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7dcf22a
Parents:
8ce8499
Message:

Prototypical implementation of new IRQ redirector in sparc64.
The new code can support shared IRQs in kernel (and multiple IRQs per device).
Userspace support is yet to be written.
The only architecture that uses this code is actually sparc64 only.

File:
1 edited

Legend:

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

    r8ce8499 r0d107f31  
    4040#include <genarch/kbd/scanc_sun.h>
    4141#include <arch/drivers/z8530.h>
     42#include <irq.h>
    4243#include <arch/interrupt.h>
    4344#include <arch/drivers/kbd.h>
     45#include <arch/drivers/fhc.h>
    4446#include <cpu.h>
    4547#include <arch/asm.h>
     
    170172}
    171173
     174irq_ownership_t z8530_claim(void)
     175{
     176        return (z8530_read_a(RR0) & RR0_RCA);
     177}
     178
     179void z8530_irq_handler(irq_t *irq, void *arg, ...)
     180{
     181        /*
     182         * So far, we know we got this interrupt through the FHC.
     183         * Since we don't have enough information about the FHC and
     184         * because the interrupt looks like level sensitive,
     185         * we cannot handle it by scheduling one of the level
     186         * interrupt traps. Process the interrupt directly.
     187         */
     188        if (z8530_belongs_to_kernel)
     189                z8530_interrupt();
     190        else
     191                ipc_irq_send_notif(0);
     192        fhc_clear_interrupt(central_fhc, irq->inr);
     193}
     194
    172195/** @}
    173196 */
Note: See TracChangeset for help on using the changeset viewer.