All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 2/7] usb: introduce a separate config option for DM USB device
Date: Tue, 29 May 2018 09:40:17 +0200	[thread overview]
Message-ID: <dbcb7457-594f-7d02-72f9-69b5c45c0671@ti.com> (raw)
In-Reply-To: <bde51e26-3465-aed1-6bb0-88a7b3289a03@xilinx.com>



On 28/05/2018 10:37, Michal Simek wrote:
> On 25.5.2018 11:32, Jean-Jacques Hiblot wrote:
>> Using CONFIG_DM_USB for this purpose prevents using DM_USB for host and not
>> for device.
>>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
>> ---
>>
>>   drivers/usb/Kconfig             | 6 ++++++
>>   drivers/usb/dwc3/core.c         | 2 +-
>>   drivers/usb/dwc3/dwc3-generic.c | 4 +++-
>>   3 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
>> index 4fbe172..3587ba4 100644
>> --- a/drivers/usb/Kconfig
>> +++ b/drivers/usb/Kconfig
>> @@ -47,6 +47,12 @@ config DM_USB
>>   	  declared with the U_BOOT_USB_DEVICE() macro and will be
>>   	  automatically probed when found on the bus.
>>   
>> +config DM_USB_DEV
>> +	bool "Enable driver model for USB (Peripheral mode)"
>> +	depends on DM_USB
>> +	help
>> +	  Enable driver model for USB (Peripheral mode).
>> +
>>   source "drivers/usb/host/Kconfig"
>>   
>>   source "drivers/usb/dwc3/Kconfig"
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index 1ab5cee..d5ee6d9 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -789,7 +789,7 @@ MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
>>   MODULE_LICENSE("GPL v2");
>>   MODULE_DESCRIPTION("DesignWare USB3 DRD Controller Driver");
>>   
>> -#ifdef CONFIG_DM_USB
>> +#ifdef CONFIG_DM_USB_DEV
>>   
>>   int dwc3_init(struct dwc3 *dwc)
>>   {
>> diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
>> index ca63eac..2c1e696 100644
>> --- a/drivers/usb/dwc3/dwc3-generic.c
>> +++ b/drivers/usb/dwc3/dwc3-generic.c
>> @@ -21,7 +21,7 @@
>>   #include "gadget.h"
>>   #include "linux-compat.h"
>>   
>> -DECLARE_GLOBAL_DATA_PTR;
> Removing this looks weird. I would expect that there will be new
> error/warning when you compile it because gd is used in bind function.
It must be declared somewhere else in the included headers, there is no 
complain from the compiler.

>
> M
>
>> +#ifdef CONFIG_DM_USB_DEV
>>   
>>   int usb_gadget_handle_interrupts(int index)
>>   {
>> @@ -98,6 +98,8 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = {
>>   	.flags	= DM_FLAG_ALLOC_PRIV_DMA,
>>   };
>>   
>> +#endif
>> +
>>   static int dwc3_generic_bind(struct udevice *parent)
>>   {
>>   	const void *fdt = gd->fdt_blob;
>>
>

  reply	other threads:[~2018-05-29  7:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25  9:32 [U-Boot] [PATCH v1 0/7] Improvements for the dwc3_generic driver Jean-Jacques Hiblot
2018-05-25  9:32 ` [U-Boot] [PATCH v1 1/7] usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers Jean-Jacques Hiblot
2018-05-28  8:35   ` Michal Simek
2018-05-29  7:41     ` Jean-Jacques Hiblot
2018-05-25  9:32 ` [U-Boot] [PATCH v1 2/7] usb: introduce a separate config option for DM USB device Jean-Jacques Hiblot
2018-05-28  8:37   ` Michal Simek
2018-05-29  7:40     ` Jean-Jacques Hiblot [this message]
2018-05-25  9:32 ` [U-Boot] [PATCH v1 3/7] usb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt() Jean-Jacques Hiblot
2018-05-28  7:29   ` Lukasz Majewski
2018-05-25  9:32 ` [U-Boot] [PATCH v1 4/7] dwc3_generic: do not probe the USB device driver when it's bound Jean-Jacques Hiblot
2018-05-25  9:32 ` [U-Boot] [PATCH v1 5/7] dwc3: move phy operation to core.c Jean-Jacques Hiblot
2018-05-25  9:32 ` [U-Boot] [PATCH v1 6/7] dwc3-generic: Handle the PHYs, the clocks and the reset lines Jean-Jacques Hiblot
2018-05-25  9:32 ` [U-Boot] [PATCH v1 7/7] dwc3-generic: Add select_dr_mode operation Jean-Jacques Hiblot
2018-05-28  8:32 ` [U-Boot] [PATCH v1 0/7] Improvements for the dwc3_generic driver Michal Simek
2018-05-28  9:47   ` Jean-Jacques Hiblot
2018-05-28 10:25     ` Michal Simek
2018-05-29 11:03       ` Jean-Jacques Hiblot
2018-05-29 11:08         ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbcb7457-594f-7d02-72f9-69b5c45c0671@ti.com \
    --to=jjhiblot@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.