[usbdev] Add link state to handle resume to active The new LinkResuming state gives a place for the FSM to park until it sees a symbol that isn't part of the resume signaling. It's only after seeing the end of resume that the module should begin tracking SOF. Add the ability for software to direct the link state FSM to jump to LinkResuming from LinkPowered. This enables software to recover an active link state after going to deep sleep. Convert the usbctrl wake_config regs to use the async attribute. Prevent protocol engine from responding to transactions unless the link is in one of the active states. Signed-off-by: Alexander Williams <awill@google.com>
diff --git a/sw/device/lib/dif/dif_usbdev.h b/sw/device/lib/dif/dif_usbdev.h index 8322ea2..377effe 100644 --- a/sw/device/lib/dif/dif_usbdev.h +++ b/sw/device/lib/dif/dif_usbdev.h
@@ -579,9 +579,11 @@ typedef enum dif_usbdev_link_state { kDifUsbdevLinkStateDisconnected, kDifUsbdevLinkStatePowered, - kDifUsbdevLinkStatePoweredSuspend, + kDifUsbdevLinkStatePoweredSuspended, kDifUsbdevLinkStateActive, - kDifUsbdevLinkStateSuspend, + kDifUsbdevLinkStateSuspended, + kDifUsbdevLinkStateActiveNoSof, + kDifUsbdevLinkStateResuming, } dif_usbdev_link_state_t; /**