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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5453F23D.1000608@opensource.altera.com>
Date:	Fri, 31 Oct 2014 15:34:05 -0500
From:	Dinh Nguyen <dinguyen@...nsource.altera.com>
To:	<p.zabel@...gutronix.de>
CC:	<dinh.linux@...il.com>, <s.trumtrar@...gutronix.de>,
	<atull@...nsource.altera.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] reset: add socfpga_reset_status

Hi Philipp,

On 10/24/2014 10:53 AM, dinguyen@...nsource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@...nsource.altera.com>
> 
> Populate the reset_status callback for SOCFPGA.
> 
> Signed-off-by: Alan Tull <atull@...nsource.altera.com>
> Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
> ---
>  drivers/reset/reset-socfpga.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/reset/reset-socfpga.c b/drivers/reset/reset-socfpga.c
> index 79c32ca..cd37849 100644
> --- a/drivers/reset/reset-socfpga.c
> +++ b/drivers/reset/reset-socfpga.c
> @@ -76,9 +76,27 @@ static int socfpga_reset_deassert(struct reset_controller_dev *rcdev,
>  	return 0;
>  }
>  
> +static int socfpga_reset_status(struct reset_controller_dev *rcdev,
> +				unsigned long id)
> +{
> +	struct socfpga_reset_data *data = container_of(rcdev,
> +						struct socfpga_reset_data, rcdev);
> +	int bank = id / BITS_PER_LONG;
> +	int offset = id % BITS_PER_LONG;
> +	unsigned long flags;
> +	u32 reg;
> +
> +	spin_lock_irqsave(&data->lock, flags);
> +	reg = readl(data->membase + OFFSET_MODRST + (bank * NR_BANKS));
> +	spin_unlock_irqrestore(&data->lock, flags);
> +
> +	return !(reg & BIT(offset));
> +}
> +
>  static struct reset_control_ops socfpga_reset_ops = {
>  	.assert		= socfpga_reset_assert,
>  	.deassert	= socfpga_reset_deassert,
> +	.status		= socfpga_reset_status,
>  };
>  
>  static int socfpga_reset_probe(struct platform_device *pdev)
> 

Just wondering if you had a chance to review this patch?

Thanks,
Dinh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ