usb: dwc3-generic: factorize code

Factor code for re-usability.
This is another step toward adding host support.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
1 file changed