cancel
Showing results for 
Search instead for 
Did you mean: 

mickledore Yocto build issue due to patch "0001-v6.1-stm32mp-r2.patch" in meta-st-stm32mp layer

omniwiz
Associate II

Hello,

Thee kernel compilation fails with the yocto (mickeldore) due to patch "0001-v6.1-stm32mp-r2.patch". The issue is with this snippet of the patch:

@@ -3716,6 +3718,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
                        hprt0 &= ~HPRT0_TSTCTL_MASK;
                        hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
                        dwc2_writel(hsotg, hprt0, HPRT0);
+                       hsotg->test_mode = windex >> 8;
                        break;


Since "test_mode" is only available when CONFIG_USB_DWC2_PERIPHERAL and/or CONFIG_USB_DWC2_DUAL_ROLE are set, the build fails with the following configuration:

CONFIG_USB_DWC2_HOST=y

CONFIG_USB_DWC2_PERIPHERAL=n

CONFIG_USB_DWC2_DUAL_ROLE=n

This is a valid configuration. The patch should be amended as follows:

@@ -3715,7 +3717,14 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
                                "SetPortFeature - USB_PORT_FEAT_TEST\n");
                        hprt0 &= ~HPRT0_TSTCTL_MASK;
                        hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
-                       dwc2_writel(hsotg, hprt0, HPRT0);
+                       dwc2_wriitel(hsotg, hprt0, HPRT0);
+                       /* test mode is available only when DUAL_ROLE and/or
+                        * PERIPHERAL are configured
+                        */
+#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
+                               IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
+                               hsotg->test_mode = windex >> 8;
+#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
                        break;

Can the maintainers please fix the patch? Thanks.

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @omniwiz 

 

Thanks for the heads-up. We escalate the ticket to maintainer

Anyway be aware that this version is close to end of maintenance period and so I advise you to rather upgrade to recent 6.1/scarthgap version

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
omniwiz
Associate II

Thank you, @Olivier GALLIEN !