Changeset ca56afa in mainline for uspace/drv/uhci-hcd/iface.c


Ignore:
Timestamp:
2011-02-25T09:46:23Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d493ac17
Parents:
15b0432 (diff), a80849c (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 with /usb/development

File:
1 edited

Legend:

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

    r15b0432 rca56afa  
    3232 * @brief UHCI driver
    3333 */
    34 #include <driver.h>
     34#include <ddf/driver.h>
    3535#include <remote_usbhc.h>
    3636
     
    4343
    4444/*----------------------------------------------------------------------------*/
    45 static int reserve_default_address(device_t *dev, usb_speed_t speed)
     45static int reserve_default_address(ddf_fun_t *fun, usb_speed_t speed)
    4646{
    47         assert(dev);
    48         uhci_t *hc = dev_to_uhci(dev);
     47        assert(fun);
     48        uhci_t *hc = fun_to_uhci(fun);
    4949        assert(hc);
    5050        usb_address_keeping_reserve_default(&hc->address_manager);
     
    5252}
    5353/*----------------------------------------------------------------------------*/
    54 static int release_default_address(device_t *dev)
     54static int release_default_address(ddf_fun_t *fun)
    5555{
    56         assert(dev);
    57         uhci_t *hc = dev_to_uhci(dev);
     56        assert(fun);
     57        uhci_t *hc = fun_to_uhci(fun);
    5858        assert(hc);
    5959        usb_address_keeping_release_default(&hc->address_manager);
     
    6161}
    6262/*----------------------------------------------------------------------------*/
    63 static int request_address(device_t *dev, usb_speed_t speed,
     63static int request_address(ddf_fun_t *fun, usb_speed_t speed,
    6464    usb_address_t *address)
    6565{
    66         assert(dev);
    67         uhci_t *hc = dev_to_uhci(dev);
     66        assert(fun);
     67        uhci_t *hc = fun_to_uhci(fun);
    6868        assert(hc);
    6969        *address = usb_address_keeping_request(&hc->address_manager);
     
    7474/*----------------------------------------------------------------------------*/
    7575static int bind_address(
    76   device_t *dev, usb_address_t address, devman_handle_t handle)
     76  ddf_fun_t *fun, usb_address_t address, devman_handle_t handle)
    7777{
    78         assert(dev);
    79         uhci_t *hc = dev_to_uhci(dev);
     78        assert(fun);
     79        uhci_t *hc = fun_to_uhci(fun);
    8080        assert(hc);
    8181        usb_address_keeping_devman_bind(&hc->address_manager, address, handle);
     
    8383}
    8484/*----------------------------------------------------------------------------*/
    85 static int release_address(device_t *dev, usb_address_t address)
     85static int release_address(ddf_fun_t *fun, usb_address_t address)
    8686{
    87         assert(dev);
    88         uhci_t *hc = dev_to_uhci(dev);
     87        assert(fun);
     88        uhci_t *hc = fun_to_uhci(fun);
    8989        assert(hc);
    9090        usb_address_keeping_release_default(&hc->address_manager);
     
    9292}
    9393/*----------------------------------------------------------------------------*/
    94 static int interrupt_out(device_t *dev, usb_target_t target,
     94static int interrupt_out(ddf_fun_t *fun, usb_target_t target,
    9595    size_t max_packet_size,
    9696    void *data, size_t size,
     
    9999        dev_speed_t speed = FULL_SPEED;
    100100
    101         batch_t *batch = batch_get(dev, target, USB_TRANSFER_INTERRUPT,
     101        batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT,
    102102            max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg);
    103103        if (!batch)
     
    107107}
    108108/*----------------------------------------------------------------------------*/
    109 static int interrupt_in(device_t *dev, usb_target_t target,
     109static int interrupt_in(ddf_fun_t *fun, usb_target_t target,
    110110    size_t max_packet_size,
    111111    void *data, size_t size,
     
    114114        dev_speed_t speed = FULL_SPEED;
    115115
    116         batch_t *batch = batch_get(dev, target, USB_TRANSFER_INTERRUPT,
     116        batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT,
    117117            max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg);
    118118        if (!batch)
     
    122122}
    123123/*----------------------------------------------------------------------------*/
    124 static int control_write(device_t *dev, usb_target_t target,
     124static int control_write(ddf_fun_t *fun, usb_target_t target,
    125125    size_t max_packet_size,
    126126    void *setup_data, size_t setup_size, void *data, size_t size,
     
    129129        dev_speed_t speed = FULL_SPEED;
    130130
    131         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
     131        batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL,
    132132            max_packet_size, speed, data, size, setup_data, setup_size,
    133133            NULL, callback, arg);
     
    138138}
    139139/*----------------------------------------------------------------------------*/
    140 static int control_read(device_t *dev, usb_target_t target,
     140static int control_read(ddf_fun_t *fun, usb_target_t target,
    141141    size_t max_packet_size,
    142142    void *setup_data, size_t setup_size, void *data, size_t size,
     
    145145        dev_speed_t speed = FULL_SPEED;
    146146
    147         batch_t *batch = batch_get(dev, target, USB_TRANSFER_CONTROL,
     147        batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL,
    148148            max_packet_size, speed, data, size, setup_data, setup_size, callback,
    149149            NULL, arg);
Note: See TracChangeset for help on using the changeset viewer.