1 /* ==========================================================================
2 * $File: //dwh/usb_iip/dev/software/otg_ipmate/linux/drivers/dwc_otg_hcd.h $
7 * Synopsys HS OTG Linux Software Driver and documentation (hereinafter,
8 * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless
9 * otherwise expressly agreed to in writing between Synopsys and you.
11 * The Software IS NOT an item of Licensed Software or Licensed Product under
12 * any End User Software License Agreement or Agreement for Licensed Product
13 * with Synopsys or any supplement thereto. You are permitted to use and
14 * redistribute this Software in source and binary forms, with or without
15 * modification, provided that redistributions of source code must retain this
16 * notice. You may not view, use, disclose, copy or distribute this file or
17 * any information contained herein except pursuant to this license grant from
18 * Synopsys. If you do not agree with this notice, including the disclaimer
19 * below, then you are not authorized to use the Software.
21 * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS BE LIABLE FOR ANY DIRECT,
25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
32 * ========================================================================== */
33 #ifndef DWC_DEVICE_ONLY
34 #if !defined(__DWC_HCD_H__)
37 #include <linux/list.h>
38 #include <linux/usb.h>
39 #include <linux/version.h>
40 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
41 #include <linux/usb/hcd.h>
43 #include <../drivers/usb/core/hcd.h>
46 struct dwc_otg_device;
48 #include "dwc_otg_cil.h"
53 * This file contains the structures, constants, and interfaces for
54 * the Host Contoller Driver (HCD).
56 * The Host Controller Driver (HCD) is responsible for translating requests
57 * from the USB Driver into the appropriate actions on the DWC_otg controller.
58 * It isolates the USBD from the specifics of the controller by providing an
63 * Phases for control transfers.
65 typedef enum dwc_otg_control_phase {
66 DWC_OTG_CONTROL_SETUP,
68 DWC_OTG_CONTROL_STATUS
69 } dwc_otg_control_phase_e;
71 /** Transaction types. */
72 typedef enum dwc_otg_transaction_type {
73 DWC_OTG_TRANSACTION_NONE,
74 DWC_OTG_TRANSACTION_PERIODIC,
75 DWC_OTG_TRANSACTION_NON_PERIODIC,
76 DWC_OTG_TRANSACTION_ALL
77 } dwc_otg_transaction_type_e;
79 /** Transaction types. */
80 typedef enum qh_status_type {
89 * A Queue Transfer Descriptor (QTD) holds the state of a bulk, control,
90 * interrupt, or isochronous transfer. A single QTD is created for each URB
91 * (of one of these types) submitted to the HCD. The transfer associated with
92 * a QTD may require one or multiple transactions.
94 * A QTD is linked to a Queue Head, which is entered in either the
95 * non-periodic or periodic schedule for execution. When a QTD is chosen for
96 * execution, some or all of its transactions may be executed. After
97 * execution, the state of the QTD is updated. The QTD may be retired if all
98 * its transactions are complete or if an error occurred. Otherwise, it
99 * remains in the schedule so more transactions can be executed later.
101 typedef struct dwc_otg_qtd {
103 * Determines the PID of the next data packet for the data phase of
104 * control transfers. Ignored for other transfer types.<br>
105 * One of the following values:
106 * - DWC_OTG_HC_PID_DATA0
107 * - DWC_OTG_HC_PID_DATA1
111 /** Current phase for control transfers (Setup, Data, or Status). */
112 dwc_otg_control_phase_e control_phase;
114 /** Keep track of the current split type
115 * for FS/LS endpoints on a HS Hub */
116 uint8_t complete_split;
118 /** How many bytes transferred during SSPLIT OUT */
119 uint32_t ssplit_out_xfer_count;
122 * Holds the number of bus errors that have occurred for a transaction
123 * within this transfer.
128 * Index of the next frame descriptor for an isochronous transfer. A
129 * frame descriptor describes the buffer position and length of the
130 * data to be transferred in the next scheduled (micro)frame of an
131 * isochronous transfer. It also holds status for that transaction.
132 * The frame index starts at 0.
134 int isoc_frame_index;
136 /** Position of the ISOC split on full/low speed */
137 uint8_t isoc_split_pos;
139 /** Position of the ISOC split in the buffer for the current frame */
140 uint16_t isoc_split_offset;
142 /** URB for this transfer */
145 /** This list of QTDs */
146 struct list_head qtd_list_entry;
151 * A Queue Head (QH) holds the static characteristics of an endpoint and
152 * maintains a list of transfers (QTDs) for that endpoint. A QH structure may
153 * be entered in either the non-periodic or periodic schedule.
155 typedef struct dwc_otg_qh {
158 * One of the following values:
159 * - USB_ENDPOINT_XFER_CONTROL
160 * - USB_ENDPOINT_XFER_ISOC
161 * - USB_ENDPOINT_XFER_BULK
162 * - USB_ENDPOINT_XFER_INT
167 /** wMaxPacketSize Field of Endpoint Descriptor. */
171 * Determines the PID of the next data packet for non-control
172 * transfers. Ignored for control transfers.<br>
173 * One of the following values:
174 * - DWC_OTG_HC_PID_DATA0
175 * - DWC_OTG_HC_PID_DATA1
179 /** Ping state if 1. */
187 * List of QTDs for this QH.
189 struct list_head qtd_list;
191 /** Host channel currently processing transfers for this QH. */
194 /** QTD currently assigned to a host channel for this QH. */
195 dwc_otg_qtd_t *qtd_in_process;
197 /** Full/low speed endpoint on high-speed hub requires split. */
200 /** @name Periodic schedule information */
203 /** Bandwidth in microseconds per (micro)frame. */
206 /** Interval between transfers in (micro)frames. */
210 * (micro)frame to initialize a periodic transfer. The transfer
211 * executes in the following (micro)frame.
213 uint16_t sched_frame;
215 /** (micro)frame at which last start split was initialized. */
216 uint16_t start_split_frame;
220 /** Entry for QH in either the periodic or non-periodic schedule. */
221 struct list_head qh_list_entry;
225 * This structure holds the state of the HCD, including the non-periodic and
226 * periodic schedules.
228 typedef struct dwc_otg_hcd {
232 /** DWC OTG Core Interface Layer */
233 dwc_otg_core_if_t *core_if;
235 /** Internal DWC HCD Flags */
236 volatile union dwc_otg_hcd_internal_flags {
239 unsigned port_connect_status_change : 1;
240 unsigned port_connect_status : 1;
241 unsigned port_reset_change : 1;
242 unsigned port_enable_change : 1;
243 unsigned port_suspend_change : 1;
244 unsigned port_over_current_change : 1;
245 unsigned reserved : 27;
250 * Inactive items in the non-periodic schedule. This is a list of
251 * Queue Heads. Transfers associated with these Queue Heads are not
252 * currently assigned to a host channel.
254 struct list_head non_periodic_sched_inactive;
257 * Active items in the non-periodic schedule. This is a list of
258 * Queue Heads. Transfers associated with these Queue Heads are
259 * currently assigned to a host channel.
261 struct list_head non_periodic_sched_active;
264 * Pointer to the next Queue Head to process in the active
265 * non-periodic schedule.
267 struct list_head *non_periodic_qh_ptr;
270 * Inactive items in the periodic schedule. This is a list of QHs for
271 * periodic transfers that are _not_ scheduled for the next frame.
272 * Each QH in the list has an interval counter that determines when it
273 * needs to be scheduled for execution. This scheduling mechanism
274 * allows only a simple calculation for periodic bandwidth used (i.e.
275 * must assume that all periodic transfers may need to execute in the
276 * same frame). However, it greatly simplifies scheduling and should
277 * be sufficient for the vast majority of OTG hosts, which need to
278 * connect to a small number of peripherals at one time.
280 * Items move from this list to periodic_sched_ready when the QH
281 * interval counter is 0 at SOF.
283 struct list_head periodic_sched_inactive;
286 * List of periodic QHs that are ready for execution in the next
287 * frame, but have not yet been assigned to host channels.
289 * Items move from this list to periodic_sched_assigned as host
290 * channels become available during the current frame.
292 //struct list_head periodic_sched_ready;
295 * List of periodic QHs to be executed in the next frame that are
296 * assigned to host channels.
298 * Items move from this list to periodic_sched_queued as the
299 * transactions for the QH are queued to the DWC_otg controller.
301 //struct list_head periodic_sched_assigned;
304 * List of periodic QHs that have been queued for execution.
306 * Items move from this list to either periodic_sched_inactive or
307 * periodic_sched_ready when the channel associated with the transfer
308 * is released. If the interval for the QH is 1, the item moves to
309 * periodic_sched_ready because it must be rescheduled for the next
310 * frame. Otherwise, the item moves to periodic_sched_inactive.
312 //struct list_head periodic_sched_queued;
315 * Total bandwidth claimed so far for periodic transfers. This value
316 * is in microseconds per (micro)frame. The assumption is that all
317 * periodic transfers may occur in the same (micro)frame.
319 uint16_t periodic_usecs;
322 * Frame number read from the core at SOF. The value ranges from 0 to
323 * DWC_HFNUM_MAX_FRNUM.
325 uint16_t frame_number;
328 * Free host channels in the controller. This is a list of
331 struct list_head free_hc_list;
334 * Number of host channels assigned to periodic transfers. Currently
335 * assuming that there is a dedicated host channel for each periodic
336 * transaction and at least one host channel available for
337 * non-periodic transactions.
339 int periodic_channels;
342 * Number of host channels assigned to non-periodic transfers.
344 int non_periodic_channels;
347 * Array of pointers to the host channel descriptors. Allows accessing
348 * a host channel descriptor given the host channel number. This is
349 * useful in interrupt handlers.
351 dwc_hc_t *hc_ptr_array[MAX_EPS_CHANNELS];
354 * Buffer to use for any data received during the status phase of a
355 * control transfer. Normally no data is transferred during the status
356 * phase. This buffer is used as a bit bucket.
361 * DMA address for status_buf.
363 dma_addr_t status_buf_dma;
364 #define DWC_OTG_HCD_STATUS_BUF_SIZE 64
367 * Structure to allow starting the HCD in a non-interrupt context
368 * during an OTG role change.
370 struct work_struct start_work;
373 * Connection timer. An OTG host must display a message if the device
374 * does not connect. Started when the VBus power is turned on via
375 * sysfs attribute "buspower".
377 struct timer_list conn_timer;
379 /* Tasket to do a reset */
380 struct tasklet_struct *reset_tasklet;
382 struct timer_list connect_detect_timer;
383 struct delayed_work host_enable_work;
385 spinlock_t global_lock;
388 uint32_t frrem_samples;
389 uint64_t frrem_accum;
391 uint32_t hfnum_7_samples_a;
392 uint64_t hfnum_7_frrem_accum_a;
393 uint32_t hfnum_0_samples_a;
394 uint64_t hfnum_0_frrem_accum_a;
395 uint32_t hfnum_other_samples_a;
396 uint64_t hfnum_other_frrem_accum_a;
398 uint32_t hfnum_7_samples_b;
399 uint64_t hfnum_7_frrem_accum_b;
400 uint32_t hfnum_0_samples_b;
401 uint64_t hfnum_0_frrem_accum_b;
402 uint32_t hfnum_other_samples_b;
403 uint64_t hfnum_other_frrem_accum_b;
406 /** Flag to indicate whether host controller is enabled.
407 * 0: force disable by sysfs
411 uint8_t host_enabled;
412 uint8_t host_setenable;
416 /** Gets the dwc_otg_hcd from a struct usb_hcd */
417 static inline dwc_otg_hcd_t *hcd_to_dwc_otg_hcd(struct usb_hcd *hcd)
419 return (dwc_otg_hcd_t *)(hcd->hcd_priv);
422 /** Gets the struct usb_hcd that contains a dwc_otg_hcd_t. */
423 static inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd)
425 return container_of((void *)dwc_otg_hcd, struct usb_hcd, hcd_priv);
428 /** @name HCD Create/Destroy Functions */
430 extern int dwc_otg_hcd_init(struct device *_dev);
431 extern void dwc_otg_hcd_remove(struct device *_dev);
434 /** @name Linux HC Driver API Functions */
437 extern int dwc_otg_hcd_start(struct usb_hcd *hcd);
438 extern void dwc_otg_hcd_stop(struct usb_hcd *hcd);
439 extern int dwc_otg_hcd_get_frame_number(struct usb_hcd *hcd);
440 extern void dwc_otg_hcd_free(struct usb_hcd *hcd);
441 extern int dwc_otg_hcd_urb_enqueue(struct usb_hcd *_hcd,
444 extern int dwc_otg_hcd_urb_dequeue(struct usb_hcd *hcd,
447 extern void dwc_otg_hcd_endpoint_disable(struct usb_hcd *hcd,
448 struct usb_host_endpoint *ep);
449 extern irqreturn_t dwc_otg_hcd_irq(struct usb_hcd *hcd);
450 extern int dwc_otg_hcd_hub_status_data(struct usb_hcd *hcd,
452 extern int dwc_otg_hcd_hub_control(struct usb_hcd *hcd,
461 /** @name Transaction Execution Functions */
463 extern dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t *_hcd);
464 extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t *_hcd,
465 dwc_otg_transaction_type_e _tr_type);
466 extern void dwc_otg_hcd_complete_urb(dwc_otg_hcd_t *_hcd, struct urb *_urb,
470 /** @name Interrupt Handler Functions */
472 extern int32_t dwc_otg_hcd_handle_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
473 extern int32_t dwc_otg_hcd_handle_sof_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
474 extern int32_t dwc_otg_hcd_handle_rx_status_q_level_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
475 extern int32_t dwc_otg_hcd_handle_np_tx_fifo_empty_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
476 extern int32_t dwc_otg_hcd_handle_perio_tx_fifo_empty_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
477 extern int32_t dwc_otg_hcd_handle_incomplete_periodic_intr(dwc_otg_hcd_t *_dwc_otg_hcd);
478 extern int32_t dwc_otg_hcd_handle_port_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
479 extern int32_t dwc_otg_hcd_handle_conn_id_status_change_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
480 extern int32_t dwc_otg_hcd_handle_disconnect_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
481 extern int32_t dwc_otg_hcd_handle_hc_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
482 extern int32_t dwc_otg_hcd_handle_hc_n_intr (dwc_otg_hcd_t *_dwc_otg_hcd, uint32_t _num);
483 extern int32_t dwc_otg_hcd_handle_session_req_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
484 extern int32_t dwc_otg_hcd_handle_wakeup_detected_intr (dwc_otg_hcd_t *_dwc_otg_hcd);
488 /** @name Schedule Queue Functions */
491 /* Implemented in dwc_otg_hcd_queue.c */
492 extern dwc_otg_qh_t *dwc_otg_hcd_qh_create (dwc_otg_hcd_t *_hcd, struct urb *_urb);
493 extern void dwc_otg_hcd_qh_init (dwc_otg_hcd_t *_hcd, dwc_otg_qh_t *_qh, struct urb *_urb);
494 extern void dwc_otg_hcd_qh_free (dwc_otg_qh_t *_qh);
495 extern int dwc_otg_hcd_qh_add (dwc_otg_hcd_t *_hcd, dwc_otg_qh_t *_qh);
496 extern void dwc_otg_hcd_qh_remove (dwc_otg_hcd_t *_hcd, dwc_otg_qh_t *_qh);
497 extern void dwc_otg_hcd_qh_deactivate (dwc_otg_hcd_t *_hcd, dwc_otg_qh_t *_qh, int sched_csplit);
499 /** Remove and free a QH */
500 static inline void dwc_otg_hcd_qh_remove_and_free (dwc_otg_hcd_t *_hcd,
503 dwc_otg_hcd_qh_remove (_hcd, _qh);
504 dwc_otg_hcd_qh_free (_qh);
507 /** Allocates memory for a QH structure.
508 * @return Returns the memory allocate or NULL on error. */
509 static inline dwc_otg_qh_t *dwc_otg_hcd_qh_alloc (void)
511 return (dwc_otg_qh_t *) kmalloc (sizeof(dwc_otg_qh_t), GFP_ATOMIC);//GFP_KERNEL
514 extern dwc_otg_qtd_t *dwc_otg_hcd_qtd_create (struct urb *urb);
515 extern void dwc_otg_hcd_qtd_init (dwc_otg_qtd_t *qtd, struct urb *urb);
516 extern int dwc_otg_hcd_qtd_add (dwc_otg_qtd_t *qtd, dwc_otg_hcd_t *dwc_otg_hcd);
518 /** Allocates memory for a QTD structure.
519 * @return Returns the memory allocate or NULL on error. */
520 static inline dwc_otg_qtd_t *dwc_otg_hcd_qtd_alloc (void)
522 return (dwc_otg_qtd_t *) kmalloc (sizeof(dwc_otg_qtd_t), GFP_ATOMIC);//GFP_KERNEL
525 /** Frees the memory for a QTD structure. QTD should already be removed from
527 * @param[in] _qtd QTD to free.*/
528 static inline void dwc_otg_hcd_qtd_free (dwc_otg_qtd_t *_qtd)
533 /** Removes a QTD from list.
534 * @param[in] _qtd QTD to remove from list. */
535 static inline void dwc_otg_hcd_qtd_remove (dwc_otg_qtd_t *_qtd)
538 local_irq_save (flags);
539 list_del (&_qtd->qtd_list_entry);
540 local_irq_restore (flags);
543 /** Remove and free a QTD */
544 static inline void dwc_otg_hcd_qtd_remove_and_free (dwc_otg_qtd_t *_qtd)
546 dwc_otg_hcd_qtd_remove (_qtd);
547 dwc_otg_hcd_qtd_free (_qtd);
553 /** @name Internal Functions */
555 dwc_otg_qh_t *dwc_urb_to_qh(struct urb *_urb);
556 void dwc_otg_hcd_dump_frrem(dwc_otg_hcd_t *_hcd);
557 void dwc_otg_hcd_dump_state(dwc_otg_hcd_t *_hcd);
560 /** Gets the usb_host_endpoint associated with an URB. */
561 static inline struct usb_host_endpoint *dwc_urb_to_endpoint(struct urb *_urb)
563 struct usb_device *dev = _urb->dev;
564 int ep_num = usb_pipeendpoint(_urb->pipe);
566 if (usb_pipein(_urb->pipe))
567 return dev->ep_in[ep_num ];
569 return dev->ep_out[ep_num ];
573 * Gets the endpoint number from a _bEndpointAddress argument. The endpoint is
574 * qualified with its direction (possible 32 endpoints per device).
576 #define dwc_ep_addr_to_endpoint(_bEndpointAddress_) ((_bEndpointAddress_ & USB_ENDPOINT_NUMBER_MASK) | \
577 ((_bEndpointAddress_ & USB_DIR_IN) != 0) << 4)
579 /** Gets the QH that contains the list_head */
580 #define dwc_list_to_qh(_list_head_ptr_) (container_of(_list_head_ptr_,dwc_otg_qh_t,qh_list_entry))
582 /** Gets the QTD that contains the list_head */
583 #define dwc_list_to_qtd(_list_head_ptr_) (container_of(_list_head_ptr_,dwc_otg_qtd_t,qtd_list_entry))
585 /** Check if QH is non-periodic */
586 #define dwc_qh_is_non_per(_qh_ptr_) ((_qh_ptr_->ep_type == USB_ENDPOINT_XFER_BULK) || \
587 (_qh_ptr_->ep_type == USB_ENDPOINT_XFER_CONTROL))
589 /** High bandwidth multiplier as encoded in highspeed endpoint descriptors */
590 #define dwc_hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
592 /** Packet size for any kind of endpoint descriptor */
593 #define dwc_max_packet(wMaxPacketSize) ((wMaxPacketSize) & 0x07ff)
596 * Returns true if _frame1 is less than or equal to _frame2. The comparison is
597 * done modulo DWC_HFNUM_MAX_FRNUM. This accounts for the rollover of the
598 * frame number when the max frame number is reached.
600 static inline int dwc_frame_num_le(uint16_t _frame1, uint16_t _frame2)
602 return ((_frame2 - _frame1) & DWC_HFNUM_MAX_FRNUM) <=
603 (DWC_HFNUM_MAX_FRNUM >> 1);
607 * Returns true if _frame1 is greater than _frame2. The comparison is done
608 * modulo DWC_HFNUM_MAX_FRNUM. This accounts for the rollover of the frame
609 * number when the max frame number is reached.
611 static inline int dwc_frame_num_gt(uint16_t _frame1, uint16_t _frame2)
613 return (_frame1 != _frame2) &&
614 (((_frame1 - _frame2) & DWC_HFNUM_MAX_FRNUM) <
615 (DWC_HFNUM_MAX_FRNUM >> 1));
619 * Increments _frame by the amount specified by _inc. The addition is done
620 * modulo DWC_HFNUM_MAX_FRNUM. Returns the incremented value.
622 static inline uint16_t dwc_frame_num_inc(uint16_t _frame, uint16_t _inc)
624 return (_frame + _inc) & DWC_HFNUM_MAX_FRNUM;
627 static inline uint16_t dwc_full_frame_num (uint16_t _frame)
629 return ((_frame) & DWC_HFNUM_MAX_FRNUM) >> 3;
632 static inline uint16_t dwc_micro_frame_num (uint16_t _frame)
634 return (_frame) & 0x7;
639 * Macro to sample the remaining PHY clocks left in the current frame. This
640 * may be used during debugging to determine the average time it takes to
641 * execute sections of code. There are two possible sample points, "a" and
642 * "b", so the _letter argument must be one of these values.
644 * To dump the average sample times, read the "hcd_frrem" sysfs attribute. For
645 * example, "cat /sys/devices/lm0/hcd_frrem".
647 #define dwc_sample_frrem(_hcd, _qh, _letter) \
649 hfnum_data_t hfnum; \
650 dwc_otg_qtd_t *qtd; \
651 qtd = list_entry(_qh->qtd_list.next, dwc_otg_qtd_t, qtd_list_entry); \
652 if (usb_pipeint(qtd->urb->pipe) && _qh->start_split_frame != 0 && !qtd->complete_split) { \
653 hfnum.d32 = dwc_read_reg32(&_hcd->core_if->host_if->host_global_regs->hfnum); \
654 switch (hfnum.b.frnum & 0x7) { \
656 _hcd->hfnum_7_samples_##_letter++; \
657 _hcd->hfnum_7_frrem_accum_##_letter += hfnum.b.frrem; \
660 _hcd->hfnum_0_samples_##_letter++; \
661 _hcd->hfnum_0_frrem_accum_##_letter += hfnum.b.frrem; \
664 _hcd->hfnum_other_samples_##_letter++; \
665 _hcd->hfnum_other_frrem_accum_##_letter += hfnum.b.frrem; \
671 #define dwc_sample_frrem(_hcd, _qh, _letter)
674 #endif /* DWC_DEVICE_ONLY */