summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPuneet Saxena <puneets@nvidia.com>2012-04-03 14:56:06 +0530
committerMarek Vasut <marex@denx.de>2012-05-20 08:32:32 +0200
commitf57661394a8b00029e37a5567a869e92bd13f3b8 (patch)
treed00363f82c23324c8e69353c7bfb38ae183c803c /include
parent66cf64107b891d1cc8112ff76b5687195af2f5b0 (diff)
downloadu-boot-imx-f57661394a8b00029e37a5567a869e92bd13f3b8.zip
u-boot-imx-f57661394a8b00029e37a5567a869e92bd13f3b8.tar.gz
u-boot-imx-f57661394a8b00029e37a5567a869e92bd13f3b8.tar.bz2
USB: Align buffers at cacheline
This avoids cache-alignment warnings shown in console when a usb command is entered. Whenever X bytes of unaligned buffer is invalidated, arm core invalidates X + Y bytes as per the cache line size and throws these warnings. Signed-off-by: Puneet Saxena <puneets@nvidia.com> Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/scsi.h4
-rw-r--r--include/usb.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/scsi.h b/include/scsi.h
index c52759c..89ae45f 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -26,7 +26,9 @@
typedef struct SCSI_cmd_block{
unsigned char cmd[16]; /* command */
- unsigned char sense_buf[64]; /* for request sense */
+ /* for request sense */
+ unsigned char sense_buf[64]
+ __attribute__((aligned(ARCH_DMA_MINALIGN)));
unsigned char status; /* SCSI Status */
unsigned char target; /* Target ID */
unsigned char lun; /* Target LUN */
diff --git a/include/usb.h b/include/usb.h
index 48e4bcd..6da91e7 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -109,7 +109,9 @@ struct usb_device {
int epmaxpacketout[16]; /* OUTput endpoint specific maximums */
int configno; /* selected config number */
- struct usb_device_descriptor descriptor; /* Device Descriptor */
+ /* Device Descriptor */
+ struct usb_device_descriptor descriptor
+ __attribute__((aligned(ARCH_DMA_MINALIGN)));
struct usb_config config; /* config descriptor */
int have_langid; /* whether string_langid is valid yet */