summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhihong Chen <[email protected]>2025-03-12 18:22:39 +0800
committersakumisu <[email protected]>2025-03-28 13:27:23 +0800
commitd9c0d271740f98816a5dc1159b5d1e93f9986af5 (patch)
treeb4b15972217288f5e9ee3b3cd079377484f573c0
parent44dc3c00f6987ff7de566da8fc69ce55578ff17d (diff)
ehci: update config to improve performance
- update config to improve performance Signed-off-by: Zhihong Chen <[email protected]>
-rw-r--r--port/ehci/usb_hc_ehci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/port/ehci/usb_hc_ehci.c b/port/ehci/usb_hc_ehci.c
index b40d60d5..84c24ed5 100644
--- a/port/ehci/usb_hc_ehci.c
+++ b/port/ehci/usb_hc_ehci.c
@@ -843,7 +843,8 @@ int usb_hc_init(struct usbh_bus *bus)
/* Set the Periodic Frame List Base Address. */
EHCI_HCOR->periodiclistbase = EHCI_PTR2ADDR(g_framelist[bus->hcd.hcd_id]);
- regval = 0;
+ regval = EHCI_HCOR->usbcmd;
+ regval &= ~(EHCI_USBCMD_ITHRE_MASK | EHCI_USBCMD_FLSIZE_MASK);
#if CONFIG_USB_EHCI_FRAME_LIST_SIZE == 1024
regval |= EHCI_USBCMD_FLSIZE_1024;
#elif CONFIG_USB_EHCI_FRAME_LIST_SIZE == 512
@@ -854,7 +855,9 @@ int usb_hc_init(struct usbh_bus *bus)
#error Unsupported frame size list size
#endif
+#if !defined(CONFIG_USB_EHCI_HPMICRO) || !CONFIG_USB_EHCI_HPMICRO
regval |= EHCI_USBCMD_ITHRE_1MF;
+#endif
regval |= EHCI_USBCMD_ASEN;
regval |= EHCI_USBCMD_PSEN;
regval |= EHCI_USBCMD_RUN;