summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhihong Chen <[email protected]>2023-08-01 20:01:27 +0800
committersakumisu <[email protected]>2023-08-01 20:10:02 +0800
commit4777a65f548288ac39e19d737fbd4807ffadbecc (patch)
tree8d8a31058ffb6f4d36406f58f075b6b4c0c070dd
parent96c0b655fd818770708ea0b1f47de1ff6de1a067 (diff)
ehci: update hardcode for hpmicro
- should define CONFIG_USB_EHCI_HPMICRO and CONFIG_HPM_USB_BASE in usb_config.h Signed-off-by: Zhihong Chen <[email protected]>
-rw-r--r--port/ehci/usb_hc_ehci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/port/ehci/usb_hc_ehci.c b/port/ehci/usb_hc_ehci.c
index 0c6aed3b..08643029 100644
--- a/port/ehci/usb_hc_ehci.c
+++ b/port/ehci/usb_hc_ehci.c
@@ -644,8 +644,8 @@ static int usbh_reset_port(const uint8_t port)
uint32_t timeout = 0;
uint32_t regval;
-#if CONFIG_USB_EHCI_HCOR_BASE == (0xF2020000UL + 0x140)
- if ((*(volatile uint32_t *)(0xF2020000UL + 0x224) & 0xc0) == (2 << 6)) { /* Hardcode for hpm */
+#if defined(CONFIG_USB_EHCI_HPMICRO) && CONFIG_USB_EHCI_HPMICRO
+ if ((*(volatile uint32_t *)(CONFIG_HPM_USB_BASE + 0x224) & 0xc0) == (2 << 6)) { /* Hardcode for hpm */
EHCI_HCOR->portsc[port - 1] |= (1 << 29);
} else {
EHCI_HCOR->portsc[port - 1] &= ~(1 << 29);