[u-boot] usb: fastboot fix urb and urb->buffer_data address cache line aligned.

Signed-off-by: Firefly <service@t-firefly.com>
Signed-off-by: Firefly <service@t-firefly.com>
This commit is contained in:
Firefly
2015-10-25 18:28:18 +08:00
committed by cjp
parent 1ae1ac8e6f
commit 9dde3502c5
2 changed files with 3 additions and 2 deletions

View File

@ -542,7 +542,7 @@ struct urb *usbd_alloc_urb (struct usb_device_instance *device,
{
struct urb *urb;
if (!(urb = (struct urb *) malloc (sizeof (struct urb)))) {
if (!(urb = (struct urb *) memalign (ARCH_DMA_MINALIGN, sizeof (struct urb)))) {
usberr (" F A T A L: malloc(%zu) FAILED!!!!",
sizeof (struct urb));
return NULL;

View File

@ -487,7 +487,8 @@ struct urb {
urb_send_status_t status;
int data;
u16 buffer_data[URB_BUF_SIZE]; /* data received (OUT) or being sent (IN) */
/* data received (OUT) or being sent (IN) */
u16 buffer_data[URB_BUF_SIZE] __attribute__((aligned(ARCH_DMA_MINALIGN)));
};
/* Endpoint configuration