[U-Boot] [PATCH 03/17] drivers: usb: musb: add ti musb misc driver for wrapper
Marek Vasut
marex at denx.de
Mon Feb 29 13:02:50 CET 2016
On 02/29/2016 04:44 AM, Mugunthan V N wrote:
> Add a misc driver for MUSB wrapper, so that based on dr_mode the
> USB devices can bind to USB host or USB device drivers.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm at ti.com>
> ---
> drivers/usb/musb-new/Kconfig | 9 +++++
> drivers/usb/musb-new/Makefile | 1 +
> drivers/usb/musb-new/ti-musb.c | 89 ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 99 insertions(+)
> create mode 100644 drivers/usb/musb-new/ti-musb.c
>
> diff --git a/drivers/usb/musb-new/Kconfig b/drivers/usb/musb-new/Kconfig
> index 6a6cb93..2bcc646 100644
> --- a/drivers/usb/musb-new/Kconfig
> +++ b/drivers/usb/musb-new/Kconfig
> @@ -13,6 +13,15 @@ config USB_MUSB_GADGET
> help
> Enables the MUSB USB dual-role controller in gadget mode.
>
> +config USB_MUSB_TI
> + bool "Enable TI OTG USB controller"
> + depends on DM_USB
> + default y
> + help
> + Say y here to enable support for the TI OTG USB controller
> + used on TI SoCs. fadsf fa fad af adf adf asf adfa fad fd af
> + asdf asdf fadsf asf s
> +
> if USB_MUSB_HOST || USB_MUSB_GADGET
>
> config USB_MUSB_SUNXI
> diff --git a/drivers/usb/musb-new/Makefile b/drivers/usb/musb-new/Makefile
> index 072d516..d137044 100644
> --- a/drivers/usb/musb-new/Makefile
> +++ b/drivers/usb/musb-new/Makefile
> @@ -11,6 +11,7 @@ obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o
> obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
> obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
> obj-$(CONFIG_USB_MUSB_SUNXI) += sunxi.o
> +obj-$(CONFIG_USB_MUSB_TI) += ti-musb.o
>
> ccflags-y := $(call cc-option,-Wno-unused-variable) \
> $(call cc-option,-Wno-unused-but-set-variable) \
> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
> new file mode 100644
> index 0000000..c1a4952
> --- /dev/null
> +++ b/drivers/usb/musb-new/ti-musb.c
> @@ -0,0 +1,89 @@
> +/*
> + * MISC driver for TI MUSB Glue.
> + *
> + * (C) Copyright 2012-2016
> + * Texas Instruments Incorporated, <www.ti.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +#include <common.h>
> +#include <command.h>
> +#include <console.h>
> +#include <dm.h>
> +#include <linux/usb/otg.h>
> +#include <dm/device-internal.h>
> +#include <dm/lists.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#ifdef CONFIG_DM_USB
> +
> +static const char *const usb_dr_modes[] = {
> + [USB_DR_MODE_UNKNOWN] = "",
This should probably be "unknown" and not empty string.
> + [USB_DR_MODE_HOST] = "host",
> + [USB_DR_MODE_PERIPHERAL] = "peripheral",
> + [USB_DR_MODE_OTG] = "otg",
> +};
[...]
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list