From: Andy Fleming <afleming@freescale.com>
To: David Miller <davem@davemloft.net>,
	Kumar Gala <galak@kernel.crashing.org>
Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] pq3: Add default tbi address
Date: Fri, 2 Dec 2011 01:05:49 -0600	[thread overview]
Message-ID: <1322809549-32622-2-git-send-email-afleming@freescale.com> (raw)
In-Reply-To: <1322809549-32622-1-git-send-email-afleming@freescale.com>
The MDIO driver has been changed so that it no longer supports
scanning the MDIO bus for a free address for the TBI PHY. This
feature was fragile, and required scanning the bus before the bus
was fully up and registered. The intended way for FSL devices to
specify the TBI PHY's address is via a tbi node in the device tree.
All of the device trees had such a node, except for the recent p1/p2
trees. Rather than hand-fixing all of those boards, set a default
value (most boards were using 0x11, anyway), and any board which
wants to change it from that default can then override it in its
board dts file.
This fixes an issue where p1/p2 boards would fail to bring up
Ethernet, due to not finding a tbi node.
Signed-off-by: Andy Fleming <afleming@freescale.com>
---
 arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi |    5 +++++
 arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi
index a1979ae..0a42e21 100644
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec1-0.dtsi
@@ -50,4 +50,9 @@ mdio@24520 {
 	#size-cells = <0>;
 	compatible = "fsl,gianfar-mdio";
 	reg = <0x24520 0x20>;
+
+	tbi-phy@11 {
+		device-type = "tbi-phy";
+		reg = <0x11>;
+	};
 };
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
index 1382fec..964670a 100644
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
@@ -38,6 +38,11 @@ mdio@24000 {
 	#size-cells = <0>;
 	compatible = "fsl,etsec2-mdio";
 	reg = <0x24000 0x1000 0xb0030 0x4>;
+
+	tbi-phy@11 {
+		device-type = "tbi-phy";
+		reg = <0x11>;
+	};
 };
 
 ethernet@b0000 {
-- 
1.7.3.4
next prev parent reply	other threads:[~2011-12-02  7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02  7:05 [PATCH] Revert "net: fsl_pq_mdio: fix non tbi phy access" Andy Fleming
2011-12-02  7:05 ` Andy Fleming [this message]
2011-12-02  7:20   ` [PATCH] pq3: Add default tbi address Kumar Gala
2011-12-03 20:15     ` Andy Fleming
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=1322809549-32622-2-git-send-email-afleming@freescale.com \
    --to=afleming@freescale.com \
    --cc=davem@davemloft.net \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.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).