linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Linux >=2.6.24 support for FEC on MPC5200 (not B!)
@ 2008-03-12 18:57 René Bürgel
  2008-03-13 21:50 ` Grant Likely
  2008-03-20  5:06 ` Grant Likely
  0 siblings, 2 replies; 4+ messages in thread
From: René Bürgel @ 2008-03-12 18:57 UTC (permalink / raw)
  To: linuxppc-dev

[-- 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",
+	},
 	{},
 };
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Linux >=2.6.24 support for FEC on MPC5200 (not B!)
  2008-03-12 18:57 René Bürgel
@ 2008-03-13 21:50 ` Grant Likely
  2008-03-20  5:06 ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2008-03-13 21:50 UTC (permalink / raw)
  To: René Bürgel; +Cc: linuxppc-dev

On Wed, Mar 12, 2008 at 12:57 PM, Ren=E9 B=FCrgel <r.buergel@unicontrol.de>=
 wrote:
> Here is a patch for the lite5200 to get the FEC working again for kernel
>   >=3D2.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.

Looks good.  I'll pick this one up.

g.


--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Linux >=2.6.24 support for FEC on MPC5200 (not B!)
  2008-03-12 18:57 René Bürgel
  2008-03-13 21:50 ` Grant Likely
@ 2008-03-20  5:06 ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2008-03-20  5:06 UTC (permalink / raw)
  To: René Bürgel; +Cc: linuxppc-dev

On Wed, Mar 12, 2008 at 12:57 PM, Ren=E9 B=FCrgel <r.buergel@unicontrol.de>=
 wrote:
> Here is a patch for the lite5200 to get the FEC working again for kernel
>   >=3D2.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.

Oops, I spoke too soon on picking this up.  The patch looks mostly
good, but it does not apply to the head of the tree.  Can you please
rebase it on top of Linus' current tree and repost?  While you're at
it, I've got a couple of minor comments below that should be
addressed:


>  +               mdio@3000 {
>  +                       #address-cells =3D <1>;
>  +                       #size-cells =3D <0>;
>  +                       device_type =3D "mdio";
Drop the device_type property

>  +                       compatible =3D "mpc5200-fec-phy";
should be "mpc5200-mdio"  (see current lite5200 for the example)

Cheers,
g.



--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Linux >=2.6.24 support for FEC on MPC5200 (not B!)
@ 2008-04-03  8:58 René Bürgel
  0 siblings, 0 replies; 4+ messages in thread
From: René Bürgel @ 2008-04-03  8:58 UTC (permalink / raw)
  To: linuxppc-dev

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

Here is a patch for the lite5200 to get the FEC working again for kernel 
 >=2.6.25.

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.

Signed-off-by: René Bürgel <r.buergel@unicontrol.de>

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
 
Unicontrol Systemtechnik GmbH
Geschäftsführer: Dipl.-Ing. Siegfried Heinze
Sitz der Gesellschaft: Frankenberg
Registergericht: Amtsgericht Chemnitz, HRB 15 475
 
Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen können Betriebs- und Geschäftsgeheimnisse, dem Anwaltsgeheimnis unterliegende oder sonstige vertrauliche Informationen 
enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen der Status dieser E-Mail bekannt. Bitte benachrichtigen Sie uns in diesem Falle sofort durch 
Antwort-Mail und löschen Sie diese E-Mail nebst etwaigen Anlagen aus Ihrem System. Ebenso dürfen Sie diese E-Mail oder ihre Anlagen nicht kopieren oder an Dritte 
weitergeben. Vielen Dank!
 
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. 
If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your 
system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. Thank 
you.



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

diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 0d701c1..09b4e16 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -258,6 +258,21 @@
 			local-mac-address = [ 00 00 00 00 00 00 ];
 			interrupts = <2 5 0>;
 			interrupt-parent = <&mpc5200_pic>;
+			phy-handle = <&phy0>;
+		};
+
+		mdio@3000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "fsl,mpc5200-mdio";
+			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 {
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 58b71e6..fe59c27 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -1057,6 +1057,7 @@ static int mpc52xx_fec_of_resume(struct of_device *op)
 #endif
 
 static struct of_device_id mpc52xx_fec_match[] = {
+	{ .type = "network", .compatible = "fsl,mpc5200b-fec", },
 	{ .type = "network", .compatible = "fsl,mpc5200-fec", },
 	{ .type = "network", .compatible = "mpc5200-fec", },
 	{ }
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index 6a3ac4e..1d0cd1d 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -179,6 +179,7 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of)
 
 static struct of_device_id mpc52xx_fec_mdio_match[] = {
 	{ .compatible = "fsl,mpc5200b-mdio", },
+	{ .compatible = "fsl,mpc5200-mdio", },
 	{ .compatible = "mpc5200b-fec-phy", },
 	{}
 };

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-03  8:34 UTC | newest]

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

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).