[U-Boot] [PATCH v2 25/32] dm: usb: Convert USB storage to use driver-model for block devs
Marek Vasut
marex at denx.de
Tue Mar 1 00:04:07 CET 2016
On 02/29/2016 11:25 PM, Simon Glass wrote:
> Update this code to support CONFIG_BLK. Each USB storage device can have
> one or more block devices as children, each one representing a LUN
> (logical unit) of the USB device.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
>
> common/usb_storage.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 135 insertions(+), 6 deletions(-)
>
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index 0475123..1472824 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -43,6 +43,7 @@
> #include <asm/byteorder.h>
> #include <asm/processor.h>
> #include <dm/device-internal.h>
> +#include <dm/lists.h>
>
> #include <part.h>
> #include <usb.h>
> @@ -67,7 +68,9 @@ static __u32 CBWTag;
>
> static int usb_max_devs; /* number of highest available usb device */
>
> +#ifndef CONFIG_BLK
> static struct blk_desc usb_dev_desc[USB_MAX_STOR_DEV];
> +#endif
You might want to use __maybe_unused to avoid the ifdef, do you think it
makes sense ?
> struct us_data;
> typedef int (*trans_cmnd)(ccb *cb, struct us_data *data);
Other than that:
Reviewed-by: Marek Vasut <marex at denx.de>
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list