Changeset 42dbb26 in mainline for uspace/drv/ohci/ohci_rh.c


Ignore:
Timestamp:
2011-03-20T18:36:09Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e7bc999
Parents:
b8e9acb
Message:

Enable access to device registers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/ohci_rh.c

    rb8e9acb r42dbb26  
    3535#include <errno.h>
    3636#include <str_error.h>
    37 #include <stdio.h>
    3837
    3938#include <usb/debug.h>
     
    4241
    4342/** Root hub initialization
    44  * @param[in] instance RH structure to initialize
    45  * @param[in] fun DDF function representing UHCI root hub
    46  * @param[in] reg_addr Address of root hub status and control registers.
    47  * @param[in] reg_size Size of accessible address space.
    4843 * @return Error code.
    4944 */
    50 int ohci_rh_init(ohci_rh_t *instance, uintptr_t reg_addr, size_t reg_size)
     45int ohci_rh_init(ohci_rh_t *instance, ohci_regs_t *regs)
    5146{
    5247        assert(instance);
    5348        instance->address = 0;
     49        instance->registers = regs;
     50
     51        usb_log_info("OHCI root hub with %d ports.\n", regs->rh_desc_a & 0xff);
     52
    5453        /* TODO: implement */
    5554        return EOK;
Note: See TracChangeset for help on using the changeset viewer.