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]
Date:   Tue, 8 Dec 2020 16:29:30 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Claudiu Beznea <claudiu.beznea@...rochip.com>, davem@...emloft.net,
        kuba@...nel.org, robh+dt@...nel.org, nicolas.ferre@...rochip.com,
        linux@...linux.org.uk, paul.walmsley@...ive.com, palmer@...belt.com
Cc:     yash.shah@...ive.com, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v2 3/8] net: macb: add function to disable all macb clocks

On 12/7/20 4:15 AM, Claudiu Beznea wrote:
> Add function to disable all macb clocks.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>
> Suggested-by: Andrew Lunn <andrew@...n.ch>
> ---
>  drivers/net/ethernet/cadence/macb_main.c | 62 ++++++++++++++++----------------
>  1 file changed, 32 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index b23e986ac6dc..6b8e1109dfd3 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -3694,6 +3694,16 @@ static void macb_probe_queues(void __iomem *mem,
>  	*num_queues = hweight32(*queue_mask);
>  }
>  
> +static void macb_clks_disable(struct clk *pclk, struct clk *hclk, struct clk *tx_clk,
> +			      struct clk *rx_clk, struct clk *tsu_clk)
> +{
> +	clk_disable_unprepare(tx_clk);
> +	clk_disable_unprepare(hclk);
> +	clk_disable_unprepare(pclk);
> +	clk_disable_unprepare(rx_clk);
> +	clk_disable_unprepare(tsu_clk);

Looks like you should consider using the CLK bulk API:
clk_bulk_disable_unprepare() and friends.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ