aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2008-01-09 09:06:08 -0500
committerGrant Likely <grant.likely@secretlab.ca>2008-01-10 10:12:59 -0500
commit6f4347c969674ed45de7d08d4b26d6326a95b959 (patch)
tree3f226186a9651a3ae49f1c186f38c22d4ef93517 /arch/powerpc/kernel
parentfd0b45dfd1858c6b49d06355a460bcf36d654c06 (diff)
[POWERPC] efika: add phy-handle property for fec_mpc52xx
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). Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/prom_init.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 1add6efdb315..5d89a21dd0d6 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2216,6 +2216,45 @@ static void __init fixup_device_tree_efika(void)
2216 prom_printf("fixup_device_tree_efika: ", 2216 prom_printf("fixup_device_tree_efika: ",
2217 "skipped entry %x - setprop error\n", i); 2217 "skipped entry %x - setprop error\n", i);
2218 } 2218 }
2219
2220 /* Make sure ethernet mdio bus node exists */
2221 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
2222 if (!PHANDLE_VALID(node)) {
2223 prom_printf("Adding Ethernet MDIO node\n");
2224 call_prom("interpret", 1, 1,
2225 " s\" /builtin\" find-device"
2226 " new-device"
2227 " 1 encode-int s\" #address-cells\" property"
2228 " 0 encode-int s\" #size-cells\" property"
2229 " s\" mdio\" 2dup device-name device-type"
2230 " s\" mpc5200b-fec-phy\" encode-string"
2231 " s\" compatible\" property"
2232 " 0xf0003000 0x400 reg"
2233 " 0x2 encode-int"
2234 " 0x5 encode-int encode+"
2235 " 0x3 encode-int encode+"
2236 " s\" interrupts\" property"
2237 " finish-device");
2238 };
2239
2240 /* Make sure ethernet phy device node exist */
2241 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy"));
2242 if (!PHANDLE_VALID(node)) {
2243 prom_printf("Adding Ethernet PHY node\n");
2244 call_prom("interpret", 1, 1,
2245 " s\" /builtin/mdio\" find-device"
2246 " new-device"
2247 " s\" ethernet-phy\" device-name"
2248 " 0x10 encode-int s\" reg\" property"
2249 " my-self"
2250 " ihandle>phandle"
2251 " finish-device"
2252 " s\" /builtin/ethernet\" find-device"
2253 " encode-int"
2254 " s\" phy-handle\" property"
2255 " device-end");
2256 }
2257
2219} 2258}
2220#else 2259#else
2221#define fixup_device_tree_efika() 2260#define fixup_device_tree_efika()