Changeset 15d0046 in mainline for uspace/drv/bus/usb/uhci/uhci.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (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 mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci.c

    r8db09e4 r15d0046  
    3434 */
    3535
    36 /* XXX Fix this */
    37 #define _DDF_DATA_IMPLANT
    38 
    3936#include <errno.h>
    4037#include <stdbool.h>
     
    6259        hc_t hc;
    6360        /** Internal driver's representation of UHCI root hub */
    64         rh_t rh;
     61        rh_t *rh;
    6562} uhci_t;
    6663
     
    7269/** IRQ handling callback, forward status from call to diver structure.
    7370 *
    74  * @param[in] dev DDF instance of the device to use.
    7571 * @param[in] iid (Unused).
    7672 * @param[in] call Pointer to the call from kernel.
    77  */
    78 static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
     73 * @param[in] dev DDF instance of the device to use.
     74 *
     75 */
     76static void irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev)
    7977{
    8078        assert(dev);
     79       
    8180        uhci_t *uhci = dev_to_uhci(dev);
    8281        if (!uhci) {
     
    8483                return;
    8584        }
     85       
    8686        const uint16_t status = IPC_GET_ARG1(*call);
    8787        hc_interrupt(&uhci->hc, status);
     
    186186
    187187        ddf_fun_set_ops(instance->hc_fun, &hc_ops);
    188         ddf_fun_data_implant(instance->hc_fun, &instance->hc.generic);
    189188
    190189        instance->rh_fun = ddf_fun_create(device, fun_inner, "uhci_rh");
     
    196195
    197196        ddf_fun_set_ops(instance->rh_fun, &rh_ops);
    198         ddf_fun_data_implant(instance->rh_fun, &instance->rh);
     197        instance->rh = ddf_fun_data_alloc(instance->rh_fun, sizeof(rh_t));
    199198
    200199        addr_range_t regs;
     
    236235        }
    237236
    238         rc = hc_init(&instance->hc, &regs, interrupts);
     237        rc = hc_init(&instance->hc, instance->hc_fun, &regs, interrupts);
    239238        if (rc != EOK) {
    240239                usb_log_error("Failed to init uhci_hcd: %s.\n", str_error(rc));
     
    260259        }
    261260
    262         rc = rh_init(&instance->rh, instance->rh_fun, &regs, 0x10, 4);
     261        rc = rh_init(instance->rh, instance->rh_fun, &regs, 0x10, 4);
    263262        if (rc != EOK) {
    264263                usb_log_error("Failed to setup UHCI root hub: %s.\n",
Note: See TracChangeset for help on using the changeset viewer.