All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: linuxppc-dev@ozlabs.org
Subject: add phy-handle property for fec_mpc52xx
Date: Wed, 9 Jan 2008 15:06:08 +0100	[thread overview]
Message-ID: <20080109140608.GA15673@aepfle.de> (raw)


The new network driver fec_mpc52xx will not work on efika because the
firmware does not provide all required properties.
http://www.powerdeveloper.org/asset/by-id/46 has a Forth script to
create more properties. But only the phy stuff is required to get a
working network.

This should go into the kernel because its appearently
impossible to boot the script via tftp and then load the real boot
binary (yaboot or zimage).

---
 arch/powerpc/kernel/prom_init.c |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1487,6 +1487,34 @@ static void __init prom_find_mmu(void)
 	else if (strncmp(version, "FirmWorks,3.", 12) == 0) {
 		of_workarounds = OF_WA_CLAIM | OF_WA_LONGTRAIL;
 		call_prom("interpret", 1, 1, "dev /memory 0 to allow-reclaim");
+#ifdef CONFIG_PPC_MPC52xx
+	} else if (strcmp(version, "EFIKA5K2") == 0) {
+		call_prom("interpret", 1, 1,
+			" .\" Adding EFIKA5K2 Ethernet PHY\" cr"
+			" s\" /builtin\" find-device"
+			" new-device"
+				" 1 encode-int s\" #address-cells\" property"
+				" 0 encode-int s\" #size-cells\" property"
+				" s\" mdio\" 2dup device-name device-type"
+				" s\" mpc5200b-fec-phy\" encode-string s\" compatible\" property"
+				" 0xf0003000 0x400 reg"
+				" 0x2 encode-int"
+				" 0x5 encode-int encode+"
+				" 0x3 encode-int encode+"
+				" s\" interrupts\" property"
+				" new-device"
+					" s\" ethernet-phy\" 2dup device-name device-type"
+					" 0x10 encode-int s\" reg\" property"
+					" my-self"
+					" ihandle>phandle"
+				" finish-device"
+			" finish-device"
+			" s\" /builtin/ethernet\" find-device"
+				" encode-int"
+				" s\" phy-handle\" property"
+			" device-end"
+			);
+#endif
 	} else
 		return;
 	_prom->memory = call_prom("open", 1, 1, ADDR("/memory"));

             reply	other threads:[~2008-01-09 14:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-09 14:06 Olaf Hering [this message]
2008-01-09 14:44 ` add phy-handle property for fec_mpc52xx Grant Likely
2008-01-09 14:49   ` Sven Luther
2008-01-09 14:50     ` Grant Likely
2008-01-09 14:58       ` Sven Luther
2008-01-09 15:34         ` Matt Sealey
2008-01-09 15:21     ` Matt Sealey
2008-01-09 15:20       ` Grant Likely
2008-01-09 15:21       ` Sven Luther
2008-01-09 15:10 ` Grant Likely
2008-01-09 15:26 ` Matt Sealey
2008-01-09 15:35   ` Sven Luther
2008-01-09 16:30     ` Matt Sealey
2008-01-09 16:29       ` Sven Luther
2008-01-09 16:36         ` Matt Sealey
2008-01-09 17:05           ` Sven Luther
2008-01-09 17:17             ` Matt Sealey
2008-01-09 17:22               ` Sven Luther
2008-01-09 15:46   ` Grant Likely
2008-01-09 16:35     ` Matt Sealey
2008-01-09 16:44       ` Grant Likely
2008-01-09 15:49   ` David Woodhouse
2008-01-09 16:48     ` Matt Sealey
2008-01-10  2:21     ` Paul Mackerras
2008-01-10  5:04       ` Benjamin Herrenschmidt
2008-01-10  9:14       ` David Woodhouse
2008-01-09 16:02   ` Olof Johansson
2008-01-09 16:26 ` Grant Likely
2008-01-10  2:20 ` Paul Mackerras
2008-01-10 11:47   ` Olaf Hering

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=20080109140608.GA15673@aepfle.de \
    --to=olaf@aepfle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.