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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b5b9cdaa87efd4f5f8a93f21581b53c409524156.camel@pengutronix.de>
Date:   Wed, 04 Mar 2020 10:10:40 +0100
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     John Stultz <john.stultz@...aro.org>,
        lkml <linux-kernel@...r.kernel.org>
Cc:     Peter Griffin <peter.griffin@...aro.org>,
        Enrico Weigelt <info@...ux.net>
Subject: Re: [PATCH v2] reset: hi6220: Add support for AO reset controller

Hi John, Peter,

thank you for the patch. Just one issue remaining, see below:

On Mon, 2020-03-02 at 17:40 +0000, John Stultz wrote:
> From: Peter Griffin <peter.griffin@...aro.org>
> 
> This is required to bring Mali450 gpu out of reset.
> 
> Cc: Philipp Zabel <p.zabel@...gutronix.de>
> Cc: Peter Griffin <peter.griffin@...aro.org>
> Cc: Enrico Weigelt <info@...ux.net>
> Signed-off-by: Peter Griffin <peter.griffin@...aro.org>
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
> v2:
> * Updated to v2 of Peter's patch from here:
>     https://lkml.org/lkml/2019/4/19/253
> * Added a comment to explain ordering question brought
>   up on the list.
> ---
>  drivers/reset/hisilicon/hi6220_reset.c | 71 +++++++++++++++++++++++++-
>  1 file changed, 70 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/reset/hisilicon/hi6220_reset.c b/drivers/reset/hisilicon/hi6220_reset.c
> index 24e6d420b26b..a85ed276ab83 100644
> --- a/drivers/reset/hisilicon/hi6220_reset.c
> +++ b/drivers/reset/hisilicon/hi6220_reset.c
> @@ -33,6 +33,7 @@
>  enum hi6220_reset_ctrl_type {
>  	PERIPHERAL,
>  	MEDIA,
> +	AO,
>  };
>  
>  struct hi6220_reset_data {
> @@ -92,6 +93,67 @@ static const struct reset_control_ops hi6220_media_reset_ops = {
>  	.deassert = hi6220_media_deassert,
>  };
>  
> +#define AO_SCTRL_SC_PW_CLKEN0     0x800
> +#define AO_SCTRL_SC_PW_CLKDIS0    0x804
> +
> +#define AO_SCTRL_SC_PW_RSTEN0     0x810
> +#define AO_SCTRL_SC_PW_RSTDIS0    0x814
> +
> +#define AO_SCTRL_SC_PW_ISOEN0     0x820
> +#define AO_SCTRL_SC_PW_ISODIS0    0x824
> +#define AO_MAX_INDEX              12
> +
> +static int hi6220_ao_assert(struct reset_controller_dev *rc_dev,
> +			       unsigned long idx)
> +{
> +	struct hi6220_reset_data *data = to_reset_data(rc_dev);
> +	struct regmap *regmap = data->regmap;
> +	int ret;
> +
> +	ret = regmap_write(regmap, AO_SCTRL_SC_PW_RSTEN0, BIT(idx));
> +	if (ret)
> +		return ret;
> +
> +	ret = regmap_write(regmap, AO_SCTRL_SC_PW_ISOEN0, BIT(idx));
> +	if (ret)
> +		return ret;
> +
> +	ret = regmap_write(regmap, AO_SCTRL_SC_PW_CLKDIS0, BIT(idx));
> +	if (ret)
> +		return ret;


drivers/reset/hisilicon/hi6220_reset.c: In function ‘hi6220_ao_assert’:
drivers/reset/hisilicon/hi6220_reset.c:124:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

Just "return regmap_write(...)" for the last one, same in
hi6220_ao_deassert().

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ