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: <aQjNxCencdfq4bXq@lizhi-Precision-Tower-5810>
Date: Mon, 3 Nov 2025 10:44:04 -0500
From: Frank Li <Frank.li@....com>
To: Jisheng Zhang <jszhang@...nel.org>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	linux-i3c@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] i3c: dw: Add apb reset support

On Sun, Nov 02, 2025 at 06:02:37PM +0800, Jisheng Zhang wrote:
> Add support of apb reset which is to reset the APB interface.
>
> Signed-off-by: Jisheng Zhang <jszhang@...nel.org>
> ---
>  drivers/i3c/master/dw-i3c-master.c | 9 +++++++++
>  drivers/i3c/master/dw-i3c-master.h | 1 +
>  2 files changed, 10 insertions(+)
>
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index 9ceedf09c3b6..ca2863d2b2b7 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1558,7 +1558,13 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
>  	if (IS_ERR(master->core_rst))
>  		return PTR_ERR(master->core_rst);
>
> +	master->apb_rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
> +								    "apb_rst");

Does binding already add "app_rst"?  The name "app" should be enough.

Frank

> +	if (IS_ERR(master->apb_rst))
> +		return PTR_ERR(master->apb_rst);
> +
>  	reset_control_deassert(master->core_rst);
> +	reset_control_deassert(master->apb_rst);
>
>  	spin_lock_init(&master->xferqueue.lock);
>  	INIT_LIST_HEAD(&master->xferqueue.list);
> @@ -1607,6 +1613,7 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
>
>  err_assert_rst:
>  	reset_control_assert(master->core_rst);
> +	reset_control_assert(master->apb_rst);
>
>  	return ret;
>  }
> @@ -1711,6 +1718,7 @@ static int __maybe_unused dw_i3c_master_runtime_suspend(struct device *dev)
>  	dw_i3c_master_disable(master);
>
>  	reset_control_assert(master->core_rst);
> +	reset_control_assert(master->apb_rst);
>  	dw_i3c_master_disable_clks(master);
>  	pinctrl_pm_select_sleep_state(dev);
>  	return 0;
> @@ -1723,6 +1731,7 @@ static int __maybe_unused dw_i3c_master_runtime_resume(struct device *dev)
>  	pinctrl_pm_select_default_state(dev);
>  	dw_i3c_master_enable_clks(master);
>  	reset_control_deassert(master->core_rst);
> +	reset_control_deassert(master->apb_rst);
>
>  	dw_i3c_master_set_intr_regs(master);
>  	dw_i3c_master_restore_timing_regs(master);
> diff --git a/drivers/i3c/master/dw-i3c-master.h b/drivers/i3c/master/dw-i3c-master.h
> index c5cb695c16ab..a4ba60043288 100644
> --- a/drivers/i3c/master/dw-i3c-master.h
> +++ b/drivers/i3c/master/dw-i3c-master.h
> @@ -37,6 +37,7 @@ struct dw_i3c_master {
>  	struct dw_i3c_master_caps caps;
>  	void __iomem *regs;
>  	struct reset_control *core_rst;
> +	struct reset_control *apb_rst;
>  	struct clk *core_clk;
>  	struct clk *pclk;
>  	char version[5];
> --
> 2.51.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ