summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-04-14 15:55:33 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2020-04-15 16:18:43 +0200
commitbd7af5fcee976bc3a287b4622591dc0df40a79f9 (patch)
treefff17a422bd2e498870a1476c5db047c3e619a5a /freebsd/sys/dev
parenttestsuite: A description for each test added (diff)
downloadrtems-libbsd-bd7af5fcee976bc3a287b4622591dc0df40a79f9.tar.bz2
usb_busdma: Add USB_NEED_BUSDMA_COHERENT_ALLOC
Some BSPs have a cache-coherent memory area, however, it should not be used for the USB controller.
Diffstat (limited to 'freebsd/sys/dev')
-rw-r--r--freebsd/sys/dev/usb/usb_busdma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/freebsd/sys/dev/usb/usb_busdma.c b/freebsd/sys/dev/usb/usb_busdma.c
index 9a70c687..dc52fe15 100644
--- a/freebsd/sys/dev/usb/usb_busdma.c
+++ b/freebsd/sys/dev/usb/usb_busdma.c
@@ -584,7 +584,11 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct usb_page *pg,
}
/* allocate memory */
if (bus_dmamem_alloc(
+#if !defined(__rtems__) || USB_NEED_BUSDMA_COHERENT_ALLOC
utag->tag, &ptr, (BUS_DMA_WAITOK | BUS_DMA_COHERENT), &map)) {
+#else /* __rtems__ */
+ utag->tag, &ptr, BUS_DMA_WAITOK, &map)) {
+#endif /* __rtems__ */
goto error;
}
/* setup page cache */