summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-25 12:22:14 -0600
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:22 -0600
commit051081323fbc444f5a57ffb3e0178236ba59f77a (patch)
tree42e8325c1af18e8fb479acee05135be8f1061382 /common
parent84073b6f3c202f5d67813fd3ae5377bf2d98d66b (diff)
downloadu-boot-imx-051081323fbc444f5a57ffb3e0178236ba59f77a.zip
u-boot-imx-051081323fbc444f5a57ffb3e0178236ba59f77a.tar.gz
u-boot-imx-051081323fbc444f5a57ffb3e0178236ba59f77a.tar.bz2
dm: usb: Adjust usb_storage to work with sandbox
With a few tweaks we can compile this code with sandbox and enable testing of the USB storage layer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/usb_storage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 2955b32..f190d8a 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -34,6 +34,7 @@
#include <common.h>
#include <command.h>
#include <inttypes.h>
+#include <mapmem.h>
#include <asm/byteorder.h>
#include <asm/processor.h>
@@ -306,8 +307,9 @@ static int us_one_transfer(struct us_data *us, int pipe, char *buf, int length)
/* set up the transfer loop */
do {
/* transfer the data */
- debug("Bulk xfer %p(%d) try #%d\n",
- buf, this_xfer, 11 - maxtry);
+ debug("Bulk xfer 0x%lx(%d) try #%d\n",
+ (ulong)map_to_sysmem(buf), this_xfer,
+ 11 - maxtry);
result = usb_bulk_msg(us->pusb_dev, pipe, buf,
this_xfer, &partial,
USB_CNTL_TIMEOUT * 5);