dwc_otg: Force host or device mode when not using OTG

The dwc_otg driver determines the USB mode (host/device) based on the
bit CurMod in the interrupt status register. This bit is driven by the
OTG id pin which is floating on gfsc100. If the controller is
initialized very early in the boot process the pin somtimes has a high
level, in consequence CurMod is not set and the driver configures the
controller for device mode. Over time the voltage level apparently
decreases below the "high" threshold. If the driver initializes the
controller beyond this point the CurMod bit is set and the controller is
configured for host mode.

Boot timing differs between gfsc100 prod and dev builds, on prod builds
the issue described above is encountered frequently. Work around it by
ignoring CurMod when host or device-only mode is configured.

Google-Bug-Id: 25875347

Change-Id: Ib778592dd8756a7934f7af0be0d29199b8cf4073
2 files changed