devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Tabi Timur-B04825 <B04825-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	Fleming Andy-AFLEMING
	<afleming-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: Re: [PATCH] [v2] netdev/phy: add MDIO bus multiplexer driven by a memory-mapped device
Date: Thu, 23 Aug 2012 20:46:30 -0600	[thread overview]
Message-ID: <5036EB06.7060807@wwwdotorg.org> (raw)
In-Reply-To: <6AE080B68D46FC4BA2D2769E68D765B7059D1DC7-RL0Hj/+nBVC81RJBUSuqCa4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org>

On 08/23/2012 06:28 PM, Tabi Timur-B04825 wrote:
> Stephen Warren wrote:
>> On 08/23/2012 01:44 PM, Timur Tabi wrote:
>>> Add support for an MDIO bus multiplexer controlled by a simple memory-mapped
>>> device, like an FPGA.  The device must be memory-mapped and contain only
>>> 8-bit registers (which keeps things simple).
>>
>>> +++ b/Documentation/devicetree/bindings/net/mdio-mux-mmioreg.txt
>>
>>> +	/* The FPGA node */
>>> +	fpga: board-control@3,0 {
>>> +		compatible = "fsl,p5020ds-fpga", "fsl,fpga-ngpixis";
>>> +		reg = <3 0 0x30>;
>>
>> Why not add the following here:
>>
>> 	#address-cells = <1>:
>> 	#size-cells = <1>;
>> 	ranges = <...>;
> 
> I forgot to add them in the txt file.  They are in the real device tree.
> 
>>
>>> +
>>> +		mdio-mux-emi2 {
>>> +			compatible = "mdio-mux-mmioreg", "mdio-mux";
>>> +			mdio-parent-bus = <&xmdio0>;
>>> +			#address-cells = <1>;
>>> +			#size-cells = <0>;
>>> +			reg = <9>; // BRDCFG1
>>
>> 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

I fixed that error for cases where actual address translation isn't
required (i.e. coming up with the platform device name), but IIRC it'll
still trigger if you actually want to translate the address.

  parent reply	other threads:[~2012-08-24  2:46 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 [this message]
2012-08-24 16:27           ` Timur Tabi
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=5036EB06.7060807@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=B04825-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=afleming-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).