diff --git a/[refs] b/[refs] index a36caf88a5f0..d6b8bb23b600 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ffd84881711a4cc98018cd540167c1ba2212bc0d +refs/heads/master: 975b89399679dcf8587288d46d3f21d4286af167 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/mpc832x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc8323emds.dts similarity index 78% rename from trunk/arch/powerpc/boot/dts/mpc832x_mds.dts rename to trunk/arch/powerpc/boot/dts/mpc8323emds.dts index 06b310698a02..57a3665f82ed 100644 --- a/trunk/arch/powerpc/boot/dts/mpc832x_mds.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/mpc836x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc8360emds.dts similarity index 79% rename from trunk/arch/powerpc/boot/dts/mpc836x_mds.dts rename to trunk/arch/powerpc/boot/dts/mpc8360emds.dts index 4fe45c021848..303bd668deb7 100644 --- a/trunk/arch/powerpc/boot/dts/mpc836x_mds.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/configs/mpc832x_mds_defconfig b/trunk/arch/powerpc/configs/mpc832xemds_defconfig similarity index 100% rename from trunk/arch/powerpc/configs/mpc832x_mds_defconfig rename to trunk/arch/powerpc/configs/mpc832xemds_defconfig diff --git a/trunk/arch/powerpc/configs/mpc836x_mds_defconfig b/trunk/arch/powerpc/configs/mpc8360emds_defconfig similarity index 97% rename from trunk/arch/powerpc/configs/mpc836x_mds_defconfig rename to trunk/arch/powerpc/configs/mpc8360emds_defconfig index 8eb475cd0df0..bbe38ccc3d86 100644 --- a/trunk/arch/powerpc/configs/mpc836x_mds_defconfig +++ b/trunk/arch/powerpc/configs/mpc8360emds_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.20 -# Sat Feb 17 10:09:26 2007 +# Linux kernel version: 2.6.20-rc5 +# Fri Jan 26 00:19:45 2007 # # CONFIG_PPC64 is not set CONFIG_PPC32=y @@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y CONFIG_PPC_83xx=y # CONFIG_PPC_85xx is not set # CONFIG_PPC_86xx is not set -# CONFIG_PPC_8xx is not set # CONFIG_40x is not set # CONFIG_44x is not set +# CONFIG_8xx is not set # CONFIG_E200 is not set CONFIG_6xx=y CONFIG_83xx=y @@ -63,7 +63,6 @@ CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_IPC_NS is not set -CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set @@ -130,11 +129,10 @@ CONFIG_PPC_GEN550=y # # Platform support # -# CONFIG_MPC8313_RDB is not set # CONFIG_MPC832x_MDS is not set -# CONFIG_MPC834x_MDS is not set +# CONFIG_MPC834x_SYS is not set # CONFIG_MPC834x_ITX is not set -CONFIG_MPC836x_MDS=y +CONFIG_MPC8360E_PB=y CONFIG_PPC_MPC836x=y # CONFIG_MPIC is not set @@ -164,7 +162,6 @@ CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 CONFIG_PROC_DEVICETREE=y # CONFIG_CMDLINE_BOOL is not set # CONFIG_PM is not set @@ -174,7 +171,6 @@ CONFIG_ISA_DMA_API=y # # Bus options # -CONFIG_ZONE_DMA=y CONFIG_GENERIC_ISA_DMA=y # CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set @@ -223,7 +219,6 @@ CONFIG_UNIX=y CONFIG_XFRM=y # CONFIG_XFRM_USER is not set # CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y @@ -533,7 +528,6 @@ CONFIG_UCC_GETH=y # Ethernet (10000 Mbit) # # CONFIG_CHELSIO_T1 is not set -# CONFIG_CHELSIO_T3 is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set @@ -626,7 +620,6 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set -# CONFIG_SERIAL_OF_PLATFORM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -697,7 +690,6 @@ CONFIG_I2C_MPC=y # CONFIG_I2C_NFORCE2 is not set # CONFIG_I2C_OCORES is not set # CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PASEMI is not set # CONFIG_I2C_PROSAVAGE is not set # CONFIG_I2C_SAVAGE4 is not set # CONFIG_I2C_SIS5595 is not set @@ -812,7 +804,6 @@ CONFIG_FIRMWARE_EDID=y # HID Devices # CONFIG_HID=y -# CONFIG_HID_DEBUG is not set # # USB support @@ -876,10 +867,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y # DMA Devices # -# -# Auxiliary Display support -# - # # Virtualization # @@ -1024,8 +1011,7 @@ CONFIG_BITREVERSE=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y +CONFIG_IOMAP_COPY=y # # Instrumentation Support @@ -1074,10 +1060,8 @@ CONFIG_CRYPTO_MD5=y # CONFIG_CRYPTO_GF128MUL is not set CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_LRW is not set CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_SERPENT is not set @@ -1091,7 +1075,6 @@ CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set # diff --git a/trunk/arch/powerpc/platforms/83xx/Kconfig b/trunk/arch/powerpc/platforms/83xx/Kconfig index 713b31a16ce9..1aea1e69ff31 100644 --- a/trunk/arch/powerpc/platforms/83xx/Kconfig +++ b/trunk/arch/powerpc/platforms/83xx/Kconfig @@ -38,12 +38,12 @@ config MPC834x_ITX Be aware that PCI initialization is the bootloader's responsibility. -config MPC836x_MDS - bool "Freescale MPC836x MDS" +config MPC8360E_PB + bool "Freescale MPC8360E PB" select DEFAULT_UIMAGE select QUICC_ENGINE help - This option enables support for the MPC836x MDS Processor Board. + This option enables support for the MPC836x EMDS Processor Board. endchoice @@ -69,6 +69,6 @@ config PPC_MPC836x bool select PPC_UDBG_16550 select PPC_INDIRECT_PCI - default y if MPC836x_MDS + default y if MPC8360E_PB endmenu diff --git a/trunk/arch/powerpc/platforms/83xx/Makefile b/trunk/arch/powerpc/platforms/83xx/Makefile index dfc970d0df10..6c8199c4c382 100644 --- a/trunk/arch/powerpc/platforms/83xx/Makefile +++ b/trunk/arch/powerpc/platforms/83xx/Makefile @@ -6,5 +6,5 @@ obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o -obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o +obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o diff --git a/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c index 32e9e9492841..c3b98c34eb6b 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c @@ -74,9 +74,16 @@ void __init mpc8313_rdb_init_IRQ(void) */ static int __init mpc8313_rdb_probe(void) { - unsigned long root = of_get_flat_dt_root(); + char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), + "model", NULL); + if (model == NULL) + return 0; + if (strcmp(model, "MPC8313ERDB")) + return 0; - return of_flat_dt_is_compatible(root, "MPC8313ERDB"); + DBG("MPC8313 RDB found\n"); + + return 1; } define_machine(mpc8313_rdb) { diff --git a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c index 17e3a3c6d8b4..3ecb55f8a6e2 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c @@ -57,6 +57,11 @@ unsigned long isa_mem_base = 0; static u8 *bcsr_regs = NULL; +u8 *get_bcsr(void) +{ + return bcsr_regs; +} + /* ************************************************************************ * * Setup the architecture @@ -69,6 +74,17 @@ static void __init mpc832x_sys_setup_arch(void) if (ppc_md.progress) ppc_md.progress("mpc832x_sys_setup_arch()", 0); + np = of_find_node_by_type(NULL, "cpu"); + if (np != 0) { + unsigned int *fp = + (int *)get_property(np, "clock-frequency", NULL); + if (fp != 0) + loops_per_jiffy = *fp / HZ; + else + loops_per_jiffy = 50000000 / HZ; + of_node_put(np); + } + /* Map BCSR area */ np = of_find_node_by_name(NULL, "bcsr"); if (np != 0) { @@ -105,23 +121,34 @@ static void __init mpc832x_sys_setup_arch(void) iounmap(bcsr_regs); of_node_put(np); } + #endif /* CONFIG_QUICC_ENGINE */ -} -static struct of_device_id mpc832x_ids[] = { - { .type = "soc", }, - { .compatible = "soc", }, - { .type = "qe", }, - {}, -}; +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_HDA1; +#endif +} static int __init mpc832x_declare_of_platform_devices(void) { - if (!machine_is(mpc832x_mds)) - return 0; + struct device_node *np; - /* Publish the QE devices */ - of_platform_bus_probe(NULL, mpc832x_ids, NULL); + for (np = NULL; (np = of_find_compatible_node(np, "network", + "ucc_geth")) != NULL;) { + int ucc_num; + char bus_id[BUS_ID_SIZE]; + + ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; + snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); + of_platform_device_create(np, bus_id, NULL); + } return 0; } @@ -129,6 +156,7 @@ device_initcall(mpc832x_declare_of_platform_devices); static void __init mpc832x_sys_init_IRQ(void) { + struct device_node *np; np = of_find_node_by_type(NULL, "ipic"); @@ -161,9 +189,6 @@ static int __init mpc832x_rtc_hookup(void) { struct timespec tv; - if (!machine_is(mpc832x_mds)) - return 0; - ppc_md.get_rtc_time = ds1374_get_rtc_time; ppc_md.set_rtc_time = ds1374_set_rtc_time; @@ -182,9 +207,17 @@ late_initcall(mpc832x_rtc_hookup); */ static int __init mpc832x_sys_probe(void) { - unsigned long root = of_get_flat_dt_root(); + char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), + "model", NULL); + + if (model == NULL) + return 0; + if (strcmp(model, "MPC8323EMDS")) + return 0; + + DBG("%s found\n", model); - return of_flat_dt_is_compatible(root, "MPC832xMDS"); + return 1; } define_machine(mpc832x_mds) { diff --git a/trunk/arch/powerpc/platforms/83xx/mpc834x_itx.c b/trunk/arch/powerpc/platforms/83xx/mpc834x_itx.c index 3c009f6d4a4f..443a3172f370 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc834x_itx.c @@ -55,12 +55,28 @@ static void __init mpc834x_itx_setup_arch(void) if (ppc_md.progress) ppc_md.progress("mpc834x_itx_setup_arch()", 0); + np = of_find_node_by_type(NULL, "cpu"); + if (np != 0) { + const unsigned int *fp = + get_property(np, "clock-frequency", NULL); + if (fp != 0) + loops_per_jiffy = *fp / HZ; + else + loops_per_jiffy = 50000000 / HZ; + of_node_put(np); + } #ifdef CONFIG_PCI for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) add_bridge(np); ppc_md.pci_exclude_device = mpc83xx_exclude_device; #endif + +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_HDA1; +#endif } static void __init mpc834x_itx_init_IRQ(void) @@ -84,9 +100,10 @@ static void __init mpc834x_itx_init_IRQ(void) */ static int __init mpc834x_itx_probe(void) { - unsigned long root = of_get_flat_dt_root(); - - return of_flat_dt_is_compatible(root, "MPC834xMITX"); + /* We always match for now, eventually we should look at the flat + dev tree to ensure this is the board we are suppose to run on + */ + return 1; } define_machine(mpc834x_itx) { diff --git a/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c index e5d819166874..d2736da76c46 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -125,6 +125,17 @@ static void __init mpc834x_mds_setup_arch(void) if (ppc_md.progress) ppc_md.progress("mpc834x_mds_setup_arch()", 0); + np = of_find_node_by_type(NULL, "cpu"); + if (np != 0) { + const unsigned int *fp = + get_property(np, "clock-frequency", NULL); + if (fp != 0) + loops_per_jiffy = *fp / HZ; + else + loops_per_jiffy = 50000000 / HZ; + of_node_put(np); + } + #ifdef CONFIG_PCI for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) add_bridge(np); @@ -133,6 +144,12 @@ static void __init mpc834x_mds_setup_arch(void) #endif mpc834x_usb_cfg(); + +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_HDA1; +#endif } static void __init mpc834x_mds_init_IRQ(void) @@ -159,9 +176,6 @@ static int __init mpc834x_rtc_hookup(void) { struct timespec tv; - if (!machine_is(mpc834x_mds)) - return 0; - ppc_md.get_rtc_time = ds1374_get_rtc_time; ppc_md.set_rtc_time = ds1374_set_rtc_time; @@ -180,9 +194,10 @@ late_initcall(mpc834x_rtc_hookup); */ static int __init mpc834x_mds_probe(void) { - unsigned long root = of_get_flat_dt_root(); - - return of_flat_dt_is_compatible(root, "MPC834xMDS"); + /* We always match for now, eventually we should look at the flat + dev tree to ensure this is the board we are suppose to run on + */ + return 1; } define_machine(mpc834x_mds) { diff --git a/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc8360e_pb.c similarity index 67% rename from trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c rename to trunk/arch/powerpc/platforms/83xx/mpc8360e_pb.c index 526ed090a446..ccce2f9f283d 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc8360e_pb.c @@ -5,12 +5,12 @@ * Yin Olivia * * Description: - * MPC8360E MDS board specific routines. + * MPC8360E MDS PB board specific routines. * * Changelog: * Jun 21, 2006 Initial version * - * This program is free software; you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. @@ -62,17 +62,33 @@ unsigned long isa_mem_base = 0; static u8 *bcsr_regs = NULL; +u8 *get_bcsr(void) +{ + return bcsr_regs; +} + /* ************************************************************************ * * Setup the architecture * */ -static void __init mpc836x_mds_setup_arch(void) +static void __init mpc8360_sys_setup_arch(void) { struct device_node *np; if (ppc_md.progress) - ppc_md.progress("mpc836x_mds_setup_arch()", 0); + ppc_md.progress("mpc8360_sys_setup_arch()", 0); + + np = of_find_node_by_type(NULL, "cpu"); + if (np != 0) { + const unsigned int *fp = + get_property(np, "clock-frequency", NULL); + if (fp != 0) + loops_per_jiffy = *fp / HZ; + else + loops_per_jiffy = 50000000 / HZ; + of_node_put(np); + } /* Map BCSR area */ np = of_find_node_by_name(NULL, "bcsr"); @@ -112,29 +128,40 @@ static void __init mpc836x_mds_setup_arch(void) } #endif /* CONFIG_QUICC_ENGINE */ -} -static struct of_device_id mpc836x_ids[] = { - { .type = "soc", }, - { .compatible = "soc", }, - { .type = "qe", }, - {}, -}; +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = Root_RAM0; + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = Root_NFS; +#else + ROOT_DEV = Root_HDA1; +#endif +} -static int __init mpc836x_declare_of_platform_devices(void) +static int __init mpc8360_declare_of_platform_devices(void) { - if (!machine_is(mpc836x_mds)) - return 0; + struct device_node *np; - /* Publish the QE devices */ - of_platform_bus_probe(NULL, mpc836x_ids, NULL); + for (np = NULL; (np = of_find_compatible_node(np, "network", + "ucc_geth")) != NULL;) { + int ucc_num; + char bus_id[BUS_ID_SIZE]; + + ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; + snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); + of_platform_device_create(np, bus_id, NULL); + } return 0; } -device_initcall(mpc836x_declare_of_platform_devices); +device_initcall(mpc8360_declare_of_platform_devices); -static void __init mpc836x_mds_init_IRQ(void) +static void __init mpc8360_sys_init_IRQ(void) { + struct device_node *np; np = of_find_node_by_type(NULL, "ipic"); @@ -167,9 +194,6 @@ static int __init mpc8360_rtc_hookup(void) { struct timespec tv; - if (!machine_is(mpc836x_mds)) - return 0; - ppc_md.get_rtc_time = ds1374_get_rtc_time; ppc_md.set_rtc_time = ds1374_set_rtc_time; @@ -186,21 +210,28 @@ late_initcall(mpc8360_rtc_hookup); /* * Called very early, MMU is off, device-tree isn't unflattened */ -static int __init mpc836x_mds_probe(void) +static int __init mpc8360_sys_probe(void) { - unsigned long root = of_get_flat_dt_root(); + char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), + "model", NULL); + if (model == NULL) + return 0; + if (strcmp(model, "MPC8360EPB")) + return 0; + + DBG("MPC8360EMDS-PB found\n"); - return of_flat_dt_is_compatible(root, "MPC836xMDS"); + return 1; } -define_machine(mpc836x_mds) { - .name = "MPC836x MDS", - .probe = mpc836x_mds_probe, - .setup_arch = mpc836x_mds_setup_arch, - .init_IRQ = mpc836x_mds_init_IRQ, - .get_irq = ipic_get_irq, - .restart = mpc83xx_restart, - .time_init = mpc83xx_time_init, +define_machine(mpc8360_sys) { + .name = "MPC8360E PB", + .probe = mpc8360_sys_probe, + .setup_arch = mpc8360_sys_setup_arch, + .init_IRQ = mpc8360_sys_init_IRQ, + .get_irq = ipic_get_irq, + .restart = mpc83xx_restart, + .time_init = mpc83xx_time_init, .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, + .progress = udbg_progress, }; diff --git a/trunk/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/trunk/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index f42f801cf84e..030f9b2adbca 100644 --- a/trunk/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/trunk/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c @@ -119,8 +119,6 @@ mpc86xx_hpcn_init_irq(void) DBG("mpc86xxhpcn: cascade mapped to irq %d\n", cascade_irq); i8259_init(cascade_node, 0); - of_node_put(cascade_node); - set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade); #endif } diff --git a/trunk/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/trunk/arch/powerpc/sysdev/qe_lib/ucc_fast.c index a457ac1c6639..e657559bea93 100644 --- a/trunk/arch/powerpc/sysdev/qe_lib/ucc_fast.c +++ b/trunk/arch/powerpc/sysdev/qe_lib/ucc_fast.c @@ -1,12 +1,13 @@ /* + * arch/powerpc/sysdev/qe_lib/ucc_fast.c + * + * QE UCC Fast API Set - UCC Fast specific routines implementations. + * * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. * * Authors: Shlomi Gridish * Li Yang * - * Description: - * QE UCC Fast API Set - UCC Fast specific routines implementations. - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your @@ -26,61 +27,79 @@ #include #include +#define uccf_printk(level, format, arg...) \ + printk(level format "\n", ## arg) + +#define uccf_dbg(format, arg...) \ + uccf_printk(KERN_DEBUG , format , ## arg) +#define uccf_err(format, arg...) \ + uccf_printk(KERN_ERR , format , ## arg) +#define uccf_info(format, arg...) \ + uccf_printk(KERN_INFO , format , ## arg) +#define uccf_warn(format, arg...) \ + uccf_printk(KERN_WARNING , format , ## arg) + +#ifdef UCCF_VERBOSE_DEBUG +#define uccf_vdbg uccf_dbg +#else +#define uccf_vdbg(fmt, args...) do { } while (0) +#endif /* UCCF_VERBOSE_DEBUG */ + void ucc_fast_dump_regs(struct ucc_fast_private * uccf) { - printk(KERN_INFO "UCC%d Fast registers:", uccf->uf_info->ucc_num); - printk(KERN_INFO "Base address: 0x%08x", (u32) uccf->uf_regs); + uccf_info("UCC%d Fast registers:", uccf->uf_info->ucc_num); + uccf_info("Base address: 0x%08x", (u32) uccf->uf_regs); - printk(KERN_INFO "gumr : addr - 0x%08x, val - 0x%08x", + uccf_info("gumr : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->gumr, in_be32(&uccf->uf_regs->gumr)); - printk(KERN_INFO "upsmr : addr - 0x%08x, val - 0x%08x", + uccf_info("upsmr : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->upsmr, in_be32(&uccf->uf_regs->upsmr)); - printk(KERN_INFO "utodr : addr - 0x%08x, val - 0x%04x", + uccf_info("utodr : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->utodr, in_be16(&uccf->uf_regs->utodr)); - printk(KERN_INFO "udsr : addr - 0x%08x, val - 0x%04x", + uccf_info("udsr : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->udsr, in_be16(&uccf->uf_regs->udsr)); - printk(KERN_INFO "ucce : addr - 0x%08x, val - 0x%08x", + uccf_info("ucce : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->ucce, in_be32(&uccf->uf_regs->ucce)); - printk(KERN_INFO "uccm : addr - 0x%08x, val - 0x%08x", + uccf_info("uccm : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); - printk(KERN_INFO "uccs : addr - 0x%08x, val - 0x%02x", + uccf_info("uccs : addr - 0x%08x, val - 0x%02x", (u32) & uccf->uf_regs->uccs, uccf->uf_regs->uccs); - printk(KERN_INFO "urfb : addr - 0x%08x, val - 0x%08x", + uccf_info("urfb : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); - printk(KERN_INFO "urfs : addr - 0x%08x, val - 0x%04x", + uccf_info("urfs : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->urfs, in_be16(&uccf->uf_regs->urfs)); - printk(KERN_INFO "urfet : addr - 0x%08x, val - 0x%04x", + uccf_info("urfet : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->urfet, in_be16(&uccf->uf_regs->urfet)); - printk(KERN_INFO "urfset: addr - 0x%08x, val - 0x%04x", + uccf_info("urfset: addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->urfset, in_be16(&uccf->uf_regs->urfset)); - printk(KERN_INFO "utfb : addr - 0x%08x, val - 0x%08x", + uccf_info("utfb : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->utfb, in_be32(&uccf->uf_regs->utfb)); - printk(KERN_INFO "utfs : addr - 0x%08x, val - 0x%04x", + uccf_info("utfs : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->utfs, in_be16(&uccf->uf_regs->utfs)); - printk(KERN_INFO "utfet : addr - 0x%08x, val - 0x%04x", + uccf_info("utfet : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->utfet, in_be16(&uccf->uf_regs->utfet)); - printk(KERN_INFO "utftt : addr - 0x%08x, val - 0x%04x", + uccf_info("utftt : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->utftt, in_be16(&uccf->uf_regs->utftt)); - printk(KERN_INFO "utpt : addr - 0x%08x, val - 0x%04x", + uccf_info("utpt : addr - 0x%08x, val - 0x%04x", (u32) & uccf->uf_regs->utpt, in_be16(&uccf->uf_regs->utpt)); - printk(KERN_INFO "urtry : addr - 0x%08x, val - 0x%08x", + uccf_info("urtry : addr - 0x%08x, val - 0x%08x", (u32) & uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); - printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x", + uccf_info("guemr : addr - 0x%08x, val - 0x%02x", (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr); } u32 ucc_fast_get_qe_cr_subblock(int uccf_num) { switch (uccf_num) { - case 0: return QE_CR_SUBBLOCK_UCCFAST1; + case 0: return QE_CR_SUBBLOCK_UCCFAST1; case 1: return QE_CR_SUBBLOCK_UCCFAST2; case 2: return QE_CR_SUBBLOCK_UCCFAST3; case 3: return QE_CR_SUBBLOCK_UCCFAST4; case 4: return QE_CR_SUBBLOCK_UCCFAST5; case 5: return QE_CR_SUBBLOCK_UCCFAST6; case 6: return QE_CR_SUBBLOCK_UCCFAST7; - case 7: return QE_CR_SUBBLOCK_UCCFAST8; + case 7: return QE_CR_SUBBLOCK_UCCFAST8; default: return QE_CR_SUBBLOCK_INVALID; } } @@ -134,72 +153,84 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc { struct ucc_fast_private *uccf; struct ucc_fast *uf_regs; - u32 gumr; + u32 gumr = 0; int ret; + uccf_vdbg("%s: IN", __FUNCTION__); + if (!uf_info) return -EINVAL; /* check if the UCC port number is in range. */ if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) { - printk(KERN_ERR "%s: illegal UCC number", __FUNCTION__); + uccf_err("ucc_fast_init: Illegal UCC number!"); return -EINVAL; } /* Check that 'max_rx_buf_length' is properly aligned (4). */ if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: max_rx_buf_length not aligned", __FUNCTION__); + uccf_err("ucc_fast_init: max_rx_buf_length not aligned."); return -EINVAL; } /* Validate Virtual Fifo register values */ if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) { - printk(KERN_ERR "%s: urfs is too small", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register urfs too small."); return -EINVAL; } if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: urfs is not aligned", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register urfs not aligned."); return -EINVAL; } if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: urfet is not aligned.", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register urfet not aligned."); return -EINVAL; } if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: urfset is not aligned", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register urfset not aligned."); return -EINVAL; } if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: utfs is not aligned", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register utfs not aligned."); return -EINVAL; } if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: utfet is not aligned", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register utfet not aligned."); return -EINVAL; } if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { - printk(KERN_ERR "%s: utftt is not aligned", __FUNCTION__); + uccf_err + ("ucc_fast_init: Virtual Fifo register utftt not aligned."); return -EINVAL; } uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); if (!uccf) { - printk(KERN_ERR "%s: Cannot allocate private data", __FUNCTION__); + uccf_err + ("ucc_fast_init: No memory for UCC slow data structure!"); return -ENOMEM; } /* Fill fast UCC structure */ uccf->uf_info = uf_info; /* Set the PHY base address */ - uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast)); + uccf->uf_regs = + (struct ucc_fast *) ioremap(uf_info->regs, sizeof(struct ucc_fast)); if (uccf->uf_regs == NULL) { - printk(KERN_ERR "%s: Cannot map UCC registers", __FUNCTION__); + uccf_err + ("ucc_fast_init: No memory map for UCC slow controller!"); return -ENOMEM; } @@ -218,7 +249,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc /* Init Guemr register */ if ((ret = ucc_init_guemr((struct ucc_common *) (uf_regs)))) { - printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__); + uccf_err("ucc_fast_init: Could not init the guemr register."); ucc_fast_free(uccf); return ret; } @@ -227,7 +258,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc if ((ret = ucc_set_type(uf_info->ucc_num, (struct ucc_common *) (uf_regs), UCC_SPEED_TYPE_FAST))) { - printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); + uccf_err("ucc_fast_init: Could not set type to fast."); ucc_fast_free(uccf); return ret; } @@ -236,9 +267,10 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc /* Set GUMR */ /* For more details see the hardware spec. */ - gumr = uf_info->ttx_trx; + /* gumr starts as zero. */ if (uf_info->tci) gumr |= UCC_FAST_GUMR_TCI; + gumr |= uf_info->ttx_trx; if (uf_info->cdp) gumr |= UCC_FAST_GUMR_CDP; if (uf_info->ctsp) @@ -266,7 +298,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc uccf->ucc_fast_tx_virtual_fifo_base_offset = qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); if (IS_MURAM_ERR(uccf->ucc_fast_tx_virtual_fifo_base_offset)) { - printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO", __FUNCTION__); + uccf_err + ("ucc_fast_init: Can not allocate MURAM memory for " + "struct ucc_fastx_virtual_fifo_base_offset."); uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; ucc_fast_free(uccf); return -ENOMEM; @@ -274,11 +308,14 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc /* Allocate memory for Rx Virtual Fifo */ uccf->ucc_fast_rx_virtual_fifo_base_offset = - qe_muram_alloc(uf_info->urfs + + qe_muram_alloc(uf_info->urfs + + (u32) UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); if (IS_MURAM_ERR(uccf->ucc_fast_rx_virtual_fifo_base_offset)) { - printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO", __FUNCTION__); + uccf_err + ("ucc_fast_init: Can not allocate MURAM memory for " + "ucc_fast_rx_virtual_fifo_base_offset."); uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; ucc_fast_free(uccf); return -ENOMEM; @@ -305,22 +342,26 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc /* If NMSI (not Tsa), set Tx and Rx clock. */ if (!uf_info->tsa) { /* Rx clock routing */ - if ((uf_info->rx_clock != QE_CLK_NONE) && - ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock, - COMM_DIR_RX)) { - printk(KERN_ERR "%s: illegal value for RX clock", - __FUNCTION__); - ucc_fast_free(uccf); - return -EINVAL; + if (uf_info->rx_clock != QE_CLK_NONE) { + if (ucc_set_qe_mux_rxtx + (uf_info->ucc_num, uf_info->rx_clock, + COMM_DIR_RX)) { + uccf_err + ("ucc_fast_init: Illegal value for parameter 'RxClock'."); + ucc_fast_free(uccf); + return -EINVAL; + } } /* Tx clock routing */ - if ((uf_info->tx_clock != QE_CLK_NONE) && - ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock, - COMM_DIR_TX)) { - printk(KERN_ERR "%s: illegal value for TX clock", - __FUNCTION__); - ucc_fast_free(uccf); - return -EINVAL; + if (uf_info->tx_clock != QE_CLK_NONE) { + if (ucc_set_qe_mux_rxtx + (uf_info->ucc_num, uf_info->tx_clock, + COMM_DIR_TX)) { + uccf_err + ("ucc_fast_init: Illegal value for parameter 'TxClock'."); + ucc_fast_free(uccf); + return -EINVAL; + } } } @@ -329,9 +370,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc /* First, clear anything pending at UCC level, * otherwise, old garbage may come through - * as soon as the dam is opened. */ - - /* Writing '1' clears */ + * as soon as the dam is opened + * Writing '1' clears + */ out_be32(&uf_regs->ucce, 0xffffffff); *uccf_ret = uccf; diff --git a/trunk/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/trunk/arch/powerpc/sysdev/qe_lib/ucc_slow.c index 817df73ecf56..0e97e5c94f8a 100644 --- a/trunk/arch/powerpc/sysdev/qe_lib/ucc_slow.c +++ b/trunk/arch/powerpc/sysdev/qe_lib/ucc_slow.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -26,6 +27,24 @@ #include #include +#define uccs_printk(level, format, arg...) \ + printk(level format "\n", ## arg) + +#define uccs_dbg(format, arg...) \ + uccs_printk(KERN_DEBUG , format , ## arg) +#define uccs_err(format, arg...) \ + uccs_printk(KERN_ERR , format , ## arg) +#define uccs_info(format, arg...) \ + uccs_printk(KERN_INFO , format , ## arg) +#define uccs_warn(format, arg...) \ + uccs_printk(KERN_WARNING , format , ## arg) + +#ifdef UCCS_VERBOSE_DEBUG +#define uccs_vdbg uccs_dbg +#else +#define uccs_vdbg(fmt, args...) do { } while (0) +#endif /* UCCS_VERBOSE_DEBUG */ + u32 ucc_slow_get_qe_cr_subblock(int uccs_num) { switch (uccs_num) { @@ -116,53 +135,51 @@ void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode) int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** uccs_ret) { - struct ucc_slow_private *uccs; u32 i; struct ucc_slow *us_regs; u32 gumr; - struct qe_bd *bd; + u8 function_code = 0; + u8 *bd; + struct ucc_slow_private *uccs; u32 id; u32 command; - int ret = 0; + int ret; + + uccs_vdbg("%s: IN", __FUNCTION__); if (!us_info) return -EINVAL; /* check if the UCC port number is in range. */ if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) { - printk(KERN_ERR "%s: illegal UCC number", __FUNCTION__); + uccs_err("ucc_slow_init: Illegal UCC number!"); return -EINVAL; } /* * Set mrblr * Check that 'max_rx_buf_length' is properly aligned (4), unless - * rfw is 1, meaning that QE accepts one byte at a time, unlike normal + * rfw is 1, meaning that QE accepts one byte at a time, unlike normal * case when QE accepts 32 bits at a time. */ if ((!us_info->rfw) && (us_info->max_rx_buf_length & (UCC_SLOW_MRBLR_ALIGNMENT - 1))) { - printk(KERN_ERR "max_rx_buf_length not aligned."); + uccs_err("max_rx_buf_length not aligned."); return -EINVAL; } uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); if (!uccs) { - printk(KERN_ERR "%s: Cannot allocate private data", __FUNCTION__); + uccs_err + ("ucc_slow_init: No memory for UCC slow data structure!"); return -ENOMEM; } /* Fill slow UCC structure */ uccs->us_info = us_info; - /* Set the PHY base address */ - uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow)); - if (uccs->us_regs == NULL) { - printk(KERN_ERR "%s: Cannot map UCC registers", __FUNCTION__); - return -ENOMEM; - } - uccs->saved_uccm = 0; uccs->p_rx_frame = 0; + uccs->us_regs = us_info->regs; us_regs = uccs->us_regs; uccs->p_ucce = (u16 *) & (us_regs->ucce); uccs->p_uccm = (u16 *) & (us_regs->uccm); @@ -173,22 +190,24 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc #endif /* STATISTICS */ /* Get PRAM base */ - uccs->us_pram_offset = - qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM); + uccs->us_pram_offset = qe_muram_alloc(UCC_SLOW_PRAM_SIZE, + ALIGNMENT_OF_UCC_SLOW_PRAM); if (IS_MURAM_ERR(uccs->us_pram_offset)) { - printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __FUNCTION__); + uccs_err + ("ucc_slow_init: Can not allocate MURAM memory " + "for Slow UCC."); ucc_slow_free(uccs); return -ENOMEM; } id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, id, QE_CR_PROTOCOL_UNSPECIFIED, - uccs->us_pram_offset); + (u32) uccs->us_pram_offset); uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); /* Init Guemr register */ if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) { - printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__); + uccs_err("ucc_slow_init: Could not init the guemr register."); ucc_slow_free(uccs); return ret; } @@ -197,7 +216,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc if ((ret = ucc_set_type(us_info->ucc_num, (struct ucc_common *) (us_info->regs), UCC_SPEED_TYPE_SLOW))) { - printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); + uccs_err("ucc_slow_init: Could not init the guemr register."); ucc_slow_free(uccs); return ret; } @@ -211,7 +230,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd), QE_ALIGNMENT_OF_BD); if (IS_MURAM_ERR(uccs->rx_base_offset)) { - printk(KERN_ERR "%s: cannot allocate RX BDs", __FUNCTION__); + uccs_err("ucc_slow_init: No memory for Rx BD's."); uccs->rx_base_offset = 0; ucc_slow_free(uccs); return -ENOMEM; @@ -221,7 +240,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd), QE_ALIGNMENT_OF_BD); if (IS_MURAM_ERR(uccs->tx_base_offset)) { - printk(KERN_ERR "%s: cannot allocate TX BDs", __FUNCTION__); + uccs_err("ucc_slow_init: No memory for Tx BD's."); uccs->tx_base_offset = 0; ucc_slow_free(uccs); return -ENOMEM; @@ -229,33 +248,34 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc /* Init Tx bds */ bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset); - for (i = 0; i < us_info->tx_bd_ring_len - 1; i++) { + for (i = 0; i < us_info->tx_bd_ring_len; i++) { /* clear bd buffer */ - out_be32(&bd->buf, 0); + out_be32(&(((struct qe_bd *)bd)->buf), 0); /* set bd status and length */ - out_be32((u32 *) bd, 0); - bd++; + out_be32((u32*)bd, 0); + bd += sizeof(struct qe_bd); } - /* for last BD set Wrap bit */ - out_be32(&bd->buf, 0); - out_be32((u32 *) bd, cpu_to_be32(T_W)); + bd -= sizeof(struct qe_bd); + /* set bd status and length */ + out_be32((u32*)bd, T_W); /* for last BD set Wrap bit */ /* Init Rx bds */ bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset); - for (i = 0; i < us_info->rx_bd_ring_len - 1; i++) { + for (i = 0; i < us_info->rx_bd_ring_len; i++) { /* set bd status and length */ out_be32((u32*)bd, 0); /* clear bd buffer */ - out_be32(&bd->buf, 0); - bd++; + out_be32(&(((struct qe_bd *)bd)->buf), 0); + bd += sizeof(struct qe_bd); } - /* for last BD set Wrap bit */ - out_be32((u32*)bd, cpu_to_be32(R_W)); - out_be32(&bd->buf, 0); + bd -= sizeof(struct qe_bd); + /* set bd status and length */ + out_be32((u32*)bd, R_W); /* for last BD set Wrap bit */ /* Set GUMR (For more details see the hardware spec.). */ /* gumr_h */ - gumr = us_info->tcrc; + gumr = 0; + gumr |= us_info->tcrc; if (us_info->cdp) gumr |= UCC_SLOW_GUMR_H_CDP; if (us_info->ctsp) @@ -275,8 +295,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc out_be32(&us_regs->gumr_h, gumr); /* gumr_l */ - gumr = us_info->tdcr | us_info->rdcr | us_info->tenc | us_info->renc | - us_info->diag | us_info->mode; + gumr = 0; if (us_info->tci) gumr |= UCC_SLOW_GUMR_L_TCI; if (us_info->rinv) @@ -285,14 +304,23 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc gumr |= UCC_SLOW_GUMR_L_TINV; if (us_info->tend) gumr |= UCC_SLOW_GUMR_L_TEND; + gumr |= us_info->tdcr; + gumr |= us_info->rdcr; + gumr |= us_info->tenc; + gumr |= us_info->renc; + gumr |= us_info->diag; + gumr |= us_info->mode; out_be32(&us_regs->gumr_l, gumr); /* Function code registers */ + /* function_code has initial value 0 */ /* if the data is in cachable memory, the 'global' */ /* in the function code should be set. */ - uccs->us_pram->tfcr = uccs->us_pram->rfcr = - us_info->data_mem_part | QE_BMR_BYTE_ORDER_BO_MOT; + function_code |= us_info->data_mem_part; + function_code |= QE_BMR_BYTE_ORDER_BO_MOT; /* Required for QE */ + uccs->us_pram->tfcr = function_code; + uccs->us_pram->rfcr = function_code; /* rbase, tbase are offsets from MURAM base */ out_be16(&uccs->us_pram->rbase, uccs->us_pram_offset); @@ -308,29 +336,34 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc /* If NMSI (not Tsa), set Tx and Rx clock. */ if (!us_info->tsa) { /* Rx clock routing */ - if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock, - COMM_DIR_RX)) { - printk(KERN_ERR "%s: illegal value for RX clock", - __FUNCTION__); + if (ucc_set_qe_mux_rxtx + (us_info->ucc_num, us_info->rx_clock, COMM_DIR_RX)) { + uccs_err + ("ucc_slow_init: Illegal value for parameter" + " 'RxClock'."); ucc_slow_free(uccs); return -EINVAL; } /* Tx clock routing */ - if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock, - COMM_DIR_TX)) { - printk(KERN_ERR "%s: illegal value for TX clock", - __FUNCTION__); + if (ucc_set_qe_mux_rxtx(us_info->ucc_num, + us_info->tx_clock, COMM_DIR_TX)) { + uccs_err + ("ucc_slow_init: Illegal value for parameter " + "'TxClock'."); ucc_slow_free(uccs); return -EINVAL; } } + /* + * INTERRUPTS + */ /* Set interrupt mask register at UCC level. */ out_be16(&us_regs->uccm, us_info->uccm_mask); - /* First, clear anything pending at UCC level, - * otherwise, old garbage may come through - * as soon as the dam is opened. */ + /* First, clear anything pending at UCC level, */ + /* otherwise, old garbage may come through */ + /* as soon as the dam is opened. */ /* Writing '1' clears */ out_be16(&us_regs->ucce, 0xffff); @@ -367,5 +400,3 @@ void ucc_slow_free(struct ucc_slow_private * uccs) kfree(uccs); } - - diff --git a/trunk/include/asm-powerpc/ucc_slow.h b/trunk/include/asm-powerpc/ucc_slow.h index fdaac9d762bb..1babad99c719 100644 --- a/trunk/include/asm-powerpc/ucc_slow.h +++ b/trunk/include/asm-powerpc/ucc_slow.h @@ -150,7 +150,7 @@ struct ucc_slow_info { int ucc_num; enum qe_clock rx_clock; enum qe_clock tx_clock; - u32 regs; + struct ucc_slow *regs; int irq; u16 uccm_mask; int data_mem_part; @@ -199,9 +199,9 @@ struct ucc_slow_private { and length for first BD in a frame */ u32 tx_base_offset; /* first BD in Tx BD table offset (In MURAM) */ u32 rx_base_offset; /* first BD in Rx BD table offset (In MURAM) */ - struct qe_bd *confBd; /* next BD for confirm after Tx */ - struct qe_bd *tx_bd; /* next BD for new Tx request */ - struct qe_bd *rx_bd; /* next BD to collect after Rx */ + u8 *confBd; /* next BD for confirm after Tx */ + u8 *tx_bd; /* next BD for new Tx request */ + u8 *rx_bd; /* next BD to collect after Rx */ void *p_rx_frame; /* accumulating receive frame */ u16 *p_ucce; /* a pointer to the event register in memory. */