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: <20161123150300.GA4082@atomide.com>
Date:   Wed, 23 Nov 2016 07:03:01 -0800
From:   Tony Lindgren <tony@...mide.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Lee Jones <lee.jones@...aro.org>,
        Samuel Ortiz <sameo@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
        devicetree@...r.kernel.org, Marcel Partap <mpartap@....net>,
        Mark Rutland <mark.rutland@....com>,
        Michael Scott <michael.scott@...aro.org>
Subject: Re: [PATCH] mfd: cpcap: Add minimal support

* Rob Herring <robh@...nel.org> [161121 08:34]:
> On Mon, Nov 21, 2016 at 11:45:58AM +0000, Lee Jones wrote:
> > On Fri, 18 Nov 2016, Tony Lindgren wrote:
> > > +Example:
> > > +
> > > +&mcspi1 {
> > > +	#address-cells = <1>;
> > > +	#size-cells = <1>;
> > > +	ranges;
> > > +	cpcap: pmic@0 {
> > > +		compatible = "motorola,cpcap", "st,6556002";
> > > +		reg = <0 0>;	/* cs0, size 0 */
> > 
> > Is this really correct?
> 
> No, SPI devices are 1 cell and there shouldn't be a ranges prop.
> 
> > 
> > How can ranges have a size of 0x8000 and this 0?
> 
> reg here doesn't affect ranges and address translation.
> 
> Perhaps this is trying to make address translation work, but if that 
> does, it is by chance. Children of pmic addresses in the range of 
> 0-0x8000 would get translated to "cpu address" 0-0x8000 as long as the 
> DT has empty ranges up to the root. If the parent bus (i.e. SoC bus) has 
> any base address, then that is going to get added which would not be 
> good.

Yes I was thinking we can just get the register offset from the
cpcap base from dts for children. So a range from 0-0x8000.

Rob, do you have any better suggestions for doing that?

Anyways, the children can just rely on regmap too, so I'll just
drop the ranges here. If we ever come up with suitable ranges for
cases like this we can change it later.

Regards,

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ