lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1467822335.2914.13.camel@pengutronix.de>
Date:	Wed, 06 Jul 2016 18:25:35 +0200
From:	Philipp Zabel <p.zabel@...gutronix.de>
To:	dinguyen@...nsource.altera.com
Cc:	dinh.linux@...il.com, dinguyen@...nel.org, johnyoun@...opsys.com,
	linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] usb: dwc2: Add reset control to dwc2

Hi Dinh,

Am Dienstag, den 21.06.2016, 14:12 -0500 schrieb
dinguyen@...nsource.altera.com:
> From: Dinh Nguyen <dinguyen@...nsource.altera.com>
> 
> Allow for platforms that have a reset controller driver in place to bring
> the USB IP out of reset.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
> Acked-by: John Youn <johnyoun@...opsys.com>
> Tested-by: Stefan Wahren <stefan.wahren@...e.com>
> Acked-by: Felipe Balbi <felipe.balbi@...ux.intel.com>

Acked-by: Philipp Zabel <p.zabel@...gutronix.de>

This is an USB patch. Doesn't John collect patches and send pull
requests? Then you should put Greg Kroah-Hartman and
linux-usb@...r.kernel.org into Cc:. Things get easily lost on
linux-kernel.

regards
Philipp

> ---
> v7: Use devm_reset_control_get_optional()
> v6: fix 80 line checkpatch warning in dev_err print
> v5: updated error conditions for not finding the reset property
> v4: use dev_dbg() if not a -EPROBE_DEFER
> v3: fix compile error
> v2: move to lowlevel_hw_init()
> ---
>  drivers/usb/dwc2/core.h     |    1 +
>  drivers/usb/dwc2/platform.c |   22 ++++++++++++++++++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
> index 3c58d63..f748132 100644
> --- a/drivers/usb/dwc2/core.h
> +++ b/drivers/usb/dwc2/core.h
> @@ -837,6 +837,7 @@ struct dwc2_hsotg {
>  	void *priv;
>  	int     irq;
>  	struct clk *clk;
> +	struct reset_control *reset;
>  
>  	unsigned int queuing_high_bandwidth:1;
>  	unsigned int srp_success:1;
> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> index 88629be..d34f169 100644
> --- a/drivers/usb/dwc2/platform.c
> +++ b/drivers/usb/dwc2/platform.c
> @@ -45,6 +45,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/phy/phy.h>
>  #include <linux/platform_data/s3c-hsotg.h>
> +#include <linux/reset.h>
>  
>  #include <linux/usb/of.h>
>  
> @@ -337,6 +338,24 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg *hsotg)
>  {
>  	int i, ret;
>  
> +	hsotg->reset = devm_reset_control_get_optional(hsotg->dev, "dwc2");
> +	if (IS_ERR(hsotg->reset)) {
> +		ret = PTR_ERR(hsotg->reset);
> +		switch (ret) {
> +		case -ENOENT:
> +		case -ENOTSUPP:
> +			hsotg->reset = NULL;
> +			break;
> +		default:
> +			dev_err(hsotg->dev, "error getting reset control %d\n",
> +				ret);
> +			return ret;
> +		}
> +	}
> +
> +	if (hsotg->reset)
> +		reset_control_deassert(hsotg->reset);
> +
>  	/* Set default UTMI width */
>  	hsotg->phyif = GUSBCFG_PHYIF16;
>  
> @@ -434,6 +453,9 @@ static int dwc2_driver_remove(struct platform_device *dev)
>  	if (hsotg->ll_hw_enabled)
>  		dwc2_lowlevel_hw_disable(hsotg);
>  
> +	if (hsotg->reset)
> +		reset_control_assert(hsotg->reset);
> +
>  	return 0;
>  }
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ