lkml.org 
[lkml]   [2015]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 2/2] usb: dwc2: refactor common low-level hw code to platform.c
Date
On 10/6/2015 1:56 AM, Marek Szyprowski wrote:
> DWC2 module on some platforms needs three additional hardware
> resources: phy controller, clock and power supply. All of them must be
> enabled/activated to properly initialize and operate. This was initially
> handled in s3c-hsotg driver, which has been converted to 'gadget' part
> of dwc2 driver. Unfortunately, not all of this code got moved to common
> platform code, what resulted in accessing DWC2 registers without
> enabling low-level hardware resources. This fails for example on Exynos
> SoCs. This patch moves all the code for managing those resources to
> common platform.c file and provides convenient wrappers for controlling
> them.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> Changelog:
> v5:
> - added separate patch removing init_mutex, which is no longer needed
>
> v4:
> - fixed broken conditional compilation and adjusted comments in dwc2_hsotg
> structure documentation
>
> v3:
> - rebased onto latest 'testing/next' from Felipe Balbi (includes
> s3c_hsotg -> dwc2 rename)
>
> v2:
> - moved setting of ll_hw_enabled flag to enable/disable functions,
> as suggested by John Youn
> - moved setting of phy width to dwc2_lowlevel_init function
> ---
> drivers/usb/dwc2/core.h | 24 +++--
> drivers/usb/dwc2/gadget.c | 186 ++++----------------------------------
> drivers/usb/dwc2/platform.c | 216 ++++++++++++++++++++++++++++++++++++--------
> 3 files changed, 210 insertions(+), 216 deletions(-)
>
> diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
> index 89091db..7e79976 100644
> --- a/drivers/usb/dwc2/core.h
> +++ b/drivers/usb/dwc2/core.h
> @@ -579,6 +579,15 @@ struct dwc2_hregs_backup {
> * - USB_DR_MODE_PERIPHERAL
> * - USB_DR_MODE_HOST
> * - USB_DR_MODE_OTG
> + * @hcd_enabled Host mode sub-driver initialization indicator.
> + * @gadget_enabled Peripheral mode sub-driver initialization indicator.
> + * l@l_hw_enabled Status of low-level hardware resources.

Typo here.


Otherwise for this series:

Acked-by: John Youn <johnyoun@synopsys.com>
Tested-by: John Youn <johnyoun@synopsys.com>

Tested on IP v3.20a host/gadget/DRD mode.

Regards,
John



\
 
 \ /
  Last update: 2015-10-07 05:01    [W:0.085 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site