summaryrefslogtreecommitdiffstats
path: root/common/cmd_usb.c
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 /common/cmd_usb.c
parent66cf64107b891d1cc8112ff76b5687195af2f5b0 (diff)
downloadtalos-obmc-uboot-f57661394a8b00029e37a5567a869e92bd13f3b8.tar.gz
talos-obmc-uboot-f57661394a8b00029e37a5567a869e92bd13f3b8.zip
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 'common/cmd_usb.c')
-rw-r--r--common/cmd_usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 9eba2713ea..a8e3ae5b67 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -150,7 +150,8 @@ void usb_display_class_sub(unsigned char dclass, unsigned char subclass,
void usb_display_string(struct usb_device *dev, int index)
{
- char buffer[256];
+ ALLOC_CACHE_ALIGN_BUFFER(char, buffer, 256);
+
if (index != 0) {
if (usb_string(dev, index, &buffer[0], 256) > 0)
printf("String: \"%s\"", buffer);
OpenPOWER on IntegriCloud