From: Simon Glass Date: Wed, 25 Mar 2015 18:22:14 +0000 (-0600) Subject: dm: usb: Adjust usb_storage to work with sandbox X-Git-Tag: KARO-TX6-2015-09-18~2685 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=045cff9c5940dab9ce6e40d8bdc6a707fa53e38b;p=karo-tx-uboot.git 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 Reviewed-by: Marek Vasut --- diff --git a/common/usb_storage.c b/common/usb_storage.c index 2955b325b8..f190d8a6c4 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -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);