netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Fleming Andy-AFLEMING <afleming@freescale.com>,
	David Miller <davem@davemloft.net>,
	"ddaney.cavm@gmail.com" <ddaney.cavm@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	Scott Wood <scottwood@freescale.com>
Subject: Re: [PATCH] [v2] netdev/phy: add MDIO bus multiplexer driven by a memory-mapped device
Date: Fri, 24 Aug 2012 11:27:19 -0500	[thread overview]
Message-ID: <5037AB67.6030106@freescale.com> (raw)
In-Reply-To: <5036EB06.7060807@wwwdotorg.org>

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@ffe124000 {
		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?

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2012-08-24 16:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 19:44 [PATCH] [v2] netdev/phy: add MDIO bus multiplexer driven by a memory-mapped device Timur Tabi
     [not found] ` <1345751071-23128-1-git-send-email-timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-08-23 22:54   ` Stephen Warren
2012-08-24  0:28     ` Tabi Timur-B04825
     [not found]       ` <6AE080B68D46FC4BA2D2769E68D765B7059D1DC7-RL0Hj/+nBVC81RJBUSuqCa4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>
2012-08-24  2:46         ` Stephen Warren
2012-08-24 16:27           ` Timur Tabi [this message]
2012-08-24 18:29             ` Stephen Warren
2012-08-24 18:36               ` Timur Tabi
2012-08-24 18:43                 ` Scott Wood
2012-08-24 18:56                 ` Stephen Warren
2012-08-24 19:07                   ` David Miller
2012-08-24 19:18                     ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5037AB67.6030106@freescale.com \
    --to=timur@freescale.com \
    --cc=afleming@freescale.com \
    --cc=davem@davemloft.net \
    --cc=ddaney.cavm@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=scottwood@freescale.com \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).