ohci: enumerate a device that was already attached at init
hcd_init() clears every pending interrupt flag before enabling its own set:
OHCI_REG->interrupt_status = OHCI_REG->interrupt_status;
If a device is already connected at that point, that write drops the RHSC
which went with the connect, while the root hub keeps ConnectStatusChange
set. The device stays put, so no new edge follows and the attach is never
reported - the port sits at CCS=1, CSC=1, PES=0 forever.
Host-only builds got away with it because the connect is usually detected
after that clear. In a dual build the device stack initialises first and
enables the shared USB interrupt, which moves the detection into the window
that gets cleared, and the host then never sees the device.
Scan the root-hub ports once at the end of hcd_init and raise the attach
ourselves, clearing the stale change bit so the next RHSC does not report
the same device again.
Verified on ea4088_quickstart: dual/host_info_to_device_cdc now enumerates
on a plain reset (HIL test passes, "Device 1: ID 1a86:8010 SN 7FD88F0604B5"),
host/device_info still enumerates, and device/cdc_msc is unaffected.
host/device_info also builds for lpcxpresso55s69, lpcxpresso1769 and mcb1800.
1 file changed