These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / usb / chipidea / ci.h
index 6d6200e..41d7cf6 100644 (file)
@@ -50,6 +50,8 @@ enum ci_hw_regs {
        OP_USBINTR,
        OP_DEVICEADDR,
        OP_ENDPTLISTADDR,
+       OP_TTCTRL,
+       OP_BURSTSIZE,
        OP_PORTSC,
        OP_DEVLC,
        OP_OTGSC,
@@ -406,8 +408,11 @@ static inline u32 hw_test_and_write(struct ci_hdrc *ci, enum ci_hw_regs reg,
 static inline bool ci_otg_is_fsm_mode(struct ci_hdrc *ci)
 {
 #ifdef CONFIG_USB_OTG_FSM
+       struct usb_otg_caps *otg_caps = &ci->platdata->ci_otg_caps;
+
        return ci->is_otg && ci->roles[CI_ROLE_HOST] &&
-                                       ci->roles[CI_ROLE_GADGET];
+               ci->roles[CI_ROLE_GADGET] && (otg_caps->srp_support ||
+               otg_caps->hnp_support || otg_caps->adp_support);
 #else
        return false;
 #endif
@@ -426,4 +431,6 @@ u8 hw_port_test_get(struct ci_hdrc *ci);
 int hw_wait_reg(struct ci_hdrc *ci, enum ci_hw_regs reg, u32 mask,
                                u32 value, unsigned int timeout_ms);
 
+void ci_platform_configure(struct ci_hdrc *ci);
+
 #endif /* __DRIVERS_USB_CHIPIDEA_CI_H */