Changeset ae3a941 in mainline for uspace/drv/bus/usb/ehci


Ignore:
Timestamp:
2018-02-26T16:51:40Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e773f58
Parents:
3692678
Message:

usb: cstyle

Location:
uspace/drv/bus/usb/ehci
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_batch.h

    r3692678 rae3a941  
    6363} ehci_transfer_batch_t;
    6464
    65 ehci_transfer_batch_t * ehci_transfer_batch_create(endpoint_t *ep);
     65ehci_transfer_batch_t *ehci_transfer_batch_create(endpoint_t *ep);
    6666int ehci_transfer_batch_prepare(ehci_transfer_batch_t *batch);
    6767void ehci_transfer_batch_commit(const ehci_transfer_batch_t *batch);
     
    6969void ehci_transfer_batch_destroy(ehci_transfer_batch_t *batch);
    7070
    71 static inline ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *usb_batch)
     71static inline ehci_transfer_batch_t *ehci_transfer_batch_get(
     72    usb_transfer_batch_t *usb_batch)
    7273{
    7374        assert(usb_batch);
  • uspace/drv/bus/usb/ehci/ehci_bus.c

    r3692678 rae3a941  
    5454        ehci_endpoint_t *instance = ehci_endpoint_get(ep);
    5555        if (qh_toggle_from_td(instance->qh))
    56                 usb_log_warning("EP(%p): Resetting toggle bit for transfer directed EP", instance);
     56                usb_log_warning("EP(%p): Resetting toggle bit for transfer "
     57                    "directed EP", instance);
    5758        qh_toggle_set(instance->qh, 0);
    5859}
     
    7273/** Creates new hcd endpoint representation.
    7374 */
    74 static endpoint_t *ehci_endpoint_create(device_t *dev, const usb_endpoint_descriptors_t *desc)
     75static endpoint_t *ehci_endpoint_create(device_t *dev,
     76    const usb_endpoint_descriptors_t *desc)
    7577{
    7678        assert(dev);
  • uspace/drv/bus/usb/ehci/ehci_bus.h

    r3692678 rae3a941  
    7878 * @return Pointer to assigned ehci endpoint structure
    7979 */
    80 static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep)
     80static inline ehci_endpoint_t *ehci_endpoint_get(const endpoint_t *ep)
    8181{
    8282        assert(ep);
     
    8484}
    8585
    86 static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l)
     86static inline ehci_endpoint_t *ehci_endpoint_list_instance(link_t *l)
    8787{
    8888        return list_get_instance(l, ehci_endpoint_t, eplist_link);
  • uspace/drv/bus/usb/ehci/ehci_rh.h

    r3692678 rae3a941  
    8080} ehci_rh_t;
    8181
    82 errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps, ehci_regs_t *regs,
    83     fibril_mutex_t *guard, const char *name);
     82errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps,
     83    ehci_regs_t *regs, fibril_mutex_t *guard, const char *name);
    8484errno_t ehci_rh_schedule(ehci_rh_t *instance, usb_transfer_batch_t *batch);
    8585errno_t ehci_rh_interrupt(ehci_rh_t *instance);
  • uspace/drv/bus/usb/ehci/hc.h

    r3692678 rae3a941  
    104104extern errno_t hc_start(hc_device_t *);
    105105extern errno_t hc_setup_roothub(hc_device_t *);
    106 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *);
     106extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *,
     107    const hw_res_list_parsed_t *, int *);
    107108extern errno_t hc_gone(hc_device_t *);
    108109
  • uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h

    r3692678 rae3a941  
    7272        /* 64 bit struct only */
    7373        volatile uint32_t extended_bp[7];
    74 } __attribute__((packed,aligned(32))) itd_t;
     74} __attribute__((packed, aligned(32))) itd_t;
    7575#endif
    7676/**
  • uspace/drv/bus/usb/ehci/hw_struct/queue_head.c

    r3692678 rae3a941  
    7070            QH_EP_CHAR_EP_SET(ep->endpoint) |
    7171            speed[ep->device->speed] |
    72             QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)
    73         );
     72            QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size));
    7473        if (ep->transfer_type == USB_TRANSFER_CONTROL) {
    7574                if (ep->device->speed != USB_SPEED_HIGH)
     
    8079        }
    8180        uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) |
    82                     QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
     81            QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
    8382        if (usb_speed_is_11(ep->device->speed)) {
    8483                assert(ep->device->tt.dev != NULL);
  • uspace/drv/bus/usb/ehci/hw_struct/queue_head.h

    r3692678 rae3a941  
    143143        /* 64 bit struct only */
    144144        volatile uint32_t extended_bp[5];
    145 } __attribute__((packed,aligned(32))) qh_t;
     145} __attribute__((packed, aligned(32))) qh_t;
    146146
    147147static inline void qh_append_qh(qh_t *qh, const qh_t *next)
  • uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h

    r3692678 rae3a941  
    8989        /* 64 bit struct only */
    9090        volatile uint32_t extended_bp[2];
    91 } __attribute__((packed,aligned(32))) sitd_t;
     91} __attribute__((packed, aligned(32))) sitd_t;
    9292#endif
    9393/**
Note: See TracChangeset for help on using the changeset viewer.