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
| ||
|
Date: Thu, 28 Oct 2021 23:41:57 -0700 From: Stephen Boyd <sboyd@...nel.org> To: Horatiu Vultur <horatiu.vultur@...rochip.com>, mturquette@...libre.com, robh+dt@...nel.org Cc: nicolas.ferre@...rochip.com, kavyasree.kotagiri@...rochip.com, eugen.hristev@...rochip.com, linux-clk@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, Horatiu Vultur <horatiu.vultur@...rochip.com> Subject: Re: [RFC PATCH 3/3] clk: lan966x: Extend lan966x clock driver for clock gating support Quoting Horatiu Vultur (2021-10-19 01:44:49) > diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c > index 19bec94e1551..40be47092a31 100644 > --- a/drivers/clk/clk-lan966x.c > +++ b/drivers/clk/clk-lan966x.c > @@ -188,26 +202,64 @@ static struct clk_hw *lan966x_gck_clk_register(struct device *dev, int i) > return &priv->hw; > }; > > +static int lan966x_gate_clk_register(struct device *dev, > + struct clk_hw_onecell_data *hw_data, > + void __iomem *gate_base) > +{ > + int i; > + > + for (i = GCK_GATE_UHPHS; i < N_CLOCKS; ++i) { > + int idx = i - GCK_GATE_UHPHS; > + > + hw_data->hws[i] = > + clk_hw_register_gate(dev, clk_gate_desc[idx].name, Use devm? > + "lan966x", 0, base, > + clk_gate_desc[idx].bit_idx, > + 0, &clk_gate_lock); > + > + if (IS_ERR(hw_data->hws[i])) > + return dev_err_probe(dev, PTR_ERR(hw_data->hws[i]), > + "failed to register %s clock\n", > + clk_gate_desc[idx].name); > + } > + > + return 0; > +} > + > +static void lan966x_gate_clk_unregister(struct clk_hw_onecell_data *hw_data) > +{ > + int i; > + > + for (i = GCK_GATE_UHPHS; i < N_CLOCKS; ++i) for (int i = should suffice > + if (!IS_ERR(hw_data->hws[i])) > + clk_hw_unregister(hw_data->hws[i]); > +} > +
Powered by blists - more mailing lists