Skip to content

Commit 3e2d924

Browse files
authored
[driver/usb]Update dwc2/usb_glue_infineon.c to add the missing header file. (#11158)
1 parent cdc50db commit 3e2d924

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/drivers/usb/cherryusb/port/dwc2/usb_glue_infineon.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
#include "usb_dwc2_param.h"
99
#include "rtthread.h"
1010
#include "cybsp.h"
11+
#include "cy_device.h"
1112

1213
#if defined (COMPONENT_CM55)
1314

14-
#if defined(CONFIG_USB_DWC2_DMA_ENABLE) && !defined(CONFIG_USB_DCACHE_ENABLE)
15+
#if !defined(CONFIG_USB_DCACHE_ENABLE)
1516
#error "Please enable CONFIG_USB_DCACHE_ENABLE and put USB_NOCACHE_RAM_SECTION to section ".cy_socmem_data" when using DMA"
1617
#endif
17-
1818
#else
1919
#define CONFIG_USB_DWC2_DMA_ENABLE
2020
#endif
@@ -83,6 +83,8 @@ void usb_dc_low_level_init(uint8_t busid)
8383
USBHS_SS->PHY_FUNC_CTL_1 |= (7 << USBHS_SS_PHY_FUNC_CTL_1_PLL_FSEL_Pos);
8484
USBHS_SS->PHY_FUNC_CTL_2 |= (USBHS_SS_PHY_FUNC_CTL_2_RES_TUNING_SEL_Msk | USBHS_SS_PHY_FUNC_CTL_2_EFUSE_SEL_Msk);
8585

86+
rt_thread_mdelay(200); /* Wait for PHY stable */
87+
8688
cy_stc_sysint_t usb_int_cfg = {
8789
.intrSrc = usbhs_interrupt_usbhsctrl_IRQn,
8890
.intrPriority = 3
@@ -120,6 +122,8 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
120122
USBHS_SS->PHY_FUNC_CTL_1 |= (7 << USBHS_SS_PHY_FUNC_CTL_1_PLL_FSEL_Pos);
121123
USBHS_SS->PHY_FUNC_CTL_2 |= (USBHS_SS_PHY_FUNC_CTL_2_RES_TUNING_SEL_Msk | USBHS_SS_PHY_FUNC_CTL_2_EFUSE_SEL_Msk);
122124

125+
rt_thread_mdelay(200); /* Wait for PHY stable */
126+
123127
cy_stc_sysint_t usb_int_cfg = {
124128
.intrSrc = usbhs_interrupt_usbhsctrl_IRQn,
125129
.intrPriority = 3

0 commit comments

Comments
 (0)