From: John Stultz Date: Fri, 18 May 2018 17:08:56 +0000 (-0700) Subject: WIP usb fixups X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d84f4b7ea1051763530e4d01603adbf77d55d23;p=platform%2Fkernel%2Flinux-exynos.git WIP usb fixups --- diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 12154c7f5548..496c6c92dc32 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -93,9 +93,6 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) return 0; } -static void dwc3_event_buffers_cleanup(struct dwc3 *dwc); -static int dwc3_event_buffers_setup(struct dwc3 *dwc); - void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) { u32 reg; @@ -1080,7 +1077,7 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) #else dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG); - ret = dwc3_otg_init(dwc); + ret = dwc3_hisi_otg_init(dwc); if (ret) { dev_err(dev, "failed to initialize otg\n"); return ret; @@ -1540,6 +1537,7 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) phy_pm_runtime_put_sync(dwc->usb2_generic_phy); phy_pm_runtime_put_sync(dwc->usb3_generic_phy); break; +#if 0 case DWC3_GCTL_PRTCAP_OTG: /* do nothing during runtime_suspend */ if (PMSG_IS_AUTO(msg)) @@ -1554,6 +1552,7 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg) dwc3_otg_exit(dwc); dwc3_core_exit(dwc); break; +#endif default: /* do nothing */ break; @@ -1606,7 +1605,7 @@ static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg) phy_pm_runtime_get_sync(dwc->usb2_generic_phy); phy_pm_runtime_get_sync(dwc->usb3_generic_phy); break; - case DWC3_GCTL_PRTCAP_OTG: +#if 0 /* nothing to do on runtime_resume */ if (PMSG_IS_AUTO(msg)) break; @@ -1627,6 +1626,7 @@ static int dwc3_resume_common(struct dwc3 *dwc, pm_message_t msg) } break; +#endif default: /* do nothing */ break; diff --git a/drivers/usb/dwc3/dwc3-otg.c b/drivers/usb/dwc3/dwc3-otg.c index 34a082ea96e3..483da6f6f961 100644 --- a/drivers/usb/dwc3/dwc3-otg.c +++ b/drivers/usb/dwc3/dwc3-otg.c @@ -296,7 +296,7 @@ static void dwc3_otg_work_fun(struct work_struct *w) mutex_unlock(&dwc_otg->lock); } -int dwc3_otg_init(struct dwc3 *dwc) +int dwc3_hisi_otg_init(struct dwc3 *dwc) { struct dwc3_otg *dwc_otg; u32 reg; @@ -352,7 +352,7 @@ int dwc3_otg_init(struct dwc3 *dwc) return 0; } -void dwc3_otg_exit(struct dwc3 *dwc) +void dwc3_hisi_otg_exit(struct dwc3 *dwc) { DBG("+\n"); dwc_otg_handler = NULL; diff --git a/drivers/usb/dwc3/dwc3-otg.h b/drivers/usb/dwc3/dwc3-otg.h index b9114b16f050..88b0deeabec2 100644 --- a/drivers/usb/dwc3/dwc3-otg.h +++ b/drivers/usb/dwc3/dwc3-otg.h @@ -36,7 +36,7 @@ #define DWC3_OCFG_OTGHIBDISMASK BIT(4) #define DWC3_OCFG_OTGSFTRSTMSK BIT(3) #define DWC3_OCFG_HNPCAP BIT(1) -#define DWC3_OCFG_SRPCAP 1 +#define DWC3_OCFG_SRPCAP_OLD 1 /* OTG Control Register */ #define DWC3_OCTL_OTG3_GOERR BIT(7) @@ -92,20 +92,20 @@ struct dwc3_otg { #ifdef CONFIG_USB_DWC3_OTG extern struct dwc3_otg *dwc_otg_handler; -int dwc3_otg_init(struct dwc3 *dwc); -void dwc3_otg_exit(struct dwc3 *dwc); +int dwc3_hisi_otg_init(struct dwc3 *dwc); +void dwc3_hisi_otg_exit(struct dwc3 *dwc); int dwc3_otg_work(struct dwc3_otg *dwc_otg, int evt); int dwc3_otg_resume(struct dwc3 *dwc); int dwc3_otg_suspend(struct dwc3 *dwc); int dwc3_otg_id_value(struct dwc3_otg *dwc_otg); #else #define dwc_otg_handler ((struct dwc3_otg *)NULL) -static inline int dwc3_otg_init(struct dwc3 *dwc) +static inline int dwc3_hisi_otg_init(struct dwc3 *dwc) { return 0; } -static inline void dwc3_otg_exit(struct dwc3 *dwc) +static inline void dwc3_hisi_otg_exit(struct dwc3 *dwc) { }