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]
Date:   Mon, 29 Aug 2016 10:46:23 -0700
From:   Stephen Boyd <sboyd@...eaurora.org>
To:     James Liao <jamesjj.liao@...iatek.com>
Cc:     Erin Lo <erin.lo@...iatek.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Mike Turquette <mturquette@...libre.com>,
        Rob Herring <robh@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Sascha Hauer <kernel@...gutronix.de>,
        Daniel Kurtz <djkurtz@...omium.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        linux-clk@...r.kernel.org, srv_heupstream@...iatek.com,
        Shunli Wang <shunli.wang@...iatek.com>
Subject: Re: [PATCH v12 1/4] clk: mediatek: Add MT2701 clock support

On 08/27, James Liao wrote:
> On Wed, 2016-08-24 at 10:49 -0700, Stephen Boyd wrote:
> > On 08/22, Erin Lo wrote:
> > > +
> > > +static void __init mtk_infrasys_init_early(struct device_node *node)
> > > +{
> > > +	int r, i;
> > > +
> > > +	if (!infra_clk_data) {
> > > +		infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
> > > +
> > > +		for (i = 0; i < CLK_INFRA_NR; i++)
> > > +			infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
> > > +	}
> > > +
> > > +	mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
> > > +						infra_clk_data);
> > > +
> > > +	r = of_clk_add_provider(node, of_clk_src_onecell_get, infra_clk_data);
> > > +	if (r)
> > > +		pr_err("%s(): could not register clock provider: %d\n",
> > > +			__func__, r);
> > > +}
> > > +CLK_OF_DECLARE(mtk_infra, "mediatek,mt2701-infracfg", mtk_infrasys_init_early);
> > 
> > This should use CLK_OF_DECLARE_DRIVER? Has this been tested on
> > latest clk-next? Some recent patches make it so that
> > CLK_OF_DECLARE() prevents platform devices from being created for
> > the associated DT nodes that match during of_clk_init().
> 
> Oops, you are right. Clocks in infra_clks are gone on clk-next, but they
> are good on v4.8-rc1.
> 
> I register clk13m in infra_fixed_divs through CLK_OF_DECLARE() so that
> it can be registered as early as possible because it will be referred by
> the timer driver. Is there a formal way to separate clock registrations
> on the same clock provider? Or should I move infra_clks registration
> into CLK_OF_DECLARE()?

The way to do this is use CLK_OF_DECLARE_DRIVER() and then do the
early clks in the CLK_OF callback and the rest of them in the
driver probe.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ