From 4777a65f548288ac39e19d737fbd4807ffadbecc Mon Sep 17 00:00:00 2001 From: Zhihong Chen Date: Tue, 1 Aug 2023 20:01:27 +0800 Subject: 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 --- port/ehci/usb_hc_ehci.c | 4 ++-- 1 file 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); -- cgit v1.3.1