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]
Message-ID: <20200514151819.GO37466@atomide.com>
Date:   Thu, 14 May 2020 08:18:19 -0700
From:   Tony Lindgren <tony@...mide.com>
To:     Tero Kristo <t-kristo@...com>
Cc:     linux-omap@...r.kernel.org, "Andrew F . Davis" <afd@...com>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Suman Anna <s-anna@...com>, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH 2/6] soc: ti: omap-prm: Add basic power domain support

* Tero Kristo <t-kristo@...com> [200514 08:05]:
> On 12/05/2020 23:38, Tony Lindgren wrote:
> > +struct omap_prm_domain {
> > +	struct device *dev;
> > +	struct omap_prm *prm;
> > +	struct generic_pm_domain pd;
> > +	void __iomem *pwrstctrl;
> > +	void __iomem *pwrstst;
> 
> I think the pwrstst is not really used as of now, it is just part of couple
> of dev_dbg prints.

Yes to me it seems the pwrstst only changes later on.

> > +static int omap_prm_domain_power_on(struct generic_pm_domain *domain)
> > +{
> > +	struct omap_prm_domain *prmd;
> > +	u32 v;
> > +
> > +	prmd = genpd_to_prm_domain(domain);
> > +	if (!prmd->cap)
> > +		return 0;
> > +
> > +	dev_dbg(prmd->dev, "%s: %s: old state: pwrstctrl: %08x pwrstst: %08x\n",
> > +		__func__, prmd->pd.name, readl_relaxed(prmd->pwrstctrl),
> > +		readl_relaxed(prmd->pwrstst));
> > +
> > +	if (prmd->pwrstctrl_saved)
> > +		v = prmd->pwrstctrl_saved;
> > +	else
> > +		v = readl_relaxed(prmd->pwrstctrl);
> > +
> > +	writel_relaxed(v | OMAP_PRMD_ON_ACTIVE, prmd->pwrstctrl);
> > +	dev_dbg(prmd->dev, "%s: %s: new state pwrstctrl: %08x\n",
> > +		__func__, prmd->pd.name, readl_relaxed(prmd->pwrstctrl));
> 
> Should we wait for the transition to complete here?

Good idea :)

> > +	v &= ~PRM_POWERSTATE_MASK;
> > +	v |= omap_prm_domain_find_lowest(prmd);
> > +
> > +	if (prmd->cap->statechange)
> > +		v |= PRM_LOWPOWERSTATECHANGE;
> > +	if (prmd->cap->logicretstate)
> > +		v &= ~PRM_LOGICRETSTATE;
> > +	else
> > +		v |= PRM_LOGICRETSTATE;
> > +
> > +	writel_relaxed(v, prmd->pwrstctrl);
> 
> Should we wait for the transition to complete here?

Would be nice yeah.

> Is any of the following clock handling needed, and if yes, whats its
> purpose?
> 
> It looks like this is only used for ABE clkctrl handling on omap4/omap5 (at
> least for now), but afaik, ABE clkctrl is read only so this code would
> effectively do nothing (and potentially just even fail.)

Yeah this seems unnecessary, let's plan on leaving it out. I think the
clocks in the l4_abe dst changes are actually handled by simple-pm-bus,
not this driver, I was just confused :)

Regards,

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ