usb: dwc3: Fix default dr_mode setting
Subsystems (2)
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
@@ -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
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
Signed-off-by Jean-Jacques Hiblot <[email protected]>---
To be applied on top of usb/nextdrivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/core.c +1
-1@@ -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
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_ENABLEDto make it work with SPL ?
There is no SPL variant of this variable.
JJ
Quoted 23 lines
Quoted 22 lines
Signed-off-by Jean-Jacques Hiblot <[email protected]>---
To be applied on top of usb/nextdrivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/core.c +1
-1@@ -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 ;
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_ENABLEDto 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
Signed-off-by Jean-Jacques Hiblot <[email protected]>---
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@@ -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
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_ENABLEDto 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
Signed-off-by Jean-Jacques Hiblot <[email protected]>---
To be applied on top of usb/nextdrivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/core.c +1
-0@@ -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;
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_ENABLEDto 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_GADGETtoinclude/excludegadget support from SPLSince 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