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: <20121122153621.452CA3E129E@localhost>
Date:	Thu, 22 Nov 2012 15:36:21 +0000
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devicetree-discuss <devicetree-discuss@...ts.ozlabs.org>
Subject: Re: [PATCH] of: Have of_device_add call platform_device_add rather than device_add

On Wed, 21 Nov 2012 11:14:30 -0700, Jason Gunthorpe <jgunthorpe@...idianresearch.com> wrote:
> On Wed, Nov 21, 2012 at 06:07:46PM +0000, Grant Likely wrote:
> 
> > > Which is nesting the generic gpio driver under a larger region..
> > 
> > Try two sibling nodes with overlapping addresses. There are powerpc
> > device trees doing that even though it isn't legal by the ofw and
> > epapr specs.
> 
> Both my examples were using sibling nodes in the OF tree.
> 
> 	pex@...00000 {
> 		device_type = "pci";
> 		ranges = <0x02000000 0x00000000 0x00000000  0xe0000000  0x0 0x8000000>;
> 		bus-range = <0x0 0xFF>;
> 		chip@0 {
> 			ranges = <0x02000000 0x00000000 0x00000000  0x02000000 0x00000000 0x00000000  0x0 0x8000000>;
> 			chip_control@0 {
> 				compatible = "orc,chip,control";
> 				assigned-addresses = <0x02000000 0x0 0x0  0x0 4096>;
> 			};
> 
> 			gpio3: chip_gpio@8 {
> 			        #gpio-cells = <2>;
> 				compatible = "linux,basic-mmio-gpio";
> 				gpio-controller;
> 				reg-names = "dat", "set", "dirin";
> 				assigned-addresses = <0x02000000 0x0 0x8  0x0 4>,
> 				                     <0x02000000 0x0 0xc  0x0 4>,
> 				                     <0x02000000 0x0 0x10  0x0 4>;
> 			};
> 
> Non-conformant yes, but it is the simplest way to get linux to bind
> two drivers to the same memory space.

Hmm... I've not tried it with assigned-address. I tried with two sibling
platform devices using just the 'reg' property. That the kernel will
complain about. For powerpc-only, the patch I posted allows the device
to get registered anyway even though the range incorrectly overlaps.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ