All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] USB: make usb_kbd obey USB DMA alignment requirements
@ 2012-10-22 21:39 Allen Martin
  2012-10-22 21:39 ` [U-Boot] [PATCH 2/2] tegra: seaboard: Enable USB keyboard Allen Martin
  2012-10-22 21:59 ` [U-Boot] [PATCH 1/2] USB: make usb_kbd obey USB DMA alignment requirements Stephen Warren
  0 siblings, 2 replies; 7+ messages in thread
From: Allen Martin @ 2012-10-22 21:39 UTC (permalink / raw)
  To: u-boot

Change usb_kbd driver to obey alignment requirements for USB DMA on
the buffer used for data transfer.  This is necessary for
architectures that enable dcache and enable USB DMA.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 common/usb_kbd.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 19f01db..cfc1281 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -28,6 +28,7 @@
 #include <malloc.h>
 #include <stdio_dev.h>
 #include <asm/byteorder.h>
+#include <linux/compiler.h>
 
 #include <usb.h>
 
@@ -106,17 +107,17 @@ static const unsigned char usb_kbd_num_keypad[] = {
 	(USB_KBD_NUMLOCK | USB_KBD_CAPSLOCK | USB_KBD_SCROLLLOCK)
 
 struct usb_kbd_pdata {
+	uint8_t		new[8];
+	uint8_t		old[8];
+
 	uint32_t	repeat_delay;
 
 	uint32_t	usb_in_pointer;
 	uint32_t	usb_out_pointer;
 	uint8_t		usb_kbd_buffer[USB_KBD_BUFFER_LEN];
 
-	uint8_t		new[8];
-	uint8_t		old[8];
-
 	uint8_t		flags;
-};
+} __aligned(USB_DMA_MINALIGN);
 
 /* Generic keyboard event polling. */
 void usb_kbd_generic_poll(void)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-22 23:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 21:39 [U-Boot] [PATCH 1/2] USB: make usb_kbd obey USB DMA alignment requirements Allen Martin
2012-10-22 21:39 ` [U-Boot] [PATCH 2/2] tegra: seaboard: Enable USB keyboard Allen Martin
2012-10-22 21:56   ` Stephen Warren
2012-10-22 22:58     ` Allen Martin
2012-10-22 23:13       ` Stephen Warren
2012-10-22 21:59 ` [U-Boot] [PATCH 1/2] USB: make usb_kbd obey USB DMA alignment requirements Stephen Warren
2012-10-22 22:35   ` Allen Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.