diff options
| author | sakumisu <[email protected]> | 2026-01-29 14:18:22 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2026-01-29 14:23:39 +0800 |
| commit | f2a646cff4947bef7554ddbf443765e63d888d96 (patch) | |
| tree | e51e6d01878438e46d117ab85cdaffd89ecff946 /components | |
| parent | c374aa2b19c1c52fdc7e497a3c196551362365c2 (diff) | |
fix(cherryusb): fix dwc2 host size check
Signed-off-by: sakumisu <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/usb/cherryusb/port/dwc2/usb_glue_infineon.c | 3 | ||||
| -rw-r--r-- | components/drivers/usb/cherryusb/port/dwc2/usb_hc_dwc2.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/components/drivers/usb/cherryusb/port/dwc2/usb_glue_infineon.c b/components/drivers/usb/cherryusb/port/dwc2/usb_glue_infineon.c index c0956674c7..485b36c269 100644 --- a/components/drivers/usb/cherryusb/port/dwc2/usb_glue_infineon.c +++ b/components/drivers/usb/cherryusb/port/dwc2/usb_glue_infineon.c @@ -13,8 +13,9 @@ #if defined (COMPONENT_CM55) #if !defined(CONFIG_USB_DCACHE_ENABLE) -#error "Please enable CONFIG_USB_DCACHE_ENABLE and put USB_NOCACHE_RAM_SECTION to section ".cy_socmem_data" when using DMA" +#error "Please enable CONFIG_USB_DCACHE_ENABLE and put USB_NOCACHE_RAM_SECTION to section ".cy_socmem_data" for CM55" #endif + #else #define CONFIG_USB_DWC2_DMA_ENABLE #endif diff --git a/components/drivers/usb/cherryusb/port/dwc2/usb_hc_dwc2.c b/components/drivers/usb/cherryusb/port/dwc2/usb_hc_dwc2.c index bf0adae571..92a7f3e027 100644 --- a/components/drivers/usb/cherryusb/port/dwc2/usb_hc_dwc2.c +++ b/components/drivers/usb/cherryusb/port/dwc2/usb_hc_dwc2.c @@ -717,10 +717,10 @@ int usb_hc_init(struct usbh_bus *bus) USB_ASSERT_MSG((USB_OTG_GLB->GRXFSIZ & 0xffff) >= g_dwc2_hcd[bus->hcd.hcd_id].user_params.host_rx_fifo_size, "host_rx_fifo_size cannot be larger than power_on_value %u", (unsigned int)(USB_OTG_GLB->GRXFSIZ & 0xffff)); - USB_ASSERT_MSG((USB_OTG_GLB->DIEPTXF0_HNPTXFSIZ & 0xffff) >= g_dwc2_hcd[bus->hcd.hcd_id].user_params.host_nperio_tx_fifo_size, - "host_nperio_tx_fifo_size cannot be larger than power_on_value %u", (unsigned int)(USB_OTG_GLB->DIEPTXF0_HNPTXFSIZ & 0xffff)); - USB_ASSERT_MSG((USB_OTG_GLB->HPTXFSIZ & 0xffff) >= g_dwc2_hcd[bus->hcd.hcd_id].user_params.host_perio_tx_fifo_size, - "host_perio_tx_fifo_size cannot be larger than power_on_value %u", (unsigned int)(USB_OTG_GLB->HPTXFSIZ & 0xffff)); + USB_ASSERT_MSG(((USB_OTG_GLB->DIEPTXF0_HNPTXFSIZ >> 16) & 0xffff) >= g_dwc2_hcd[bus->hcd.hcd_id].user_params.host_nperio_tx_fifo_size, + "host_nperio_tx_fifo_size cannot be larger than power_on_value %u", (unsigned int)((USB_OTG_GLB->DIEPTXF0_HNPTXFSIZ >> 16) & 0xffff)); + USB_ASSERT_MSG(((USB_OTG_GLB->HPTXFSIZ >> 16) & 0xffff) >= g_dwc2_hcd[bus->hcd.hcd_id].user_params.host_perio_tx_fifo_size, + "host_perio_tx_fifo_size cannot be larger than power_on_value %u", (unsigned int)((USB_OTG_GLB->HPTXFSIZ >> 16) & 0xffff)); /* B-peripheral session valid override enable */ USB_OTG_GLB->GOTGCTL &= ~USB_OTG_GOTGCTL_BVALOEN; |
