summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/usb/usbdi.h
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2020-04-02 16:42:43 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2020-07-29 11:19:14 +0200
commit4820ccecc92f850333dbf01cc2dedfa31329e474 (patch)
treeae1a8fe22c6f0ecd17cf02ff3193418de495e009 /freebsd/sys/dev/usb/usbdi.h
parentimx: Use RTEMS GPIO driver instead of FreeBSD one (diff)
downloadrtems-libbsd-4820ccecc92f850333dbf01cc2dedfa31329e474.tar.bz2
busdma: Option to round to cache lines on sync
Some targets support only flushing or invalidating complete cache lines. In this cases misaligned buffers might lead to unexpected results. This patch adds a flag that allows drivers to signal to the bus dma driver that it is OK to round a buffer to the next full cache line. That's for example necessary if a driver wants to send out 14 byte via a USB DMA. Only the driver knows whether these 14 bytes are located in an otherwise unused cache line aligned buffer.
Diffstat (limited to '')
-rw-r--r--freebsd/sys/dev/usb/usbdi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/freebsd/sys/dev/usb/usbdi.h b/freebsd/sys/dev/usb/usbdi.h
index 0a393844..834810a8 100644
--- a/freebsd/sys/dev/usb/usbdi.h
+++ b/freebsd/sys/dev/usb/usbdi.h
@@ -640,6 +640,10 @@ void usbd_xfer_set_frame_data(struct usb_xfer *xfer, usb_frcount_t frindex,
void *ptr, usb_frlength_t len);
void usbd_xfer_frame_data(struct usb_xfer *xfer, usb_frcount_t frindex,
void **ptr, int *len);
+#ifdef __rtems__
+void usbd_xfer_frame_allow_cache_line_blow_up(struct usb_xfer *xfer,
+ usb_frcount_t frindex);
+#endif /* __rtems__ */
void usbd_xfer_set_frame_offset(struct usb_xfer *xfer, usb_frlength_t offset,
usb_frcount_t frindex);
usb_frlength_t usbd_xfer_max_len(struct usb_xfer *xfer);