Changeset cabda7f in mainline for uspace/drv/uhci-hcd/main.c


Ignore:
Timestamp:
2011-02-25T20:48:30Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0fde1d5
Parents:
2d33eb5
Message:

Minor fixes

initialize stack variables
use fixed size 32B address space
get rid of USE_INTERRUPTS macro
comment interrupt enabling code
reset hc before taking control

File:
1 edited

Legend:

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

    r2d33eb5 rcabda7f  
    6161};
    6262/*----------------------------------------------------------------------------*/
    63 #ifdef USE_INTERRUPTS
    6463static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
    6564{
     
    7069        uhci_interrupt(hc, status);
    7170}
    72 #endif
    7371/*----------------------------------------------------------------------------*/
    7472#define CHECK_RET_RETURN(ret, message...) \
     
    8583
    8684
    87         uintptr_t io_reg_base;
    88         size_t io_reg_size;
    89         int irq;
     85        uintptr_t io_reg_base = 0;
     86        size_t io_reg_size = 0;
     87        int irq = 0;
    9088
    9189        int ret =
    9290            pci_get_my_registers(device, &io_reg_base, &io_reg_size, &irq);
    93         io_reg_size = sizeof(regs_t);
    9491
    9592        CHECK_RET_RETURN(ret,
     
    9794        usb_log_info("I/O regs at 0x%X (size %zu), IRQ %d.\n",
    9895            io_reg_base, io_reg_size, irq);
     96        io_reg_size = 32;
    9997
    100 #ifdef USE_INTERRUPTS
    101         ret = pci_enable_interrupts(device);
    102         CHECK_RET_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret);
    103 #endif
     98//      ret = pci_enable_interrupts(device);
     99//      CHECK_RET_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret);
    104100
    105101        uhci_t *uhci_hc = malloc(sizeof(uhci_t));
     
    119115         */
    120116        device->driver_data = uhci_hc;
    121 #ifdef USE_INTERRUPTS
    122117        ret = register_interrupt_handler(device, irq, irq_handler,
    123118            &uhci_hc->interrupt_code);
     
    128123                return ret;
    129124        }
    130 #endif
    131125
    132126        ddf_fun_t *rh;
     
    155149{
    156150        sleep(3);
    157         usb_log_enable(USB_LOG_LEVEL_INFO, NAME);
     151        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
    158152
    159153        return ddf_driver_main(&uhci_driver);
Note: See TracChangeset for help on using the changeset viewer.