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: <5037C815.4020906@wwwdotorg.org>
Date:	Fri, 24 Aug 2012 12:29:41 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Timur Tabi <timur@...escale.com>
CC:	Fleming Andy-AFLEMING <afleming@...escale.com>,
	David Miller <davem@...emloft.net>,
	"ddaney.cavm@...il.com" <ddaney.cavm@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	Scott Wood <scottwood@...escale.com>
Subject: Re: [PATCH] [v2] netdev/phy: add MDIO bus multiplexer driven by a
 memory-mapped device

On 08/24/2012 10:27 AM, Timur Tabi wrote:
> Stephen Warren wrote:
>>>>>> Then, that'd have to be <9 1>;
>>>>
>>>> Actually, I had #size-cells = <0>.
> 
>> I think that if you have #size-cells=<0>, then you'll see the following
>> error message when attempting to translate the address into the parent's
>> address space:
>>
>> prom_parse: Bad cell count for /board-control@3,0/mdio-mux-emi2
> 
> It doesn't appear to be working.  Here's my tree:
> 
> / {
> 	model = "fsl,P5020DS";
> 	compatible = "fsl,P5020DS";
> 	#address-cells = <2>;
> 	#size-cells = <2>;
> 	interrupt-parent = <&mpic>;
> 
> 	lbc: localbus@...124000 {
> 		reg = <0xf 0xfe124000 0 0x1000>;
> 		ranges = <0 0 0xf 0xe8000000 0x08000000
> 			  2 0 0xf 0xffa00000 0x00040000
> 			  3 0 0xf 0xffdf0000 0x00008000>;
> 
> 		fpga: board-control@3,0 {
> 			#address-cells = <1>;
> 			#size-cells = <1>;
> 			compatible = "fsl,p5020ds-fpga", "fsl,fpga-ngpixis";
> 			reg = <3 0 0x30>;
> 
> 			mdio-mux-emi1 {
> 				compatible = "mdio-mux-mmioreg";
> 				mdio-parent-bus = <&mdio0>;
> 				#address-cells = <1>;
> 				#size-cells = <0>;
> 				reg = <9 1>; // BRDCFG1
> 				mux-mask = <0x78>; // EMI1
> 
> That means that the physical address that I need is fffdf0009.  However,
> when I call of_address_to_resource(), the returned address I get is fe8000009.
> 
> So it's not picking up the "3" in the 'reg' property of the
> board-control@3,0 node.  What am I missing?  Do I need a 'ranges' property
> in the board-control@3,0 node?

Yes.

When translating the child node's reg property into the parent's address
space, the parent's reg property shouldn't even be used at all; all the
mapping is done through the ranges property.

I thought the code error-checked for a missing ranges property, but I
guess not...
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ