summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTill Harbaum <[email protected]>2024-07-15 10:55:46 +0200
committersakumisu <[email protected]>2024-07-15 17:01:57 +0800
commit9dd52fddf052b745fd379ca2d3d2ed2cd41f0011 (patch)
tree2ea4f7d81e075b343897c17560d37843a8e3fd79
parent9c14ea19a931fea0252a1368b9454972e09c0283 (diff)
Workaround for BL616 power control
-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 b2e3d46e..0ee5d2ad 100644
--- a/port/ehci/usb_hc_ehci.c
+++ b/port/ehci/usb_hc_ehci.c
@@ -1101,8 +1101,8 @@ int usbh_roothub_control(struct usbh_bus *bus, struct usb_setup_packet *setup, u
if (temp & EHCI_PORTSC_RESET) {
status |= (1 << HUB_PORT_FEATURE_RESET);
}
- if (temp & EHCI_PORTSC_PP) {
- status |= (1 << HUB_PORT_FEATURE_POWER);
+ if (temp & EHCI_PORTSC_PP || !(EHCI_HCCR->hcsparams & EHCI_HCSPARAMS_PPC) ) {
+ status |= (1 << HUB_PORT_FEATURE_POWER );
}
memcpy(buf, &status, 4);
break;