From 9a95aaff6745762921c65242509ebd38a80079a3 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Fri, 16 Feb 2007 12:01:29 -0600 Subject: [PATCH] --- yaml --- r: 48852 b: refs/heads/master c: 29cfe6f4fb7d187f65564764a0ecf2caf9d8ed58 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/boot/dts/mpc8313erdb.dts | 62 +++---- trunk/arch/powerpc/boot/dts/mpc8323emds.dts | 119 +++++++------ trunk/arch/powerpc/boot/dts/mpc8349emitx.dts | 60 ++++--- .../arch/powerpc/boot/dts/mpc8349emitxgp.dts | 39 +++-- trunk/arch/powerpc/boot/dts/mpc834x_mds.dts | 164 +++++++++--------- trunk/arch/powerpc/boot/dts/mpc8360emds.dts | 123 +++++++------ trunk/arch/powerpc/kernel/prom_parse.c | 40 +++++ trunk/arch/powerpc/sysdev/fsl_soc.c | 19 +- trunk/include/asm-powerpc/prom.h | 2 + 10 files changed, 352 insertions(+), 278 deletions(-) diff --git a/[refs] b/[refs] index 3a99df8db418..3f4b889f209b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d71a1dc62b0380ab9c4022dcba02775a791c3d7e +refs/heads/master: 29cfe6f4fb7d187f65564764a0ecf2caf9d8ed58 diff --git a/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts b/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts index 6d721900d00e..3d2f5a06df3f 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts @@ -11,7 +11,7 @@ / { model = "MPC8313ERDB"; - compatible = "MPC8313ERDB", "MPC831xRDB", "MPC83xxRDB"; + compatible = "MPC83xx"; #address-cells = <1>; #size-cells = <1>; @@ -59,7 +59,7 @@ compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -68,7 +68,7 @@ compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -77,7 +77,7 @@ compatible = "mpc83xx_spi"; reg = <7000 1000>; interrupts = <10 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; mode = <0>; }; @@ -88,8 +88,8 @@ reg = <23000 1000>; #address-cells = <1>; #size-cells = <0>; - interrupt-parent = < &ipic >; - interrupts = <26 8>; + interrupt-parent = <700>; + interrupts = <26 2>; phy_type = "utmi_wide"; }; @@ -99,15 +99,18 @@ reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - phy1: ethernet-phy@1 { - interrupt-parent = < &ipic >; - interrupts = <13 8>; + linux,phandle = <24520>; + ethernet-phy@1 { + linux,phandle = <2452001>; + interrupt-parent = <700>; + interrupts = <13 2>; reg = <1>; device_type = "ethernet-phy"; }; - phy4: ethernet-phy@4 { - interrupt-parent = < &ipic >; - interrupts = <14 8>; + ethernet-phy@4 { + linux,phandle = <2452004>; + interrupt-parent = <700>; + interrupts = <14 2>; reg = <4>; device_type = "ethernet-phy"; }; @@ -120,8 +123,8 @@ reg = <24000 1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <25 8 24 8 23 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy1 >; + interrupt-parent = <700>; + phy-handle = <2452001>; }; ethernet@25000 { @@ -131,8 +134,8 @@ reg = <25000 1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <22 8 21 8 20 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy4 >; + interrupt-parent = <700>; + phy-handle = <2452004>; }; serial@4500 { @@ -141,7 +144,7 @@ reg = <4500 100>; clock-frequency = <0>; interrupts = <9 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; serial@4600 { @@ -150,7 +153,7 @@ reg = <4600 100>; clock-frequency = <0>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; pci@8500 { @@ -158,17 +161,17 @@ interrupt-map = < /* IDSEL 0x0E -mini PCI */ - 7000 0 0 1 &ipic 12 8 - 7000 0 0 2 &ipic 12 8 - 7000 0 0 3 &ipic 12 8 - 7000 0 0 4 &ipic 12 8 + 7000 0 0 1 700 12 8 + 7000 0 0 2 700 12 8 + 7000 0 0 3 700 12 8 + 7000 0 0 4 700 12 8 /* IDSEL 0x0F - PCI slot */ - 7800 0 0 1 &ipic 11 8 - 7800 0 0 2 &ipic 12 8 - 7800 0 0 3 &ipic 11 8 - 7800 0 0 4 &ipic 12 8>; - interrupt-parent = < &ipic >; + 7800 0 0 1 700 11 8 + 7800 0 0 2 700 12 8 + 7800 0 0 3 700 11 8 + 7800 0 0 4 700 12 8>; + interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <02000000 0 90000000 90000000 0 10000000 @@ -189,7 +192,7 @@ compatible = "talitos"; reg = <30000 7000>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; /* Rev. 2.2 */ num-channels = <1>; channel-fifo-len = <18>; @@ -203,7 +206,8 @@ * sense == 8: Level, low assertion * sense == 2: Edge, high-to-low change */ - ipic: pic@700 { + pic@700 { + linux,phandle = <700>; interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8323emds.dts b/trunk/arch/powerpc/boot/dts/mpc8323emds.dts index 06b310698a02..57a3665f82ed 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8323emds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8323emds.dts @@ -11,14 +11,16 @@ / { model = "MPC8323EMDS"; - compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS"; + compatible = "MPC83xx"; #address-cells = <1>; #size-cells = <1>; + linux,phandle = <100>; cpus { #cpus = <1>; #address-cells = <1>; #size-cells = <0>; + linux,phandle = <200>; PowerPC,8323@0 { device_type = "cpu"; @@ -31,11 +33,13 @@ bus-frequency = <0>; clock-frequency = <0>; 32-bit; + linux,phandle = <201>; }; }; memory { device_type = "memory"; + linux,phandle = <300>; reg = <00000000 08000000>; }; @@ -64,7 +68,7 @@ compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -74,7 +78,7 @@ reg = <4500 100>; clock-frequency = <0>; interrupts = <9 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; serial@4600 { @@ -83,7 +87,7 @@ reg = <4600 100>; clock-frequency = <0>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; crypto@30000 { @@ -92,7 +96,7 @@ compatible = "talitos"; reg = <30000 7000>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; /* Rev. 2.2 */ num-channels = <1>; channel-fifo-len = <18>; @@ -101,50 +105,51 @@ }; pci@8500 { + linux,phandle = <8500>; interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x11 AD17 */ - 8800 0 0 1 &ipic 14 8 - 8800 0 0 2 &ipic 15 8 - 8800 0 0 3 &ipic 16 8 - 8800 0 0 4 &ipic 17 8 + 8800 0 0 1 700 14 8 + 8800 0 0 2 700 15 8 + 8800 0 0 3 700 16 8 + 8800 0 0 4 700 17 8 /* IDSEL 0x12 AD18 */ - 9000 0 0 1 &ipic 16 8 - 9000 0 0 2 &ipic 17 8 - 9000 0 0 3 &ipic 14 8 - 9000 0 0 4 &ipic 15 8 + 9000 0 0 1 700 16 8 + 9000 0 0 2 700 17 8 + 9000 0 0 3 700 14 8 + 9000 0 0 4 700 15 8 /* IDSEL 0x13 AD19 */ - 9800 0 0 1 &ipic 17 8 - 9800 0 0 2 &ipic 14 8 - 9800 0 0 3 &ipic 15 8 - 9800 0 0 4 &ipic 16 8 + 9800 0 0 1 700 17 8 + 9800 0 0 2 700 14 8 + 9800 0 0 3 700 15 8 + 9800 0 0 4 700 16 8 /* IDSEL 0x15 AD21*/ - a800 0 0 1 &ipic 14 8 - a800 0 0 2 &ipic 15 8 - a800 0 0 3 &ipic 16 8 - a800 0 0 4 &ipic 17 8 + a800 0 0 1 700 14 8 + a800 0 0 2 700 15 8 + a800 0 0 3 700 16 8 + a800 0 0 4 700 17 8 /* IDSEL 0x16 AD22*/ - b000 0 0 1 &ipic 17 8 - b000 0 0 2 &ipic 14 8 - b000 0 0 3 &ipic 15 8 - b000 0 0 4 &ipic 16 8 + b000 0 0 1 700 17 8 + b000 0 0 2 700 14 8 + b000 0 0 3 700 15 8 + b000 0 0 4 700 16 8 /* IDSEL 0x17 AD23*/ - b800 0 0 1 &ipic 16 8 - b800 0 0 2 &ipic 17 8 - b800 0 0 3 &ipic 14 8 - b800 0 0 4 &ipic 15 8 + b800 0 0 1 700 16 8 + b800 0 0 2 700 17 8 + b800 0 0 3 700 14 8 + b800 0 0 4 700 15 8 /* IDSEL 0x18 AD24*/ - c000 0 0 1 &ipic 15 8 - c000 0 0 2 &ipic 16 8 - c000 0 0 3 &ipic 17 8 - c000 0 0 4 &ipic 14 8>; - interrupt-parent = < &ipic >; + c000 0 0 1 700 15 8 + c000 0 0 2 700 16 8 + c000 0 0 3 700 17 8 + c000 0 0 4 700 14 8>; + interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <02000000 0 a0000000 90000000 0 10000000 @@ -159,7 +164,8 @@ device_type = "pci"; }; - ipic: pic@700 { + pic@700 { + linux,phandle = <700>; interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; @@ -173,7 +179,8 @@ device_type = "par_io"; num-ports = <7>; - pio3: ucc_pin@03 { + ucc_pin@03 { + linux,phandle = <140003>; pio-map = < /* port pin dir open_drain assignment has_irq */ 3 4 3 0 2 0 /* MDIO */ @@ -196,7 +203,8 @@ 1 c 1 0 1 0 /* TX_EN */ 1 d 2 0 1 0>;/* CRS */ }; - pio4: ucc_pin@04 { + ucc_pin@04 { + linux,phandle = <140004>; pio-map = < /* port pin dir open_drain assignment has_irq */ 3 1f 2 0 1 0 /* RX_CLK (CLK7) */ @@ -243,7 +251,7 @@ compatible = "fsl_spi"; reg = <4c0 40>; interrupts = <2>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mode = "cpu"; }; @@ -252,7 +260,7 @@ compatible = "fsl_spi"; reg = <500 40>; interrupts = <1>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mode = "cpu"; }; @@ -261,7 +269,7 @@ compatible = "qe_udc"; reg = <6c0 40 8B00 100>; interrupts = ; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mode = "slave"; }; @@ -272,12 +280,12 @@ device-id = <3>; reg = <2200 200>; interrupts = <22>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mac-address = [ 00 04 9f 00 23 23 ]; rx-clock = <19>; tx-clock = <1a>; - phy-handle = < &phy3 >; - pio-handle = < &pio3 >; + phy-handle = <212003>; + pio-handle = <140003>; }; ucc@3200 { @@ -287,12 +295,12 @@ device-id = <4>; reg = <3000 200>; interrupts = <23>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mac-address = [ 00 11 22 33 44 55 ]; rx-clock = <17>; tx-clock = <18>; - phy-handle = < &phy4 >; - pio-handle = < &pio4 >; + phy-handle = <212004>; + pio-handle = <140004>; }; mdio@2320 { @@ -302,23 +310,26 @@ device_type = "mdio"; compatible = "ucc_geth_phy"; - phy3: ethernet-phy@03 { - interrupt-parent = < &ipic >; - interrupts = <11 8>; + ethernet-phy@03 { + linux,phandle = <212003>; + interrupt-parent = <700>; + interrupts = <11 2>; reg = <3>; device_type = "ethernet-phy"; interface = <3>; //ENET_100_MII }; - phy4: ethernet-phy@04 { - interrupt-parent = < &ipic >; - interrupts = <12 8>; + ethernet-phy@04 { + linux,phandle = <212004>; + interrupt-parent = <700>; + interrupts = <12 2>; reg = <4>; device_type = "ethernet-phy"; interface = <3>; }; }; - qeic: qeic@80 { + qeic@80 { + linux,phandle = <80>; interrupt-controller; device_type = "qeic"; #address-cells = <0>; @@ -327,7 +338,7 @@ built-in; big-endian; interrupts = <20 8 21 8>; //high:32 low:33 - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; }; }; diff --git a/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts b/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts index 61b550bf1645..27807fc45888 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts @@ -10,7 +10,7 @@ */ / { model = "MPC8349EMITX"; - compatible = "MPC8349EMITX", "MPC834xMITX", "MPC83xxMITX"; + compatible = "MPC834xMITX"; #address-cells = <1>; #size-cells = <1>; @@ -58,7 +58,7 @@ compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -67,7 +67,7 @@ compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -76,7 +76,7 @@ compatible = "mpc83xx_spi"; reg = <7000 1000>; interrupts = <10 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; mode = <0>; }; @@ -86,8 +86,8 @@ reg = <22000 1000>; #address-cells = <1>; #size-cells = <0>; - interrupt-parent = < &ipic >; - interrupts = <27 8>; + interrupt-parent = <700>; + interrupts = <27 2>; phy_type = "ulpi"; port1; }; @@ -98,8 +98,8 @@ reg = <23000 1000>; #address-cells = <1>; #size-cells = <0>; - interrupt-parent = < &ipic >; - interrupts = <26 8>; + interrupt-parent = <700>; + interrupts = <26 2>; phy_type = "ulpi"; }; @@ -109,19 +109,22 @@ reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; + linux,phandle = <24520>; /* Vitesse 8201 */ - phy1c: ethernet-phy@1c { - interrupt-parent = < &ipic >; - interrupts = <12 8>; + ethernet-phy@1c { + linux,phandle = <245201c>; + interrupt-parent = <700>; + interrupts = <12 2>; reg = <1c>; device_type = "ethernet-phy"; }; /* Vitesse 7385 */ - phy1f: ethernet-phy@1f { - interrupt-parent = < &ipic >; - interrupts = <12 8>; + ethernet-phy@1f { + linux,phandle = <245201f>; + interrupt-parent = <700>; + interrupts = <12 2>; reg = <1f>; device_type = "ethernet-phy"; }; @@ -135,8 +138,8 @@ address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <20 8 21 8 22 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy1c >; + interrupt-parent = <700>; + phy-handle = <245201c>; }; ethernet@25000 { @@ -149,8 +152,8 @@ address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <23 8 24 8 25 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy1f >; + interrupt-parent = <700>; + phy-handle = <245201f>; }; serial@4500 { @@ -159,7 +162,7 @@ reg = <4500 100>; clock-frequency = <0>; // from bootloader interrupts = <9 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; serial@4600 { @@ -168,16 +171,16 @@ reg = <4600 100>; clock-frequency = <0>; // from bootloader interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; pci@8500 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x10 - SATA */ - 8000 0 0 1 &ipic 16 8 /* SATA_INTA */ + 8000 0 0 1 700 16 8 /* SATA_INTA */ >; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <42000000 0 80000000 80000000 0 10000000 @@ -196,13 +199,13 @@ interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x0E - MiniPCI Slot */ - 7000 0 0 1 &ipic 15 8 /* PCI_INTA */ + 7000 0 0 1 700 15 8 /* PCI_INTA */ /* IDSEL 0x0F - PCI Slot */ - 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ - 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ + 7800 0 0 1 700 14 8 /* PCI_INTA */ + 7800 0 0 2 700 15 8 /* PCI_INTB */ >; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; interrupts = <43 8>; bus-range = <1 1>; ranges = <42000000 0 a0000000 a0000000 0 10000000 @@ -223,14 +226,15 @@ compatible = "talitos"; reg = <30000 10000>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; num-channels = <4>; channel-fifo-len = <18>; exec-units-mask = <0000007e>; descriptor-types-mask = <01010ebf>; }; - ipic: pic@700 { + pic@700 { + linux,phandle = <700>; interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts index b2e1a5ec3779..3190774de1d8 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts @@ -10,7 +10,7 @@ */ / { model = "MPC8349EMITXGP"; - compatible = "MPC8349EMITXGP", "MPC834xMITX", "MPC83xxMITX"; + compatible = "MPC834xMITXGP"; #address-cells = <1>; #size-cells = <1>; @@ -58,7 +58,7 @@ compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -67,7 +67,7 @@ compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -76,7 +76,7 @@ compatible = "mpc83xx_spi"; reg = <7000 1000>; interrupts = <10 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; mode = <0>; }; @@ -86,8 +86,8 @@ reg = <23000 1000>; #address-cells = <1>; #size-cells = <0>; - interrupt-parent = < &ipic >; - interrupts = <26 8>; + interrupt-parent = <700>; + interrupts = <26 2>; dr_mode = "otg"; phy_type = "ulpi"; }; @@ -98,11 +98,13 @@ reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; + linux,phandle = <24520>; /* Vitesse 8201 */ - phy1c: ethernet-phy@1c { - interrupt-parent = < &ipic >; - interrupts = <12 8>; + ethernet-phy@1c { + linux,phandle = <245201c>; + interrupt-parent = <700>; + interrupts = <12 2>; reg = <1c>; device_type = "ethernet-phy"; }; @@ -115,8 +117,8 @@ reg = <24000 1000>; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <20 8 21 8 22 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy1c >; + interrupt-parent = <700>; + phy-handle = <245201c>; }; serial@4500 { @@ -125,7 +127,7 @@ reg = <4500 100>; clock-frequency = <0>; // from bootloader interrupts = <9 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; serial@4600 { @@ -134,17 +136,17 @@ reg = <4600 100>; clock-frequency = <0>; // from bootloader interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; pci@8600 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x0F - PCI Slot */ - 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ - 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ + 7800 0 0 1 700 14 8 /* PCI_INTA */ + 7800 0 0 2 700 15 8 /* PCI_INTB */ >; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; interrupts = <43 8>; bus-range = <1 1>; ranges = <42000000 0 a0000000 a0000000 0 10000000 @@ -165,14 +167,15 @@ compatible = "talitos"; reg = <30000 10000>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; num-channels = <4>; channel-fifo-len = <18>; exec-units-mask = <0000007e>; descriptor-types-mask = <01010ebf>; }; - ipic: pic@700 { + pic@700 { + linux,phandle = <700>; interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; diff --git a/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts index e4b43c24bc0b..dc121b3cb4a9 100644 --- a/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts @@ -11,7 +11,7 @@ / { model = "MPC8349EMDS"; - compatible = "MPC8349EMDS", "MPC834xMDS", "MPC83xxMDS"; + compatible = "MPC834xMDS"; #address-cells = <1>; #size-cells = <1>; @@ -64,7 +64,7 @@ compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -73,7 +73,7 @@ compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -82,7 +82,7 @@ compatible = "mpc83xx_spi"; reg = <7000 1000>; interrupts = <10 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; mode = <0>; }; @@ -94,8 +94,8 @@ reg = <22000 1000>; #address-cells = <1>; #size-cells = <0>; - interrupt-parent = < &ipic >; - interrupts = <27 8>; + interrupt-parent = <700>; + interrupts = <27 2>; phy_type = "ulpi"; port1; }; @@ -106,8 +106,8 @@ reg = <23000 1000>; #address-cells = <1>; #size-cells = <0>; - interrupt-parent = < &ipic >; - interrupts = <26 8>; + interrupt-parent = <700>; + interrupts = <26 2>; dr_mode = "otg"; phy_type = "ulpi"; }; @@ -118,15 +118,18 @@ reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - phy0: ethernet-phy@0 { - interrupt-parent = < &ipic >; - interrupts = <11 8>; + linux,phandle = <24520>; + ethernet-phy@0 { + linux,phandle = <2452000>; + interrupt-parent = <700>; + interrupts = <11 2>; reg = <0>; device_type = "ethernet-phy"; }; - phy1: ethernet-phy@1 { - interrupt-parent = < &ipic >; - interrupts = <12 8>; + ethernet-phy@1 { + linux,phandle = <2452001>; + interrupt-parent = <700>; + interrupts = <12 2>; reg = <1>; device_type = "ethernet-phy"; }; @@ -140,8 +143,8 @@ address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <20 8 21 8 22 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy0 >; + interrupt-parent = <700>; + phy-handle = <2452000>; }; ethernet@25000 { @@ -154,8 +157,8 @@ address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <23 8 24 8 25 8>; - interrupt-parent = < &ipic >; - phy-handle = < &phy1 >; + interrupt-parent = <700>; + phy-handle = <2452001>; }; serial@4500 { @@ -164,7 +167,7 @@ reg = <4500 100>; clock-frequency = <0>; interrupts = <9 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; serial@4600 { @@ -173,7 +176,7 @@ reg = <4600 100>; clock-frequency = <0>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; pci@8500 { @@ -181,47 +184,47 @@ interrupt-map = < /* IDSEL 0x11 */ - 8800 0 0 1 &ipic 14 8 - 8800 0 0 2 &ipic 15 8 - 8800 0 0 3 &ipic 16 8 - 8800 0 0 4 &ipic 17 8 + 8800 0 0 1 700 14 8 + 8800 0 0 2 700 15 8 + 8800 0 0 3 700 16 8 + 8800 0 0 4 700 17 8 /* IDSEL 0x12 */ - 9000 0 0 1 &ipic 16 8 - 9000 0 0 2 &ipic 17 8 - 9000 0 0 3 &ipic 14 8 - 9000 0 0 4 &ipic 15 8 + 9000 0 0 1 700 16 8 + 9000 0 0 2 700 17 8 + 9000 0 0 3 700 14 8 + 9000 0 0 4 700 15 8 /* IDSEL 0x13 */ - 9800 0 0 1 &ipic 17 8 - 9800 0 0 2 &ipic 14 8 - 9800 0 0 3 &ipic 15 8 - 9800 0 0 4 &ipic 16 8 + 9800 0 0 1 700 17 8 + 9800 0 0 2 700 14 8 + 9800 0 0 3 700 15 8 + 9800 0 0 4 700 16 8 /* IDSEL 0x15 */ - a800 0 0 1 &ipic 14 8 - a800 0 0 2 &ipic 15 8 - a800 0 0 3 &ipic 16 8 - a800 0 0 4 &ipic 17 8 + a800 0 0 1 700 14 8 + a800 0 0 2 700 15 8 + a800 0 0 3 700 16 8 + a800 0 0 4 700 17 8 /* IDSEL 0x16 */ - b000 0 0 1 &ipic 17 8 - b000 0 0 2 &ipic 14 8 - b000 0 0 3 &ipic 15 8 - b000 0 0 4 &ipic 16 8 + b000 0 0 1 700 17 8 + b000 0 0 2 700 14 8 + b000 0 0 3 700 15 8 + b000 0 0 4 700 16 8 /* IDSEL 0x17 */ - b800 0 0 1 &ipic 16 8 - b800 0 0 2 &ipic 17 8 - b800 0 0 3 &ipic 14 8 - b800 0 0 4 &ipic 15 8 + b800 0 0 1 700 16 8 + b800 0 0 2 700 17 8 + b800 0 0 3 700 14 8 + b800 0 0 4 700 15 8 /* IDSEL 0x18 */ - c000 0 0 1 &ipic 15 8 - c000 0 0 2 &ipic 16 8 - c000 0 0 3 &ipic 17 8 - c000 0 0 4 &ipic 14 8>; - interrupt-parent = < &ipic >; + c000 0 0 1 700 15 8 + c000 0 0 2 700 16 8 + c000 0 0 3 700 17 8 + c000 0 0 4 700 14 8>; + interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <02000000 0 a0000000 a0000000 0 10000000 @@ -241,47 +244,47 @@ interrupt-map = < /* IDSEL 0x11 */ - 8800 0 0 1 &ipic 14 8 - 8800 0 0 2 &ipic 15 8 - 8800 0 0 3 &ipic 16 8 - 8800 0 0 4 &ipic 17 8 + 8800 0 0 1 700 14 8 + 8800 0 0 2 700 15 8 + 8800 0 0 3 700 16 8 + 8800 0 0 4 700 17 8 /* IDSEL 0x12 */ - 9000 0 0 1 &ipic 16 8 - 9000 0 0 2 &ipic 17 8 - 9000 0 0 3 &ipic 14 8 - 9000 0 0 4 &ipic 15 8 + 9000 0 0 1 700 16 8 + 9000 0 0 2 700 17 8 + 9000 0 0 3 700 14 8 + 9000 0 0 4 700 15 8 /* IDSEL 0x13 */ - 9800 0 0 1 &ipic 17 8 - 9800 0 0 2 &ipic 14 8 - 9800 0 0 3 &ipic 15 8 - 9800 0 0 4 &ipic 16 8 + 9800 0 0 1 700 17 8 + 9800 0 0 2 700 14 8 + 9800 0 0 3 700 15 8 + 9800 0 0 4 700 16 8 /* IDSEL 0x15 */ - a800 0 0 1 &ipic 14 8 - a800 0 0 2 &ipic 15 8 - a800 0 0 3 &ipic 16 8 - a800 0 0 4 &ipic 17 8 + a800 0 0 1 700 14 8 + a800 0 0 2 700 15 8 + a800 0 0 3 700 16 8 + a800 0 0 4 700 17 8 /* IDSEL 0x16 */ - b000 0 0 1 &ipic 17 8 - b000 0 0 2 &ipic 14 8 - b000 0 0 3 &ipic 15 8 - b000 0 0 4 &ipic 16 8 + b000 0 0 1 700 17 8 + b000 0 0 2 700 14 8 + b000 0 0 3 700 15 8 + b000 0 0 4 700 16 8 /* IDSEL 0x17 */ - b800 0 0 1 &ipic 16 8 - b800 0 0 2 &ipic 17 8 - b800 0 0 3 &ipic 14 8 - b800 0 0 4 &ipic 15 8 + b800 0 0 1 700 16 8 + b800 0 0 2 700 17 8 + b800 0 0 3 700 14 8 + b800 0 0 4 700 15 8 /* IDSEL 0x18 */ - c000 0 0 1 &ipic 15 8 - c000 0 0 2 &ipic 16 8 - c000 0 0 3 &ipic 17 8 - c000 0 0 4 &ipic 14 8>; - interrupt-parent = < &ipic >; + c000 0 0 1 700 15 8 + c000 0 0 2 700 16 8 + c000 0 0 3 700 17 8 + c000 0 0 4 700 14 8>; + interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <02000000 0 b0000000 b0000000 0 10000000 @@ -303,7 +306,7 @@ compatible = "talitos"; reg = <30000 10000>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; num-channels = <4>; channel-fifo-len = <18>; exec-units-mask = <0000007e>; @@ -318,7 +321,8 @@ * sense == 8: Level, low assertion * sense == 2: Edge, high-to-low change */ - ipic: pic@700 { + pic@700 { + linux,phandle = <700>; interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8360emds.dts b/trunk/arch/powerpc/boot/dts/mpc8360emds.dts index 4fe45c021848..303bd668deb7 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8360emds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8360emds.dts @@ -15,15 +15,17 @@ */ / { - model = "MPC8360MDS"; - compatible = "MPC8360EMDS", "MPC836xMDS", "MPC83xxMDS"; + model = "MPC8360EPB"; + compatible = "MPC83xx"; #address-cells = <1>; #size-cells = <1>; + linux,phandle = <100>; cpus { #cpus = <1>; #address-cells = <1>; #size-cells = <0>; + linux,phandle = <200>; PowerPC,8360@0 { device_type = "cpu"; @@ -36,11 +38,13 @@ bus-frequency = ; clock-frequency = <1F78A400>; 32-bit; + linux,phandle = <201>; }; }; memory { device_type = "memory"; + linux,phandle = <300>; reg = <00000000 10000000>; }; @@ -69,7 +73,7 @@ compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -78,7 +82,7 @@ compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; dfsrr; }; @@ -88,7 +92,7 @@ reg = <4500 100>; clock-frequency = ; interrupts = <9 8>; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; serial@4600 { @@ -97,7 +101,7 @@ reg = <4600 100>; clock-frequency = ; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; crypto@30000 { @@ -106,7 +110,7 @@ compatible = "talitos"; reg = <30000 10000>; interrupts = ; - interrupt-parent = < &ipic >; + interrupt-parent = <700>; num-channels = <4>; channel-fifo-len = <18>; exec-units-mask = <0000007e>; @@ -115,51 +119,52 @@ }; pci@8500 { + linux,phandle = <8500>; interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x11 AD17 */ - 8800 0 0 1 &ipic 14 8 - 8800 0 0 2 &ipic 15 8 - 8800 0 0 3 &ipic 16 8 - 8800 0 0 4 &ipic 17 8 + 8800 0 0 1 700 14 8 + 8800 0 0 2 700 15 8 + 8800 0 0 3 700 16 8 + 8800 0 0 4 700 17 8 /* IDSEL 0x12 AD18 */ - 9000 0 0 1 &ipic 16 8 - 9000 0 0 2 &ipic 17 8 - 9000 0 0 3 &ipic 14 8 - 9000 0 0 4 &ipic 15 8 + 9000 0 0 1 700 16 8 + 9000 0 0 2 700 17 8 + 9000 0 0 3 700 14 8 + 9000 0 0 4 700 15 8 /* IDSEL 0x13 AD19 */ - 9800 0 0 1 &ipic 17 8 - 9800 0 0 2 &ipic 14 8 - 9800 0 0 3 &ipic 15 8 - 9800 0 0 4 &ipic 16 8 + 9800 0 0 1 700 17 8 + 9800 0 0 2 700 14 8 + 9800 0 0 3 700 15 8 + 9800 0 0 4 700 16 8 /* IDSEL 0x15 AD21*/ - a800 0 0 1 &ipic 14 8 - a800 0 0 2 &ipic 15 8 - a800 0 0 3 &ipic 16 8 - a800 0 0 4 &ipic 17 8 + a800 0 0 1 700 14 8 + a800 0 0 2 700 15 8 + a800 0 0 3 700 16 8 + a800 0 0 4 700 17 8 /* IDSEL 0x16 AD22*/ - b000 0 0 1 &ipic 17 8 - b000 0 0 2 &ipic 14 8 - b000 0 0 3 &ipic 15 8 - b000 0 0 4 &ipic 16 8 + b000 0 0 1 700 17 8 + b000 0 0 2 700 14 8 + b000 0 0 3 700 15 8 + b000 0 0 4 700 16 8 /* IDSEL 0x17 AD23*/ - b800 0 0 1 &ipic 16 8 - b800 0 0 2 &ipic 17 8 - b800 0 0 3 &ipic 14 8 - b800 0 0 4 &ipic 15 8 + b800 0 0 1 700 16 8 + b800 0 0 2 700 17 8 + b800 0 0 3 700 14 8 + b800 0 0 4 700 15 8 /* IDSEL 0x18 AD24*/ - c000 0 0 1 &ipic 15 8 - c000 0 0 2 &ipic 16 8 - c000 0 0 3 &ipic 17 8 - c000 0 0 4 &ipic 14 8>; - interrupt-parent = < &ipic >; + c000 0 0 1 700 15 8 + c000 0 0 2 700 16 8 + c000 0 0 3 700 17 8 + c000 0 0 4 700 14 8>; + interrupt-parent = <700>; interrupts = <42 8>; bus-range = <0 0>; ranges = <02000000 0 a0000000 a0000000 0 10000000 @@ -174,7 +179,8 @@ device_type = "pci"; }; - ipic: pic@700 { + pic@700 { + linux,phandle = <700>; interrupt-controller; #address-cells = <0>; #interrupt-cells = <2>; @@ -188,7 +194,8 @@ device_type = "par_io"; num-ports = <7>; - pio1: ucc_pin@01 { + ucc_pin@01 { + linux,phandle = <140001>; pio-map = < /* port pin dir open_drain assignment has_irq */ 0 3 1 0 1 0 /* TxD0 */ @@ -215,7 +222,8 @@ 2 9 1 0 3 0 /* GTX_CLK - CLK10 */ 2 8 2 0 1 0>; /* GTX125 - CLK9 */ }; - pio2: ucc_pin@02 { + ucc_pin@02 { + linux,phandle = <140002>; pio-map = < /* port pin dir open_drain assignment has_irq */ 0 11 1 0 1 0 /* TxD0 */ @@ -272,7 +280,7 @@ compatible = "fsl_spi"; reg = <4c0 40>; interrupts = <2>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mode = "cpu"; }; @@ -281,7 +289,7 @@ compatible = "fsl_spi"; reg = <500 40>; interrupts = <1>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mode = "cpu"; }; @@ -290,7 +298,7 @@ compatible = "qe_udc"; reg = <6c0 40 8B00 100>; interrupts = ; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mode = "slave"; }; @@ -301,12 +309,12 @@ device-id = <1>; reg = <2000 200>; interrupts = <20>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mac-address = [ 00 04 9f 00 23 23 ]; rx-clock = <0>; tx-clock = <19>; - phy-handle = < &phy0 >; - pio-handle = < &pio1 >; + phy-handle = <212000>; + pio-handle = <140001>; }; ucc@3000 { @@ -316,12 +324,12 @@ device-id = <2>; reg = <3000 200>; interrupts = <21>; - interrupt-parent = < &qeic >; + interrupt-parent = <80>; mac-address = [ 00 11 22 33 44 55 ]; rx-clock = <0>; tx-clock = <14>; - phy-handle = < &phy1 >; - pio-handle = < &pio2 >; + phy-handle = <212001>; + pio-handle = <140002>; }; mdio@2120 { @@ -331,23 +339,26 @@ device_type = "mdio"; compatible = "ucc_geth_phy"; - phy0: ethernet-phy@00 { - interrupt-parent = < &ipic >; - interrupts = <11 8>; + ethernet-phy@00 { + linux,phandle = <212000>; + interrupt-parent = <700>; + interrupts = <11 2>; reg = <0>; device_type = "ethernet-phy"; interface = <6>; //ENET_1000_GMII }; - phy1: ethernet-phy@01 { - interrupt-parent = < &ipic >; - interrupts = <12 8>; + ethernet-phy@01 { + linux,phandle = <212001>; + interrupt-parent = <700>; + interrupts = <12 2>; reg = <1>; device_type = "ethernet-phy"; interface = <6>; }; }; - qeic: qeic@80 { + qeic@80 { + linux,phandle = <80>; interrupt-controller; device_type = "qeic"; #address-cells = <0>; @@ -356,7 +367,7 @@ built-in; big-endian; interrupts = <20 8 21 8>; //high:32 low:33 - interrupt-parent = < &ipic >; + interrupt-parent = <700>; }; }; diff --git a/trunk/arch/powerpc/kernel/prom_parse.c b/trunk/arch/powerpc/kernel/prom_parse.c index 12c51e4ad2b4..ea6fd552c7ea 100644 --- a/trunk/arch/powerpc/kernel/prom_parse.c +++ b/trunk/arch/powerpc/kernel/prom_parse.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -1003,3 +1004,42 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq return res; } EXPORT_SYMBOL_GPL(of_irq_map_one); + +/** + * Search the device tree for the best MAC address to use. 'mac-address' is + * checked first, because that is supposed to contain to "most recent" MAC + * address. If that isn't set, then 'local-mac-address' is checked next, + * because that is the default address. If that isn't set, then the obsolete + * 'address' is checked, just in case we're using an old device tree. + * + * Note that the 'address' property is supposed to contain a virtual address of + * the register set, but some DTS files have redefined that property to be the + * MAC address. + * + * All-zero MAC addresses are rejected, because those could be properties that + * exist in the device tree, but were not set by U-Boot. For example, the + * DTS could define 'mac-address' and 'local-mac-address', with zero MAC + * addresses. Some older U-Boots only initialized 'local-mac-address'. In + * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists + * but is all zeros. +*/ +const void *of_get_mac_address(struct device_node *np) +{ + struct property *pp; + + pp = of_find_property(np, "mac-address", NULL); + if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) + return pp->value; + + pp = of_find_property(np, "local-mac-address", NULL); + if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) + return pp->value; + + pp = of_find_property(np, "address", NULL); + if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value)) + return pp->value; + + return NULL; +} +EXPORT_SYMBOL(of_get_mac_address); + diff --git a/trunk/arch/powerpc/sysdev/fsl_soc.c b/trunk/arch/powerpc/sysdev/fsl_soc.c index 34161bc5a02f..d20f02927f72 100644 --- a/trunk/arch/powerpc/sysdev/fsl_soc.c +++ b/trunk/arch/powerpc/sysdev/fsl_soc.c @@ -233,14 +233,7 @@ static int __init gfar_of_init(void) goto err; } - mac_addr = get_property(np, "local-mac-address", NULL); - if (mac_addr == NULL) - mac_addr = get_property(np, "mac-address", NULL); - if (mac_addr == NULL) { - /* Obsolete */ - mac_addr = get_property(np, "address", NULL); - } - + mac_addr = of_get_mac_address(np); if (mac_addr) memcpy(gfar_data.mac_addr, mac_addr, 6); @@ -646,8 +639,9 @@ static int __init fs_enet_of_init(void) goto unreg; } - mac_addr = get_property(np, "mac-address", NULL); - memcpy(fs_enet_data.macaddr, mac_addr, 6); + mac_addr = of_get_mac_address(np); + if (mac_addr) + memcpy(fs_enet_data.macaddr, mac_addr, 6); ph = get_property(np, "phy-handle", NULL); phy = of_find_node_by_phandle(*ph); @@ -931,8 +925,9 @@ static int __init fs_enet_of_init(void) goto err; r[0].name = enet_regs; - mac_addr = (void *)get_property(np, "mac-address", NULL); - memcpy(fs_enet_data.macaddr, mac_addr, 6); + mac_addr = of_get_mac_address(np); + if (mac_addr) + memcpy(fs_enet_data.macaddr, mac_addr, 6); ph = (phandle *) get_property(np, "phy-handle", NULL); if (ph != NULL) diff --git a/trunk/include/asm-powerpc/prom.h b/trunk/include/asm-powerpc/prom.h index 0afee17f33b4..020ed015a94b 100644 --- a/trunk/include/asm-powerpc/prom.h +++ b/trunk/include/asm-powerpc/prom.h @@ -255,6 +255,8 @@ extern void kdump_move_device_tree(void); /* CPU OF node matching */ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); +/* Get the MAC address */ +extern const void *of_get_mac_address(struct device_node *np); /* * OF interrupt mapping