[PATCH libbsd 09/11] ehci_imx.c: Port to RTEMS
Christian Mauderer
christian.mauderer at embedded-brains.de
Thu Apr 2 15:15:39 UTC 2020
On 02/04/2020 17:00, Sebastian Huber wrote:
> On 02/04/2020 16:42, Christian Mauderer wrote:
>
>> diff --git a/freebsd/sys/dev/usb/usb_busdma.c
>> b/freebsd/sys/dev/usb/usb_busdma.c
>> index 9a70c687..c8000170 100644
>> --- a/freebsd/sys/dev/usb/usb_busdma.c
>> +++ b/freebsd/sys/dev/usb/usb_busdma.c
>> @@ -78,6 +78,52 @@ static void usb_pc_common_mem_cb(void *,
>> bus_dma_segment_t *, int, int,
>> uint8_t);
>> #endif
>> +#ifdef __rtems__
>> +#include <bsp.h>
>> +#if defined(LIBBSP_ARM_IMX_BSP_H)
>> +#define NEED_MISSALIGNED_COPY
>> +#endif
>
> Could you please move changes in general file imported from FreeBSD to
> separate commits.
OK. I'll split them.
>
> I don't like this change here at all. I had a similar issue with
> misaligned memcpy() to device memory here on the STM32H7 platform. Could
> you first try this patch here:
Works fine too. The patch seems generic. Do you plan to add it soon as
an extra patch?
>
> diff --git a/freebsd/sys/dev/usb/usb_busdma.c
> b/freebsd/sys/dev/usb/usb_busdma.c
> index 9a70c687..973a3409 100644
> --- a/freebsd/sys/dev/usb/usb_busdma.c
> +++ b/freebsd/sys/dev/usb/usb_busdma.c
> @@ -584,7 +584,7 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct
> usb_page *pg,
> }
> /* allocate memory */
> if (bus_dmamem_alloc(
> - utag->tag, &ptr, (BUS_DMA_WAITOK | BUS_DMA_COHERENT), &map)) {
> + utag->tag, &ptr, BUS_DMA_WAITOK, &map)) {
> goto error;
> }
> /* setup page cache */
>
--
--------------------------------------------
embedded brains GmbH
Herr Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.mauderer at embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax: +49-89-18 94 741 - 08
PGP: Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list