linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "René Bürgel" <r.buergel@unicontrol.de>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] Linux >=2.6.24 support for FEC on MPC5200 (not B!)
Date: Wed, 12 Mar 2008 19:57:41 +0100	[thread overview]
Message-ID: <47D827A5.8040701@unicontrol.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Here is a patch for the lite5200 to get the FEC working again for kernel 
 >=2.6.24. It was created against Linux 2.6.24.

The FEC driver is also compatible with the MPC5200, not only with the 
MPC5200B, so an according entry was added to the drivers matching list.
Furthermore the settings for the PHY were entered in the dts file for 
the Lite5200. Note, that this is not exactly the same as in the 
Lite5200B, because the PHY is located at f0003000:01 for the 5200, and 
at :00 for the 5200B. I could test the patch on a Lite5200 and a 
Lite5200B, both booted a kernel via tftp and mounted the root via nfs 
successfully.
I hope, you can include the patch into the official tree.


Kind regards, René Bürgel

-- 
Unicontrol Systemtechnik GmbH
OT Dittersbach
Sachsenburger Weg 34
09669 Frankenberg
 
Tel.: 03 72 06/ 88 73 - 12
Fax: 03 72 06/ 88 73 - 60
E-Mail: r.buergel@unicontrol.de
Internet: www.unicontrol.de


[-- Attachment #2: lite5200_fec_on_linux_2.6.24.patch --]
[-- Type: text/plain, Size: 1514 bytes --]

--- ../kernel/current/arch/powerpc/boot/dts/lite5200.dts	2008-03-12 18:26:02.000000000 +0100
+++ linux-2.6.24-uc/arch/powerpc/boot/dts/lite5200.dts	2008-03-12 17:44:06.000000000 +0100
@@ -273,6 +273,22 @@
 			mac-address = [ 02 03 04 05 06 07 ]; // Bad!
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			device_type = "mdio";
+			compatible = "mpc5200-fec-phy";
+			reg = <3000 400>;	// fec range, since we need to setup fec interrupts
+			interrupts = <2 5 0>;	// these are for "mii command finished", not link changes & co.
+			interrupt-parent = <&mpc5200_pic>;
+
+			phy0:ethernet-phy@1 {
+				device_type = "ethernet-phy";
+				reg = <1>;
+			};
 		};
 
 		ata@3a00 {
--- ../kernel/linux-2.6.24-uc/drivers/net/fec_mpc52xx.c	2008-03-12 15:25:27.000000000 +0100
+++ linux-2.6.24-uc/drivers/net/fec_mpc52xx.c	2008-03-12 18:39:30.000000000 +0100
@@ -1059,6 +1059,10 @@
 static struct of_device_id mpc52xx_fec_match[] = {
 	{
 		.type		= "network",
+		.compatible	= "mpc5200b-fec",
+	},
+	{
+		.type		= "network",
 		.compatible	= "mpc5200-fec",
 	},
 	{ }
--- ../kernel/linux-2.6.24-uc/drivers/net/fec_mpc52xx_phy.c	2008-03-12 15:12:11.000000000 +0100
+++ linux-2.6.24-uc/drivers/net/fec_mpc52xx_phy.c	2008-03-12 19:47:39.000000000 +0100
@@ -181,6 +181,10 @@
 		.type = "mdio",
 		.compatible = "mpc5200b-fec-phy",
 	},
+	{
+		.type = "mdio",
+		.compatible = "mpc5200-fec-phy",
+	},
 	{},
 };
 

             reply	other threads:[~2008-03-12 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 18:57 René Bürgel [this message]
2008-03-13 21:50 ` [PATCH] Linux >=2.6.24 support for FEC on MPC5200 (not B!) Grant Likely
2008-03-20  5:06 ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2008-04-03  8:58 René Bürgel

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=47D827A5.8040701@unicontrol.de \
    --to=r.buergel@unicontrol.de \
    --cc=linuxppc-dev@ozlabs.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).