Changeset a09128c in mainline for uspace/drv/uhci/main.c


Ignore:
Timestamp:
2011-01-28T21:43:12Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0c3beeb, 4687fcd4, c2772b8
Parents:
c113056 (diff), 632ed68 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge: Doc update, usbkbd is usbhid, PCI I/O regs

Renamed usbkbd driver to usbhid.

Implemented ticket 46 (Get addresses of I/O registers from PCI).

Add some Doxygen groups (for usbhid driver and usbinfo application).

File:
1 edited

Legend:

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

    rc113056 ra09128c  
    3030#include <usb/debug.h>
    3131#include <errno.h>
     32#include <str_error.h>
    3233#include <driver.h>
    3334#include "uhci.h"
     
    5556        usb_dprintf(NAME, 1, "uhci_add_device() called\n");
    5657        device->ops = &uhci_ops;
     58
     59        uintptr_t io_reg_base;
     60        size_t io_reg_size;
     61        int irq;
     62
     63        int rc = pci_get_my_registers(device,
     64            &io_reg_base, &io_reg_size, &irq);
     65
     66        if (rc != EOK) {
     67                fprintf(stderr,
     68                    NAME ": failed to get I/O registers addresses: %s.\n",
     69                    str_error(rc));
     70                return rc;
     71        }
     72
     73        usb_dprintf(NAME, 2, "I/O regs at 0x%X (size %zu), IRQ %d.\n",
     74            io_reg_base, io_reg_size, irq);
    5775
    5876        /*
Note: See TracChangeset for help on using the changeset viewer.