Skip to contentSkip to conversation

usb: dwc3: Fix default dr_mode setting

PATCH New Jean-Jacques Hiblot 2 participants 6 messages Jun 27, 2019 – Jun 28, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc3: Fix default dr_mode setting

The IS_ENABLED() macro requires the complete CONFIG option including the 'CONFIG_' prefix.

---
To be applied on top of usb/next

 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +1 -1
index 9f7f053265..10b3f837f2 100644
@@ -707,7 +707,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 		return -ENOMEM;
 	}
 
-	if (!IS_ENABLED(USB_DWC3_GADGET))
+	if (!IS_ENABLED(CONFIG_USB_DWC3_GADGET))
 		dwc->dr_mode = USB_DR_MODE_HOST;
 	else if (!IS_ENABLED(CONFIG_USB_HOST))
 		dwc->dr_mode = USB_DR_MODE_PERIPHERAL;
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 usb: dwc3: Fix default dr_mode setting

Quoted 2 lines · Jean-Jacques Hiblot

The IS_ENABLED() macro requires the complete CONFIG option including the 'CONFIG_' prefix.

Use CONFIG_IS_ENABLED to make it work with SPL ?

Quoted 21 lines

---
To be applied on top of usb/next

 drivers/usb/dwc3/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +1 -1
index 9f7f053265..10b3f837f2 100644
@@ -707,7 +707,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
 		return -ENOMEM;
 	}
 
-	if (!IS_ENABLED(USB_DWC3_GADGET))
+	if (!IS_ENABLED(CONFIG_USB_DWC3_GADGET))
 		dwc->dr_mode = USB_DR_MODE_HOST;
 	else if (!IS_ENABLED(CONFIG_USB_HOST))
 		dwc->dr_mode = USB_DR_MODE_PERIPHERAL;
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 usb: dwc3: Fix default dr_mode setting

Quoted 4 lines · Marek Vasut
Quoted 2 lines · Jean-Jacques Hiblot

The IS_ENABLED() macro requires the complete CONFIG option including the 'CONFIG_' prefix.

Use CONFIG_IS_ENABLED to make it work with SPL ?

There is no SPL variant of this variable.

JJ

Quoted 23 lines
Quoted 22 lines

---
To be applied on top of usb/next

  drivers/usb/dwc3/core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +1 -1
index 9f7f053265..10b3f837f2 100644
@@ -707,7 +707,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
  		return -ENOMEM;
  	}
 
-	if (!IS_ENABLED(USB_DWC3_GADGET))
+	if (!IS_ENABLED(CONFIG_USB_DWC3_GADGET))
  		dwc->dr_mode = USB_DR_MODE_HOST;
  	else if (!IS_ENABLED(CONFIG_USB_HOST))
  		dwc->dr_mode = USB_DR_MODE_PERIPHERAL;
#3 lore raw

PATCH 1/1 usb: dwc3: Fix default dr_mode setting

Quoted 8 lines · Jean-Jacques Hiblot
Quoted 4 lines · Marek Vasut
Quoted 2 lines · Jean-Jacques Hiblot

The IS_ENABLED() macro requires the complete CONFIG option including the 'CONFIG_' prefix.

Use CONFIG_IS_ENABLED to make it work with SPL ?

There is no SPL variant of this variable.

Shouldn't there be one ?

Quoted 24 lines

JJ

Quoted 22 lines
Quoted 21 lines

---
To be applied on top of usb/next

  drivers/usb/dwc3/core.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +1 -0
index 9f7f053265..10b3f837f2 100644
@@ -707,7 +707,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
           return -ENOMEM;
       }
   -    if (!IS_ENABLED(USB_DWC3_GADGET))
+    if (!IS_ENABLED(CONFIG_USB_DWC3_GADGET))
           dwc->dr_mode = USB_DR_MODE_HOST;
       else if (!IS_ENABLED(CONFIG_USB_HOST))
           dwc->dr_mode = USB_DR_MODE_PERIPHERAL;
Signature · 2 lines
Best regards,
Marek Vasut
#4 lore raw

PATCH 1/1 usb: dwc3: Fix default dr_mode setting

Quoted 8 lines · Marek Vasut
Quoted 6 lines · Jean-Jacques Hiblot
Quoted 4 lines · Marek Vasut
Quoted 2 lines · Jean-Jacques Hiblot

The IS_ENABLED() macro requires the complete CONFIG option including the 'CONFIG_' prefix.

Use CONFIG_IS_ENABLED to make it work with SPL ?

There is no SPL variant of this variable.

Shouldn't there be one ?

There is already CONFIG_SPL_USB_GADGET to include/exclude gadget support from SPL

Since there is usually only one kind of gadget controller on a SOC, I don't think it is a necessary to also have CONFIG_SPL_USB_DWC3_GADGET

Quoted 24 lines
Quoted 23 lines

JJ

Quoted 20 lines
Quoted 20 lines

---
To be applied on top of usb/next

   drivers/usb/dwc3/core.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/core.c +1 -0
index 9f7f053265..10b3f837f2 100644
@@ -707,7 +707,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
           return -ENOMEM;
       }
   -    if (!IS_ENABLED(USB_DWC3_GADGET))
+    if (!IS_ENABLED(CONFIG_USB_DWC3_GADGET))
           dwc->dr_mode = USB_DR_MODE_HOST;
       else if (!IS_ENABLED(CONFIG_USB_HOST))
           dwc->dr_mode = USB_DR_MODE_PERIPHERAL;
#5 lore raw

PATCH 1/1 usb: dwc3: Fix default dr_mode setting

Quoted 9 lines · Jean-Jacques Hiblot
Quoted 7 lines · Marek Vasut
Quoted 6 lines · Jean-Jacques Hiblot
Quoted 5 lines · Marek Vasut
Quoted 3 lines · Jean-Jacques Hiblot

The IS_ENABLED() macro requires the complete CONFIG option including the
'CONFIG_' prefix.

Use CONFIG_IS_ENABLED to make it work with SPL ?

Quoted 8 lines
Quoted 2 lines
Quoted 1 line

There is no SPL variant of this variable.

Shouldn't there be one ?

There is already CONFIG_SPL_USB_GADGET to include/exclude gadget support from SPL

Since there is usually only one kind of gadget controller on a SOC, I don't think it is a necessary to also have CONFIG_SPL_USB_DWC3_GADGET

JZ4780 has musb and ci-hdrc for example, so that's not true. There are other SoCs with OHCI and EHCI combination too.

Signature · 2 lines
Best regards,
Marek Vasut