Ignore:
Timestamp:
2008-11-29T20:24:47Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
57e76cb
Parents:
dfd77382
Message:

Add additional members to the irq_t structure so that an interrupt-driven driver
does not need to know how to clear the level interrupt. The z8530 was modified
in this way and is much more generic. The ns16550 driver has also been modified,
but awaits testing. The sparc64 interrupt mapping and dispatch code is now using
the new info and calls the clear-interrupt-routine itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/kbd.c

    rdfd77382 r8d2760f  
    6464        ofw_tree_property_t *prop;
    6565        const char *name;
     66        cir_t cir;
     67        void *cir_arg;
    6668       
    6769        name = ofw_tree_node_name(node);
     
    110112                }
    111113                if (!ofw_fhc_map_interrupt(node->parent,
    112                     ((ofw_fhc_reg_t *) prop->value), interrupts, &inr)) {
     114                    ((ofw_fhc_reg_t *) prop->value), interrupts, &inr, &cir,
     115                    &cir_arg)) {
    113116                        printf("Failed to determine keyboard interrupt.\n");
    114117                        return;
     
    124127                }
    125128                if (!ofw_ebus_map_interrupt(node->parent,
    126                     ((ofw_ebus_reg_t *) prop->value), interrupts, &inr)) {
     129                    ((ofw_ebus_reg_t *) prop->value), interrupts, &inr, &cir,
     130                    &cir_arg)) {
    127131                        printf("Failed to determine keyboard interrupt.\n");
    128132                        return;
     
    147151#ifdef CONFIG_Z8530
    148152        case KBD_Z8530:
    149                 z8530_init(devno, inr, vaddr);
     153                z8530_init(devno, vaddr, inr, cir, cir_arg);
    150154                break;
    151155#endif
    152156#ifdef CONFIG_NS16550
    153157        case KBD_NS16550:
    154                 ns16550_init(devno, inr, (ioport_t)vaddr);
     158                ns16550_init(devno, (ioport_t)vaddr, inr, cir, cir_arg);
    155159                break;
    156160#endif
Note: See TracChangeset for help on using the changeset viewer.