Changeset 6495e71 in mainline


Ignore:
Timestamp:
2011-02-25T16:04:33Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b4875e6
Parents:
6cbe7dad
Message:

Make interrupts compiletime option

Location:
uspace/drv/uhci-hcd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/main.c

    r6cbe7dad r6495e71  
    6161};
    6262/*----------------------------------------------------------------------------*/
     63#ifdef USE_INTERRUPTS
    6364static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
    6465{
     
    6970        uhci_interrupt(hc, status);
    7071}
     72#endif
    7173/*----------------------------------------------------------------------------*/
    7274#define CHECK_RET_RETURN(ret, message...) \
     
    9597            io_reg_base, io_reg_size, irq);
    9698
     99#ifdef USE_INTERRUPTS
    97100        ret = pci_enable_interrupts(device);
    98101        CHECK_RET_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret);
     102#endif
    99103
    100104        uhci_t *uhci_hc = malloc(sizeof(uhci_t));
     
    114118         */
    115119        device->driver_data = uhci_hc;
    116 
     120#ifdef USE_INTERRUPTS
    117121        ret = register_interrupt_handler(device, irq, irq_handler,
    118122            &uhci_hc->interrupt_code);
     
    123127                return ret;
    124128        }
     129#endif
    125130
    126131        ddf_fun_t *rh;
  • uspace/drv/uhci-hcd/uhci.c

    r6cbe7dad r6495e71  
    141141
    142142        instance->cleaner = fibril_create(uhci_interrupt_emulator, instance);
    143 //      fibril_add_ready(instance->cleaner);
     143#ifndef USE_INTERRUTPS
     144        fibril_add_ready(instance->cleaner);
     145#endif
    144146
    145147        instance->debug_checker = fibril_create(uhci_debug_checker, instance);
     
    294296                uint16_t status = pio_read_16(&instance->registers->usbsts);
    295297                uhci_interrupt(instance, status);
     298                pio_write_16(&instance->registers->usbsts, 0x1f);
    296299                async_usleep(UHCI_CLEANER_TIMEOUT);
    297300        }
Note: See TracChangeset for help on using the changeset viewer.