usb_gadget: Move common code to hwcommon