From a661ce9477dd287ebe6f3b2574e3bb53881fce33 Mon Sep 17 00:00:00 2001 From: Kevin Corry Date: Tue, 11 Dec 2007 13:49:17 +0100 Subject: [PATCH] --- yaml --- r: 81074 b: refs/heads/master c: 29641ce165e5f643b48988cb779c6ba97b647503 h: refs/heads/master v: v3 --- [refs] | 2 +- .../powerpc/booting-without-of.txt | 19 +- trunk/arch/powerpc/boot/dts/kuroboxHD.dts | 16 +- trunk/arch/powerpc/boot/dts/kuroboxHG.dts | 16 +- trunk/arch/powerpc/boot/dts/lite5200.dts | 6 +- trunk/arch/powerpc/boot/dts/lite5200b.dts | 6 +- trunk/arch/powerpc/boot/dts/mpc8313erdb.dts | 36 +- trunk/arch/powerpc/boot/dts/mpc832x_mds.dts | 45 +- trunk/arch/powerpc/boot/dts/mpc832x_rdb.dts | 47 +- trunk/arch/powerpc/boot/dts/mpc8349emitx.dts | 54 +- .../arch/powerpc/boot/dts/mpc8349emitxgp.dts | 32 +- trunk/arch/powerpc/boot/dts/mpc834x_mds.dts | 51 +- trunk/arch/powerpc/boot/dts/mpc836x_mds.dts | 47 +- trunk/arch/powerpc/boot/dts/mpc8540ads.dts | 59 +- trunk/arch/powerpc/boot/dts/mpc8541cds.dts | 41 +- trunk/arch/powerpc/boot/dts/mpc8544ds.dts | 59 +- trunk/arch/powerpc/boot/dts/mpc8548cds.dts | 68 +- trunk/arch/powerpc/boot/dts/mpc8555cds.dts | 41 +- trunk/arch/powerpc/boot/dts/mpc8560ads.dts | 59 +- trunk/arch/powerpc/boot/dts/mpc8568mds.dts | 80 +- trunk/arch/powerpc/boot/dts/mpc8572ds.dts | 59 +- trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts | 28 +- trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts | 80 +- trunk/arch/powerpc/boot/dts/mpc866ads.dts | 156 ++-- .../powerpc/configs/mpc837x_mds_defconfig | 878 ------------------ trunk/arch/powerpc/kernel/cputable.c | 13 +- trunk/arch/powerpc/kernel/traps.c | 25 - trunk/arch/powerpc/platforms/82xx/pq2fads.c | 2 +- trunk/arch/powerpc/platforms/83xx/Kconfig | 11 - trunk/arch/powerpc/platforms/83xx/Makefile | 1 - .../arch/powerpc/platforms/83xx/mpc8313_rdb.c | 4 +- .../arch/powerpc/platforms/83xx/mpc832x_mds.c | 4 +- .../arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +- .../arch/powerpc/platforms/83xx/mpc834x_mds.c | 21 +- .../arch/powerpc/platforms/83xx/mpc836x_mds.c | 4 +- .../arch/powerpc/platforms/83xx/mpc837x_mds.c | 104 --- .../arch/powerpc/platforms/85xx/mpc85xx_mds.c | 4 +- trunk/arch/powerpc/platforms/8xx/Kconfig | 1 - trunk/arch/powerpc/platforms/8xx/mpc86xads.h | 44 + .../powerpc/platforms/8xx/mpc86xads_setup.c | 289 ++++-- trunk/arch/powerpc/platforms/cell/pmu.c | 2 +- trunk/arch/powerpc/sysdev/commproc.c | 47 +- trunk/arch/powerpc/sysdev/cpm2_common.c | 25 - trunk/arch/powerpc/sysdev/fsl_soc.c | 23 +- trunk/arch/powerpc/sysdev/ipic.c | 219 ++--- trunk/arch/powerpc/sysdev/ipic.h | 13 +- trunk/arch/powerpc/sysdev/qe_lib/qe.c | 46 +- trunk/drivers/macintosh/adb.c | 174 ++-- trunk/drivers/macintosh/mediabay.c | 14 +- trunk/drivers/macintosh/therm_pm72.c | 9 +- trunk/drivers/macintosh/therm_windtunnel.c | 34 +- trunk/drivers/macintosh/via-pmu.c | 648 ++++++++----- trunk/drivers/net/fs_enet/mac-fcc.c | 10 +- trunk/drivers/net/fs_enet/mac-scc.c | 11 +- trunk/drivers/net/ucc_geth.c | 55 +- trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c | 6 +- trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c | 8 +- trunk/include/asm-powerpc/cpm.h | 1 - trunk/include/asm-powerpc/immap_86xx.h | 25 +- trunk/include/asm-powerpc/ipic.h | 12 +- trunk/include/asm-powerpc/qe.h | 95 +- trunk/include/asm-powerpc/reg_booke.h | 13 +- trunk/include/linux/pmu.h | 36 + 63 files changed, 1512 insertions(+), 2528 deletions(-) delete mode 100644 trunk/arch/powerpc/configs/mpc837x_mds_defconfig delete mode 100644 trunk/arch/powerpc/platforms/83xx/mpc837x_mds.c diff --git a/[refs] b/[refs] index 1503e6b3c17a..1308883d62fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f91266edba3c6ef001819c5abe4c3a0643f66fc9 +refs/heads/master: 29641ce165e5f643b48988cb779c6ba97b647503 diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index ee0209a7de3e..7327f37d78f3 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -1223,14 +1223,16 @@ platforms are moved over to use the flattened-device-tree model. Required properties: - reg : Offset and length of the register set for the device + - device_type : Should be "mdio" - compatible : Should define the compatible device type for the - mdio. Currently, this is most likely to be "fsl,gianfar-mdio" + mdio. Currently, this is most likely to be "gianfar" Example: mdio@24520 { reg = <24520 20>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; ethernet-phy@0 { ...... @@ -1629,19 +1631,6 @@ platforms are moved over to use the flattened-device-tree model. - interrupt-parent : the phandle for the interrupt controller that services interrupts for this device. - pio-handle : The phandle for the Parallel I/O port configuration. - - rx-clock-name: the UCC receive clock source - "none": clock source is disabled - "brg1" through "brg16": clock source is BRG1-BRG16, respectively - "clk1" through "clk24": clock source is CLK1-CLK24, respectively - - tx-clock-name: the UCC transmit clock source - "none": clock source is disabled - "brg1" through "brg16": clock source is BRG1-BRG16, respectively - "clk1" through "clk24": clock source is CLK1-CLK24, respectively - The following two properties are deprecated. rx-clock has been replaced - with rx-clock-name, and tx-clock has been replaced with tx-clock-name. - Drivers that currently use the deprecated properties should continue to - do so, in order to support older device trees, but they should be updated - to check for the new properties first. - rx-clock : represents the UCC receive clock source. 0x00 : clock source is disabled; 0x1~0x10 : clock source is BRG1~BRG16 respectively; diff --git a/trunk/arch/powerpc/boot/dts/kuroboxHD.dts b/trunk/arch/powerpc/boot/dts/kuroboxHD.dts index 446958854519..ec71ab819fee 100644 --- a/trunk/arch/powerpc/boot/dts/kuroboxHD.dts +++ b/trunk/arch/powerpc/boot/dts/kuroboxHD.dts @@ -23,12 +23,6 @@ XXXX add flash parts, rtc, ?? #address-cells = <1>; #size-cells = <1>; - aliases { - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -66,7 +60,7 @@ XXXX add flash parts, rtc, ?? i2c@80003000 { #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <80003000 1000>; interrupts = <5 2>; @@ -79,8 +73,7 @@ XXXX add flash parts, rtc, ?? }; }; - serial0: serial@80004500 { - cell-index = <0>; + serial@80004500 { device_type = "serial"; compatible = "ns16550"; reg = <80004500 8>; @@ -90,8 +83,7 @@ XXXX add flash parts, rtc, ?? interrupt-parent = <&mpic>; }; - serial1: serial@80004600 { - cell-index = <1>; + serial@80004600 { device_type = "serial"; compatible = "ns16550"; reg = <80004600 8>; @@ -110,7 +102,7 @@ XXXX add flash parts, rtc, ?? reg = <80040000 40000>; }; - pci0: pci@fec00000 { + pci@fec00000 { #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; diff --git a/trunk/arch/powerpc/boot/dts/kuroboxHG.dts b/trunk/arch/powerpc/boot/dts/kuroboxHG.dts index 8443c85b7b30..32ecd2319928 100644 --- a/trunk/arch/powerpc/boot/dts/kuroboxHG.dts +++ b/trunk/arch/powerpc/boot/dts/kuroboxHG.dts @@ -23,12 +23,6 @@ XXXX add flash parts, rtc, ?? #address-cells = <1>; #size-cells = <1>; - aliases { - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -66,7 +60,7 @@ XXXX add flash parts, rtc, ?? i2c@80003000 { #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <80003000 1000>; interrupts = <5 2>; @@ -79,8 +73,7 @@ XXXX add flash parts, rtc, ?? }; }; - serial0: serial@80004500 { - cell-index = <0>; + serial@80004500 { device_type = "serial"; compatible = "ns16550"; reg = <80004500 8>; @@ -90,8 +83,7 @@ XXXX add flash parts, rtc, ?? interrupt-parent = <&mpic>; }; - serial1: serial@80004600 { - cell-index = <1>; + serial@80004600 { device_type = "serial"; compatible = "ns16550"; reg = <80004600 8>; @@ -110,7 +102,7 @@ XXXX add flash parts, rtc, ?? reg = <80040000 40000>; }; - pci0: pci@fec00000 { + pci@fec00000 { #address-cells = <3>; #size-cells = <2>; #interrupt-cells = <1>; diff --git a/trunk/arch/powerpc/boot/dts/lite5200.dts b/trunk/arch/powerpc/boot/dts/lite5200.dts index 23eeeb1fc61e..6731763f0282 100644 --- a/trunk/arch/powerpc/boot/dts/lite5200.dts +++ b/trunk/arch/powerpc/boot/dts/lite5200.dts @@ -284,8 +284,7 @@ }; i2c@3d00 { - #address-cells = <1>; - #size-cells = <0>; + device_type = "i2c"; compatible = "mpc5200-i2c","fsl-i2c"; cell-index = <0>; reg = <3d00 40>; @@ -295,8 +294,7 @@ }; i2c@3d40 { - #address-cells = <1>; - #size-cells = <0>; + device_type = "i2c"; compatible = "mpc5200-i2c","fsl-i2c"; cell-index = <1>; reg = <3d40 40>; diff --git a/trunk/arch/powerpc/boot/dts/lite5200b.dts b/trunk/arch/powerpc/boot/dts/lite5200b.dts index f94e073de9a7..b540388c608c 100644 --- a/trunk/arch/powerpc/boot/dts/lite5200b.dts +++ b/trunk/arch/powerpc/boot/dts/lite5200b.dts @@ -300,8 +300,7 @@ }; i2c@3d00 { - #address-cells = <1>; - #size-cells = <0>; + device_type = "i2c"; compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; cell-index = <0>; reg = <3d00 40>; @@ -311,8 +310,7 @@ }; i2c@3d40 { - #address-cells = <1>; - #size-cells = <0>; + device_type = "i2c"; compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; cell-index = <1>; reg = <3d40 40>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts b/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts index c5b6665a8209..9e7eba973262 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8313erdb.dts @@ -15,14 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -60,9 +52,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -71,9 +61,7 @@ }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; @@ -103,10 +91,11 @@ }; mdio@24520 { + device_type = "mdio"; + compatible = "gianfar"; + reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; - reg = <24520 20>; phy1: ethernet-phy@1 { interrupt-parent = < &ipic >; interrupts = <13 8>; @@ -121,8 +110,7 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -133,8 +121,7 @@ phy-handle = < &phy1 >; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -145,8 +132,7 @@ phy-handle = < &phy4 >; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -155,8 +141,7 @@ interrupt-parent = < &ipic >; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -194,8 +179,7 @@ }; }; - pci0: pci@e0008500 { - cell-index = <1>; + pci@e0008500 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts index 26ac467b10ea..c64f3037a13b 100644 --- a/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc832x_mds.dts @@ -15,14 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -67,7 +59,7 @@ i2c@3000 { #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -80,8 +72,7 @@ }; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -90,8 +81,7 @@ interrupt-parent = < &ipic >; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -218,34 +208,44 @@ mode = "slave"; }; - enet0: ucc@2200 { + ucc@2200 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <3>; device-id = <3>; reg = <2200 200>; interrupts = <22>; interrupt-parent = < &qeic >; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "clk9"; - tx-clock-name = "clk10"; + rx-clock = <19>; + tx-clock = <1a>; phy-handle = < &phy3 >; pio-handle = < &pio3 >; }; - enet1: ucc@3200 { + ucc@3200 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <4>; device-id = <4>; reg = <3200 200>; interrupts = <23>; interrupt-parent = < &qeic >; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "clk7"; - tx-clock-name = "clk8"; + rx-clock = <17>; + tx-clock = <18>; phy-handle = < &phy4 >; pio-handle = < &pio4 >; }; @@ -283,8 +283,7 @@ }; }; - pci0: pci@e0008500 { - cell-index = <1>; + pci@e0008500 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x11 AD17 */ diff --git a/trunk/arch/powerpc/boot/dts/mpc832x_rdb.dts b/trunk/arch/powerpc/boot/dts/mpc832x_rdb.dts index 10ff7aadf9dc..388c8a7012e1 100644 --- a/trunk/arch/powerpc/boot/dts/mpc832x_rdb.dts +++ b/trunk/arch/powerpc/boot/dts/mpc832x_rdb.dts @@ -15,14 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -60,9 +52,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -70,8 +60,7 @@ dfsrr; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -80,8 +69,7 @@ interrupt-parent = <&pic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -199,34 +187,44 @@ mode = "cpu"; }; - enet0: ucc@3000 { + ucc@3000 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <2>; device-id = <2>; reg = <3000 200>; interrupts = <21>; interrupt-parent = <&qeic>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "clk16"; - tx-clock-name = "clk3"; + rx-clock = <20>; + tx-clock = <13>; phy-handle = <&phy00>; pio-handle = <&ucc2pio>; }; - enet1: ucc@2200 { + ucc@2200 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <3>; device-id = <3>; reg = <2200 200>; interrupts = <22>; interrupt-parent = <&qeic>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "clk9"; - tx-clock-name = "clk10"; + rx-clock = <19>; + tx-clock = <1a>; phy-handle = <&phy04>; pio-handle = <&ucc3pio>; }; @@ -264,8 +262,7 @@ }; }; - pci0: pci@e0008500 { - cell-index = <1>; + pci@e0008500 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x10 AD16 (USB) */ diff --git a/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts b/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts index e354f2634246..5072f6d0a46d 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8349emitx.dts @@ -14,15 +14,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -60,9 +51,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -71,9 +60,7 @@ }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; @@ -115,10 +102,11 @@ }; mdio@24520 { + device_type = "mdio"; + compatible = "gianfar"; + reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; - reg = <24520 20>; /* Vitesse 8201 */ phy1c: ethernet-phy@1c { @@ -137,12 +125,17 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + 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 >; @@ -150,12 +143,19 @@ linux,network-index = <0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <25000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + 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 >; @@ -163,8 +163,7 @@ linux,network-index = <1>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -173,8 +172,7 @@ interrupt-parent = < &ipic >; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -205,8 +203,7 @@ }; }; - pci0: pci@e0008500 { - cell-index = <1>; + pci@e0008500 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x10 - SATA */ @@ -227,8 +224,7 @@ device_type = "pci"; }; - pci1: pci@e0008600 { - cell-index = <2>; + pci@e0008600 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x0E - MiniPCI Slot */ diff --git a/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts index ebdf0b750086..074f7a2ab7e4 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8349emitxgp.dts @@ -14,13 +14,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -58,9 +51,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -69,9 +60,7 @@ }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; @@ -101,10 +90,11 @@ }; mdio@24520 { + device_type = "mdio"; + compatible = "gianfar"; + reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; - reg = <24520 20>; /* Vitesse 8201 */ phy1c: ethernet-phy@1c { @@ -115,8 +105,7 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -128,8 +117,7 @@ linux,network-index = <0>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -138,8 +126,7 @@ interrupt-parent = < &ipic >; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -170,8 +157,7 @@ }; }; - pci0: pci@e0008600 { - cell-index = <2>; + pci@e0008600 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x0F - PCI Slot */ diff --git a/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts index 0ba13ebcea68..49363f89cb71 100644 --- a/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc834x_mds.dts @@ -15,15 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -68,7 +59,7 @@ i2c@3000 { #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -84,7 +75,7 @@ i2c@3100 { #address-cells = <1>; #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; @@ -128,11 +119,11 @@ }; mdio@24520 { + device_type = "mdio"; + compatible = "gianfar"; + reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; - reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = < &ipic >; interrupts = <11 8>; @@ -147,12 +138,17 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + 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 >; @@ -160,12 +156,19 @@ linux,network-index = <0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <25000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + 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 >; @@ -173,8 +176,7 @@ linux,network-index = <1>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -183,8 +185,7 @@ interrupt-parent = < &ipic >; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -224,8 +225,7 @@ }; }; - pci0: pci@e0008500 { - cell-index = <1>; + pci@e0008500 { interrupt-map-mask = ; interrupt-map = < @@ -285,8 +285,7 @@ device_type = "pci"; }; - pci1: pci@e0008600 { - cell-index = <2>; + pci@e0008600 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts b/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts index fd841b2fddd0..0b2d2b588daa 100644 --- a/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -20,14 +20,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -72,7 +64,7 @@ i2c@3000 { #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = ; @@ -88,7 +80,7 @@ i2c@3100 { #address-cells = <1>; #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = ; @@ -96,8 +88,7 @@ dfsrr; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -106,8 +97,7 @@ interrupt-parent = < &ipic >; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -249,35 +239,45 @@ mode = "slave"; }; - enet0: ucc@2000 { + ucc@2000 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <1>; device-id = <1>; reg = <2000 200>; interrupts = <20>; interrupt-parent = < &qeic >; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "none"; - tx-clock-name = "clk9"; + rx-clock = <0>; + tx-clock = <19>; phy-handle = < &phy0 >; phy-connection-type = "rgmii-id"; pio-handle = < &pio1 >; }; - enet1: ucc@3000 { + ucc@3000 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <2>; device-id = <2>; reg = <3000 200>; interrupts = <21>; interrupt-parent = < &qeic >; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "none"; - tx-clock-name = "clk4"; + rx-clock = <0>; + tx-clock = <14>; phy-handle = < &phy1 >; phy-connection-type = "rgmii-id"; pio-handle = < &pio2 >; @@ -316,8 +316,7 @@ }; }; - pci0: pci@e0008500 { - cell-index = <1>; + pci@e0008500 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc8540ads.dts b/trunk/arch/powerpc/boot/dts/mpc8540ads.dts index 975248491b7b..6442a717ec3b 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8540ads.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8540ads.dts @@ -16,15 +16,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - ethernet2 = &enet2; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -72,9 +63,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -85,9 +74,9 @@ mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = <5 1>; @@ -108,44 +97,64 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <1d 2 1e 2 22 2>; interrupt-parent = <&mpic>; phy-handle = <&phy0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <25000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <23 2 24 2 28 2>; interrupt-parent = <&mpic>; phy-handle = <&phy1>; }; - enet2: ethernet@26000 { - cell-index = <2>; + ethernet@26000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "FEC"; compatible = "gianfar"; reg = <26000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <29 2>; interrupt-parent = <&mpic>; phy-handle = <&phy3>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; // reg base, size @@ -154,8 +163,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; // reg base, size @@ -175,8 +183,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci@e0008000 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc8541cds.dts b/trunk/arch/powerpc/boot/dts/mpc8541cds.dts index fa8d9aaad157..f3f4d79deb63 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8541cds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8541cds.dts @@ -16,15 +16,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -72,9 +63,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -85,9 +74,9 @@ mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = <5 1>; @@ -102,8 +91,9 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -114,8 +104,9 @@ phy-handle = <&phy0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -126,8 +117,7 @@ phy-handle = <&phy1>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; // reg base, size @@ -136,8 +126,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; // reg base, size @@ -194,8 +183,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci1: pci@e0008000 { interrupt-map-mask = <1f800 0 0 7>; interrupt-map = < @@ -262,12 +250,11 @@ #interrupt-cells = <2>; compatible = "chrp,iic"; interrupts = <1>; - interrupt-parent = <&pci0>; + interrupt-parent = <&pci1>; }; }; - pci1: pci@e0009000 { - cell-index = <1>; + pci@e0009000 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc8544ds.dts b/trunk/arch/powerpc/boot/dts/mpc8544ds.dts index 54b3bdf7fc97..6c608de1fc1b 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8544ds.dts @@ -15,17 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - pci2 = &pci2; - pci3 = &pci3; - }; - cpus { #cpus = <1>; #address-cells = <1>; @@ -75,9 +64,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -85,23 +72,12 @@ dfsrr; }; - i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; - compatible = "fsl-i2c"; - reg = <3100 100>; - interrupts = <2b 2>; - interrupt-parent = <&mpic>; - dfsrr; - }; - mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = ; @@ -116,8 +92,9 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -129,8 +106,9 @@ phy-connection-type = "rgmii-id"; }; - enet1: ethernet@26000 { - cell-index = <1>; + ethernet@26000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -142,8 +120,7 @@ phy-connection-type = "rgmii-id"; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -152,8 +129,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -180,8 +156,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci@e0008000 { compatible = "fsl,mpc8540-pci"; device_type = "pci"; interrupt-map-mask = ; @@ -212,8 +187,7 @@ reg = ; }; - pci1: pcie@e0009000 { - cell-index = <1>; + pcie@e0009000 { compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #interrupt-cells = <1>; @@ -249,8 +223,7 @@ }; }; - pci2: pcie@e000a000 { - cell-index = <2>; + pcie@e000a000 { compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #interrupt-cells = <1>; @@ -286,8 +259,7 @@ }; }; - pci3: pcie@e000b000 { - cell-index = <3>; + pcie@e000b000 { compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #interrupt-cells = <1>; @@ -397,5 +369,6 @@ }; }; }; + }; }; diff --git a/trunk/arch/powerpc/boot/dts/mpc8548cds.dts b/trunk/arch/powerpc/boot/dts/mpc8548cds.dts index 1f470c6a1c63..69ca5025d972 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8548cds.dts @@ -16,20 +16,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; -/* - ethernet2 = &enet2; - ethernet3 = &enet3; -*/ - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - pci2 = &pci2; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -77,9 +63,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -87,23 +71,12 @@ dfsrr; }; - i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; - compatible = "fsl-i2c"; - reg = <3100 100>; - interrupts = <2b 2>; - interrupt-parent = <&mpic>; - dfsrr; - }; - mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = <5 1>; @@ -130,8 +103,9 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -142,8 +116,9 @@ phy-handle = <&phy0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -155,8 +130,9 @@ }; /* eTSEC 3/4 are currently broken - enet2: ethernet@26000 { - cell-index = <2>; + ethernet@26000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -167,8 +143,9 @@ phy-handle = <&phy2>; }; - enet3: ethernet@27000 { - cell-index = <3>; + ethernet@27000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -180,8 +157,7 @@ }; */ - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; // reg base, size @@ -190,8 +166,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; // reg base, size @@ -218,8 +193,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci@e0008000 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x4 (PCIX Slot 2) */ @@ -368,8 +342,7 @@ }; }; - pci1: pci@e0009000 { - cell-index = <1>; + pci@e0009000 { interrupt-map-mask = ; interrupt-map = < @@ -393,8 +366,7 @@ device_type = "pci"; }; - pci2: pcie@e000a000 { - cell-index = <2>; + pcie@e000a000 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc8555cds.dts b/trunk/arch/powerpc/boot/dts/mpc8555cds.dts index 4538f3c38862..57029cca32b2 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8555cds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8555cds.dts @@ -16,15 +16,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -72,9 +63,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -85,9 +74,9 @@ mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = <5 1>; @@ -102,8 +91,9 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -114,8 +104,9 @@ phy-handle = <&phy0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; @@ -126,8 +117,7 @@ phy-handle = <&phy1>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; // reg base, size @@ -136,8 +126,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; // reg base, size @@ -194,8 +183,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci1: pci@e0008000 { interrupt-map-mask = <1f800 0 0 7>; interrupt-map = < @@ -262,12 +250,11 @@ #interrupt-cells = <2>; compatible = "chrp,iic"; interrupts = <1>; - interrupt-parent = <&pci0>; + interrupt-parent = <&pci1>; }; }; - pci1: pci@e0009000 { - cell-index = <1>; + pci@e0009000 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc8560ads.dts b/trunk/arch/powerpc/boot/dts/mpc8560ads.dts index 639ce8a709a6..6b362f8222c1 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8560ads.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8560ads.dts @@ -16,16 +16,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - ethernet2 = &enet2; - ethernet3 = &enet3; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -73,11 +63,11 @@ }; mdio@24520 { + device_type = "mdio"; + compatible = "gianfar"; + reg = <24520 20>; #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; - reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = <5 1>; @@ -104,24 +94,36 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <1d 2 1e 2 22 2>; interrupt-parent = <&mpic>; phy-handle = <&phy0>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <25000 1000>; + /* + * address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <23 2 24 2 28 2>; interrupt-parent = <&mpic>; @@ -172,7 +174,7 @@ compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic"; }; - serial0: serial@91a00 { + serial@91a00 { device_type = "serial"; compatible = "fsl,mpc8560-scc-uart", "fsl,cpm2-scc-uart"; @@ -184,7 +186,7 @@ interrupt-parent = <&cpmpic>; }; - serial1: serial@91a20 { + serial@91a20 { device_type = "serial"; compatible = "fsl,mpc8560-scc-uart", "fsl,cpm2-scc-uart"; @@ -196,11 +198,17 @@ interrupt-parent = <&cpmpic>; }; - enet2: ethernet@91320 { + ethernet@91320 { device_type = "network"; compatible = "fsl,mpc8560-fcc-enet", "fsl,cpm2-fcc-enet"; reg = <91320 20 88500 100 913b0 1>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; fsl,cpm-command = <16200300>; interrupts = <21 8>; @@ -208,11 +216,17 @@ phy-handle = <&phy2>; }; - enet3: ethernet@91340 { + ethernet@91340 { device_type = "network"; compatible = "fsl,mpc8560-fcc-enet", "fsl,cpm2-fcc-enet"; reg = <91340 20 88600 100 913d0 1>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; fsl,cpm-command = <1a400300>; interrupts = <22 8>; @@ -222,8 +236,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci@e0008000 { #interrupt-cells = <1>; #size-cells = <2>; #address-cells = <3>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8568mds.dts b/trunk/arch/powerpc/boot/dts/mpc8568mds.dts index 5818a7c861e7..54394372b12a 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8568mds.dts @@ -20,17 +20,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - ethernet2 = &enet2; - ethernet3 = &enet3; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -85,7 +74,7 @@ i2c@3000 { #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -101,7 +90,7 @@ i2c@3100 { #address-cells = <1>; #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = <2b 2>; @@ -112,9 +101,9 @@ mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@7 { interrupt-parent = <&mpic>; interrupts = <1 1>; @@ -141,32 +130,45 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; reg = <24000 1000>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <1d 2 1e 2 22 2>; interrupt-parent = <&mpic>; phy-handle = <&phy2>; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; reg = <25000 1000>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <23 2 24 2 28 2>; interrupt-parent = <&mpic>; phy-handle = <&phy3>; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -181,8 +183,7 @@ fsl,has-rstcr; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -317,35 +318,45 @@ mode = "cpu"; }; - enet2: ucc@2000 { + ucc@2000 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <1>; device-id = <1>; reg = <2000 200>; interrupts = <20>; interrupt-parent = <&qeic>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "none"; - tx-clock-name = "clk16"; + rx-clock = <0>; + tx-clock = <20>; pio-handle = <&pio1>; phy-handle = <&phy0>; phy-connection-type = "rgmii-id"; }; - enet3: ucc@3000 { + ucc@3000 { device_type = "network"; compatible = "ucc_geth"; model = "UCC"; - cell-index = <2>; device-id = <2>; reg = <3000 200>; interrupts = <21>; interrupt-parent = <&qeic>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; - rx-clock-name = "none"; - tx-clock-name = "clk16"; + rx-clock = <0>; + tx-clock = <20>; pio-handle = <&pio2>; phy-handle = <&phy1>; phy-connection-type = "rgmii-id"; @@ -355,6 +366,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <2120 18>; + device_type = "mdio"; compatible = "ucc_geth_phy"; /* These are the same PHYs as on @@ -398,8 +410,7 @@ }; - pci0: pci@e0008000 { - cell-index = <0>; + pci@e0008000 { interrupt-map-mask = ; interrupt-map = < /* IDSEL 0x12 AD18 */ @@ -429,8 +440,7 @@ }; /* PCI Express */ - pci1: pcie@e000a000 { - cell-index = <2>; + pcie@e000a000 { interrupt-map-mask = ; interrupt-map = < diff --git a/trunk/arch/powerpc/boot/dts/mpc8572ds.dts b/trunk/arch/powerpc/boot/dts/mpc8572ds.dts index 233e0d5a8b9d..0eb44fb9647d 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8572ds.dts @@ -15,18 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - ethernet2 = &enet2; - ethernet3 = &enet3; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - pci2 = &pci2; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -81,9 +69,7 @@ }; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -92,9 +78,7 @@ }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = <2b 2>; @@ -105,9 +89,9 @@ mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = ; @@ -130,8 +114,9 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -143,8 +128,9 @@ phy-connection-type = "rgmii-id"; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -156,8 +142,9 @@ phy-connection-type = "rgmii-id"; }; - enet2: ethernet@26000 { - cell-index = <2>; + ethernet@26000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -169,8 +156,9 @@ phy-connection-type = "rgmii-id"; }; - enet3: ethernet@27000 { - cell-index = <3>; + ethernet@27000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "eTSEC"; compatible = "gianfar"; @@ -182,8 +170,7 @@ phy-connection-type = "rgmii-id"; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -192,8 +179,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -220,8 +206,7 @@ }; }; - pci0: pcie@ffe08000 { - cell-index = <0>; + pcie@ffe08000 { compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #interrupt-cells = <1>; @@ -430,8 +415,7 @@ }; - pci1: pcie@ffe09000 { - cell-index = <1>; + pcie@ffe09000 { compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #interrupt-cells = <1>; @@ -467,8 +451,7 @@ }; }; - pci2: pcie@ffe0a000 { - cell-index = <2>; + pcie@ffe0a000 { compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #interrupt-cells = <1>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 01040a752c82..966edf1161a6 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -15,13 +15,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -54,10 +47,10 @@ bus-frequency = <0>; i2c@3000 { + device_type = "i2c"; + compatible = "fsl-i2c"; #address-cells = <1>; #size-cells = <0>; - cell-index = <0>; - compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; interrupt-parent = <&mpic>; @@ -65,18 +58,17 @@ }; i2c@3100 { + device_type = "i2c"; + compatible = "fsl-i2c"; #address-cells = <1>; #size-cells = <0>; - cell-index = <1>; - compatible = "fsl-i2c"; reg = <3100 100>; interrupts = <2b 2>; interrupt-parent = <&mpic>; dfsrr; }; - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -85,8 +77,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -95,6 +86,7 @@ interrupt-parent = <&mpic>; }; + mpic: interrupt-controller@40000 { clock-frequency = <0>; interrupt-controller; @@ -113,8 +105,7 @@ }; }; - pci0: pci@e0008000 { - cell-index = <0>; + pci@e0008000 { compatible = "fsl,mpc8610-pci"; device_type = "pci"; #interrupt-cells = <1>; @@ -143,8 +134,7 @@ >; }; - pci1: pcie@e000a000 { - cell-index = <1>; + pcie@e000a000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>; diff --git a/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts index 86fc2280c16d..abb26dc42558 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts @@ -16,17 +16,6 @@ #address-cells = <1>; #size-cells = <1>; - aliases { - ethernet0 = &enet0; - ethernet1 = &enet1; - ethernet2 = &enet2; - ethernet3 = &enet3; - serial0 = &serial0; - serial1 = &serial1; - pci0 = &pci0; - pci1 = &pci1; - }; - cpus { #address-cells = <1>; #size-cells = <0>; @@ -69,9 +58,7 @@ bus-frequency = <0>; i2c@3000 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <0>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3000 100>; interrupts = <2b 2>; @@ -80,9 +67,7 @@ }; i2c@3100 { - #address-cells = <1>; - #size-cells = <0>; - cell-index = <1>; + device_type = "i2c"; compatible = "fsl-i2c"; reg = <3100 100>; interrupts = <2b 2>; @@ -93,9 +78,9 @@ mdio@24520 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,gianfar-mdio"; + device_type = "mdio"; + compatible = "gianfar"; reg = <24520 20>; - phy0: ethernet-phy@0 { interrupt-parent = <&mpic>; interrupts = ; @@ -122,12 +107,19 @@ }; }; - enet0: ethernet@24000 { - cell-index = <0>; + ethernet@24000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <24000 1000>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <1d 2 1e 2 22 2>; interrupt-parent = <&mpic>; @@ -135,12 +127,19 @@ phy-connection-type = "rgmii-id"; }; - enet1: ethernet@25000 { - cell-index = <1>; + ethernet@25000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <25000 1000>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <23 2 24 2 28 2>; interrupt-parent = <&mpic>; @@ -148,12 +147,19 @@ phy-connection-type = "rgmii-id"; }; - enet2: ethernet@26000 { - cell-index = <2>; + ethernet@26000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <26000 1000>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <1F 2 20 2 21 2>; interrupt-parent = <&mpic>; @@ -161,21 +167,26 @@ phy-connection-type = "rgmii-id"; }; - enet3: ethernet@27000 { - cell-index = <3>; + ethernet@27000 { + #address-cells = <1>; + #size-cells = <0>; device_type = "network"; model = "TSEC"; compatible = "gianfar"; reg = <27000 1000>; + /* + * mac-address is deprecated and will be removed + * in 2.6.25. Only recent versions of + * U-Boot support local-mac-address, however. + */ + mac-address = [ 00 00 00 00 00 00 ]; local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <25 2 26 2 27 2>; interrupt-parent = <&mpic>; phy-handle = <&phy3>; phy-connection-type = "rgmii-id"; }; - - serial0: serial@4500 { - cell-index = <0>; + serial@4500 { device_type = "serial"; compatible = "ns16550"; reg = <4500 100>; @@ -184,8 +195,7 @@ interrupt-parent = <&mpic>; }; - serial1: serial@4600 { - cell-index = <1>; + serial@4600 { device_type = "serial"; compatible = "ns16550"; reg = <4600 100>; @@ -212,8 +222,7 @@ }; }; - pci0: pcie@f8008000 { - cell-index = <0>; + pcie@f8008000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>; @@ -421,8 +430,7 @@ }; - pci1: pcie@f8009000 { - cell-index = <1>; + pcie@f8009000 { compatible = "fsl,mpc8641-pcie"; device_type = "pci"; #interrupt-cells = <1>; diff --git a/trunk/arch/powerpc/boot/dts/mpc866ads.dts b/trunk/arch/powerpc/boot/dts/mpc866ads.dts index daf9433e906b..90f2293ed3cd 100644 --- a/trunk/arch/powerpc/boot/dts/mpc866ads.dts +++ b/trunk/arch/powerpc/boot/dts/mpc866ads.dts @@ -12,7 +12,7 @@ / { model = "MPC866ADS"; - compatible = "fsl,mpc866ads"; + compatible = "mpc8xx"; #address-cells = <1>; #size-cells = <1>; @@ -23,15 +23,15 @@ PowerPC,866@0 { device_type = "cpu"; reg = <0>; - d-cache-line-size = <10>; // 16 bytes - i-cache-line-size = <10>; // 16 bytes + d-cache-line-size = <20>; // 32 bytes + i-cache-line-size = <20>; // 32 bytes d-cache-size = <2000>; // L1, 8K i-cache-size = <4000>; // L1, 16K timebase-frequency = <0>; bus-frequency = <0>; clock-frequency = <0>; interrupts = ; // decrementer interrupt - interrupt-parent = <&PIC>; + interrupt-parent = <&Mpc8xx_pic>; }; }; @@ -40,139 +40,107 @@ reg = <00000000 800000>; }; - localbus@ff000100 { - compatible = "fsl,mpc866-localbus", "fsl,pq1-localbus"; - #address-cells = <2>; - #size-cells = <1>; - reg = ; - - ranges = < - 1 0 ff080000 00008000 - 5 0 ff0a0000 00008000 - >; - - board-control@1,0 { - reg = <1 0 20 5 300 4>; - compatible = "fsl,mpc866ads-bcsr"; - }; - }; - - soc@ff000000 { + soc866@ff000000 { #address-cells = <1>; #size-cells = <1>; device_type = "soc"; ranges = <0 ff000000 00100000>; reg = ; bus-frequency = <0>; - - mdio@e00 { - compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio"; - reg = ; + mdio@e80 { + device_type = "mdio"; + compatible = "fs_enet"; + reg = ; #address-cells = <1>; #size-cells = <0>; - PHY: ethernet-phy@f { + phy: ethernet-phy@f { reg = ; device_type = "ethernet-phy"; }; }; - ethernet@e00 { + fec@e00 { device_type = "network"; - compatible = "fsl,mpc866-fec-enet", - "fsl,pq1-fec-enet"; + compatible = "fs_enet"; + model = "FEC"; + device-id = <1>; reg = ; - local-mac-address = [ 00 00 00 00 00 00 ]; + mac-address = [ 00 00 0C 00 01 FD ]; interrupts = <3 1>; - interrupt-parent = <&PIC>; - phy-handle = <&PHY>; - linux,network-index = <0>; + interrupt-parent = <&Mpc8xx_pic>; + phy-handle = <&Phy>; }; - PIC: pic@0 { + mpc8xx_pic: pic@ff000000 { interrupt-controller; + #address-cells = <0>; #interrupt-cells = <2>; reg = <0 24>; - compatible = "fsl,mpc866-pic", "fsl,pq1-pic"; + device_type = "mpc8xx-pic"; + compatible = "CPM"; }; - cpm@9c0 { + cpm@ff000000 { #address-cells = <1>; #size-cells = <1>; - compatible = "fsl,mpc866-cpm", "fsl,cpm1"; - ranges; - reg = <9c0 40>; + device_type = "cpm"; + model = "CPM"; + ranges = <0 0 4000>; + reg = <860 f0>; + command-proc = <9c0>; brg-frequency = <0>; interrupts = <0 2>; // cpm error interrupt - interrupt-parent = <&CPM_PIC>; + interrupt-parent = <&Cpm_pic>; - muram@2000 { - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 2000 2000>; - - data@0 { - compatible = "fsl,cpm-muram-data"; - reg = <0 1c00>; - }; - }; - - brg@9f0 { - compatible = "fsl,mpc866-brg", - "fsl,cpm1-brg", - "fsl,cpm-brg"; - reg = <9f0 10>; - clock-frequency = <0>; - }; - - CPM_PIC: pic@930 { + cpm_pic: pic@930 { interrupt-controller; #address-cells = <0>; - #interrupt-cells = <1>; + #interrupt-cells = <2>; interrupts = <5 2 0 2>; - interrupt-parent = <&PIC>; + interrupt-parent = <&Mpc8xx_pic>; reg = <930 20>; - compatible = "fsl,mpc866-cpm-pic", - "fsl,cpm1-pic"; + device_type = "cpm-pic"; + compatible = "CPM"; }; - - serial@a80 { + smc@a80 { device_type = "serial"; - compatible = "fsl,mpc866-smc-uart", - "fsl,cpm1-smc-uart"; + compatible = "cpm_uart"; + model = "SMC"; + device-id = <1>; reg = ; - interrupts = <4>; - interrupt-parent = <&CPM_PIC>; - fsl,cpm-brg = <1>; - fsl,cpm-command = <0090>; + clock-setup = <00ffffff 0>; + rx-clock = <1>; + tx-clock = <1>; + current-speed = <0>; + interrupts = <4 3>; + interrupt-parent = <&Cpm_pic>; }; - serial@a90 { + smc@a90 { device_type = "serial"; - compatible = "fsl,mpc866-smc-uart", - "fsl,cpm1-smc-uart"; - reg = ; - interrupts = <3>; - interrupt-parent = <&CPM_PIC>; - fsl,cpm-brg = <2>; - fsl,cpm-command = <00d0>; + compatible = "cpm_uart"; + model = "SMC"; + device-id = <2>; + reg = ; + clock-setup = ; + rx-clock = <2>; + tx-clock = <2>; + current-speed = <0>; + interrupts = <3 3>; + interrupt-parent = <&Cpm_pic>; }; - ethernet@a00 { + scc@a00 { device_type = "network"; - compatible = "fsl,mpc866-scc-enet", - "fsl,cpm1-scc-enet"; - reg = ; - local-mac-address = [ 00 00 00 00 00 00 ]; - interrupts = <1e>; - interrupt-parent = <&CPM_PIC>; - fsl,cpm-command = <0000>; - linux,network-index = <1>; + compatible = "fs_enet"; + model = "SCC"; + device-id = <1>; + reg = ; + mac-address = [ 00 00 0C 00 03 FD ]; + interrupts = <1e 3>; + interrupt-parent = <&Cpm_pic>; }; }; }; - - chosen { - linux,stdout-path = "/soc/cpm/serial@a80"; - }; }; diff --git a/trunk/arch/powerpc/configs/mpc837x_mds_defconfig b/trunk/arch/powerpc/configs/mpc837x_mds_defconfig deleted file mode 100644 index 4f49aee5da66..000000000000 --- a/trunk/arch/powerpc/configs/mpc837x_mds_defconfig +++ /dev/null @@ -1,878 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.23 -# Wed Oct 10 16:31:39 2007 -# -# CONFIG_PPC64 is not set - -# -# Processor support -# -CONFIG_6xx=y -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_8xx is not set -# CONFIG_40x is not set -# CONFIG_44x is not set -# CONFIG_E200 is not set -CONFIG_83xx=y -CONFIG_PPC_FPU=y -CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_32=y -# CONFIG_PPC_MM_SLICES is not set -# CONFIG_SMP is not set -CONFIG_PPC32=y -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_IRQ_PER_CPU=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_ARCH_HAS_ILOG2_U32=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -# CONFIG_ARCH_NO_VIRT_TO_BUS is not set -CONFIG_PPC=y -CONFIG_EARLY_PRINTK=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_PPC_OF=y -CONFIG_OF=y -CONFIG_PPC_UDBG_16550=y -# CONFIG_GENERIC_TBSYNC is not set -CONFIG_AUDIT_ARCH=y -CONFIG_GENERIC_BUG=y -CONFIG_DEFAULT_UIMAGE=y -# CONFIG_PPC_DCR_NATIVE is not set -# CONFIG_PPC_DCR_MMIO is not set -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" - -# -# General setup -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_USER_NS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED=y -# CONFIG_RELAY is not set -CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y -CONFIG_EMBEDDED=y -CONFIG_SYSCTL_SYSCALL=y -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -# CONFIG_EPOLL is not set -CONFIG_SIGNALFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set -CONFIG_RT_MUTEXES=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set -CONFIG_BLOCK=y -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set -# CONFIG_BLK_DEV_BSG is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Platform support -# -# CONFIG_PPC_MULTIPLATFORM is not set -# CONFIG_EMBEDDED6xx is not set -# CONFIG_PPC_82xx is not set -CONFIG_PPC_83xx=y -# CONFIG_PPC_86xx is not set -# CONFIG_PPC_MPC52xx is not set -# CONFIG_PPC_MPC5200 is not set -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_PQ2ADS is not set -# CONFIG_MPC8313_RDB is not set -# CONFIG_MPC832x_MDS is not set -# CONFIG_MPC832x_RDB is not set -# CONFIG_MPC834x_MDS is not set -# CONFIG_MPC834x_ITX is not set -# CONFIG_MPC836x_MDS is not set -CONFIG_MPC837x_MDS=y -CONFIG_PPC_MPC837x=y -# CONFIG_MPIC is not set -# CONFIG_MPIC_WEIRD is not set -# CONFIG_PPC_I8259 is not set -# CONFIG_PPC_RTAS is not set -# CONFIG_MMIO_NVRAM is not set -# CONFIG_PPC_MPC106 is not set -# CONFIG_PPC_970_NAP is not set -# CONFIG_PPC_INDIRECT_IO is not set -# CONFIG_GENERIC_IOMAP is not set -# CONFIG_CPU_FREQ is not set -# CONFIG_CPM2 is not set -# CONFIG_FSL_ULI1575 is not set -CONFIG_FSL_SERDES=y - -# -# Kernel options -# -# CONFIG_HIGHMEM is not set -# CONFIG_HZ_100 is not set -CONFIG_HZ_250=y -# CONFIG_HZ_300 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=250 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_POPULATES_NODE_MAP=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -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_BOUNCE=y -CONFIG_VIRT_TO_BUS=y -CONFIG_PROC_DEVICETREE=y -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PM is not set -CONFIG_SUSPEND_UP_POSSIBLE=y -CONFIG_HIBERNATION_UP_POSSIBLE=y -CONFIG_SECCOMP=y -CONFIG_WANT_DEVICE_TREE=y -CONFIG_DEVICE_TREE="" -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_ZONE_DMA=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_FSL_SOC=y -# CONFIG_PCI is not set -# CONFIG_PCI_DOMAINS is not set -# CONFIG_PCI_SYSCALL is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# -CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD=0x00800000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -# 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 -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -# CONFIG_INET_TUNNEL is not set -CONFIG_INET_XFRM_MODE_TRANSPORT=y -CONFIG_INET_XFRM_MODE_TUNNEL=y -CONFIG_INET_XFRM_MODE_BEET=y -CONFIG_INET_DIAG=y -CONFIG_INET_TCP_DIAG=y -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IPV6 is not set -# CONFIG_INET6_XFRM_TUNNEL is not set -# CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set -# CONFIG_NETFILTER is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set - -# -# Wireless -# -# CONFIG_CFG80211 is not set -# CONFIG_WIRELESS_EXT is not set -# CONFIG_MAC80211 is not set -# CONFIG_IEEE80211 is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set -# CONFIG_SYS_HYPERVISOR is not set -# CONFIG_CONNECTOR is not set -# CONFIG_MTD is not set -CONFIG_OF_DEVICE=y -# CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=y -# CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=32768 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -CONFIG_MISC_DEVICES=y -# CONFIG_EEPROM_93CX6 is not set -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=y -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_TGT is not set -# CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=y -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -CONFIG_CHR_DEV_SG=y -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set -CONFIG_SCSI_WAIT_SCAN=m - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_DEBUG is not set -CONFIG_ATA=y -# CONFIG_ATA_NONSTANDARD is not set -CONFIG_SATA_FSL=y -# CONFIG_PATA_PLATFORM is not set -# CONFIG_MD is not set -# CONFIG_MACINTOSH_DRIVERS is not set -CONFIG_NETDEVICES=y -# CONFIG_NETDEVICES_MULTIQUEUE is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_MACVLAN is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -CONFIG_PHYLIB=y - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=y -# CONFIG_DAVICOM_PHY is not set -# CONFIG_QSEMI_PHY is not set -# CONFIG_LXT_PHY is not set -# CONFIG_CICADA_PHY is not set -# CONFIG_VITESSE_PHY is not set -# CONFIG_SMSC_PHY is not set -# CONFIG_BROADCOM_PHY is not set -# CONFIG_ICPLUS_PHY is not set -# CONFIG_FIXED_PHY is not set -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_NETDEV_1000=y -CONFIG_GIANFAR=y -# CONFIG_GFAR_NAPI is not set -CONFIG_NETDEV_10000=y - -# -# Wireless LAN -# -# CONFIG_WLAN_PRE80211 is not set -# CONFIG_WLAN_80211 is not set -# CONFIG_WAN is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_ISDN is not set -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y -# CONFIG_INPUT_FF_MEMLESS is not set -# CONFIG_INPUT_POLLDEV is not set - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TABLET is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -# CONFIG_SERIAL_UARTLITE is not set -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_OF_PLATFORM is not set -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_IPMI_HANDLER is not set -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -CONFIG_83xx_WDT=y -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -CONFIG_GEN_RTC=y -# CONFIG_GEN_RTC_X is not set -# CONFIG_R3964 is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=y - -# -# I2C Algorithms -# -# CONFIG_I2C_ALGOBIT is not set -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -CONFIG_I2C_MPC=y -# CONFIG_I2C_OCORES is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_SIMTEC is not set -# CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_STUB is not set - -# -# Miscellaneous I2C Chip support -# -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set -# CONFIG_DS1682 is not set -# CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set -# CONFIG_SENSORS_PCF8591 is not set -# CONFIG_SENSORS_M41T00 is not set -# CONFIG_SENSORS_MAX6875 is not set -# CONFIG_SENSORS_TSL2550 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set -# CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set -CONFIG_HWMON=y -# CONFIG_HWMON_VID is not set -# CONFIG_SENSORS_ABITUGURU is not set -# CONFIG_SENSORS_ABITUGURU3 is not set -# CONFIG_SENSORS_AD7418 is not set -# CONFIG_SENSORS_ADM1021 is not set -# CONFIG_SENSORS_ADM1025 is not set -# CONFIG_SENSORS_ADM1026 is not set -# CONFIG_SENSORS_ADM1029 is not set -# CONFIG_SENSORS_ADM1031 is not set -# CONFIG_SENSORS_ADM9240 is not set -# CONFIG_SENSORS_ASB100 is not set -# CONFIG_SENSORS_ATXP1 is not set -# CONFIG_SENSORS_DS1621 is not set -# CONFIG_SENSORS_F71805F is not set -# CONFIG_SENSORS_FSCHER is not set -# CONFIG_SENSORS_FSCPOS is not set -# CONFIG_SENSORS_GL518SM is not set -# CONFIG_SENSORS_GL520SM is not set -# CONFIG_SENSORS_IT87 is not set -# CONFIG_SENSORS_LM63 is not set -# CONFIG_SENSORS_LM75 is not set -# CONFIG_SENSORS_LM77 is not set -# CONFIG_SENSORS_LM78 is not set -# CONFIG_SENSORS_LM80 is not set -# CONFIG_SENSORS_LM83 is not set -# CONFIG_SENSORS_LM85 is not set -# CONFIG_SENSORS_LM87 is not set -# CONFIG_SENSORS_LM90 is not set -# CONFIG_SENSORS_LM92 is not set -# CONFIG_SENSORS_LM93 is not set -# CONFIG_SENSORS_MAX1619 is not set -# CONFIG_SENSORS_MAX6650 is not set -# CONFIG_SENSORS_PC87360 is not set -# CONFIG_SENSORS_PC87427 is not set -# CONFIG_SENSORS_DME1737 is not set -# CONFIG_SENSORS_SMSC47M1 is not set -# CONFIG_SENSORS_SMSC47M192 is not set -# CONFIG_SENSORS_SMSC47B397 is not set -# CONFIG_SENSORS_THMC50 is not set -# CONFIG_SENSORS_VT1211 is not set -# CONFIG_SENSORS_W83781D is not set -# CONFIG_SENSORS_W83791D is not set -# CONFIG_SENSORS_W83792D is not set -# CONFIG_SENSORS_W83793 is not set -# CONFIG_SENSORS_W83L785TS is not set -# CONFIG_SENSORS_W83627HF is not set -# CONFIG_SENSORS_W83627EHF is not set -# CONFIG_HWMON_DEBUG_CHIP is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_SM501 is not set - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -CONFIG_DAB=y - -# -# Graphics support -# -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set -# CONFIG_VGASTATE is not set -CONFIG_VIDEO_OUTPUT_CONTROL=m -# CONFIG_FB is not set -# CONFIG_FB_IBM_GXT4500 is not set - -# -# Sound -# -# CONFIG_SOUND is not set -CONFIG_HID_SUPPORT=y -CONFIG_HID=y -# CONFIG_HID_DEBUG is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_ARCH_HAS_HCD=y -# CONFIG_USB_ARCH_HAS_OHCI is not set -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set -# CONFIG_MMC is not set -# CONFIG_NEW_LEDS is not set -# CONFIG_EDAC is not set -# CONFIG_RTC_CLASS is not set - -# -# DMA Engine support -# -# CONFIG_DMA_ENGINE is not set - -# -# DMA Clients -# - -# -# DMA Devices -# - -# -# Userspace I/O -# -# CONFIG_UIO is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -CONFIG_EXT3_FS_XATTR=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set -# CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_FS_MBCACHE=y -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_PROC_SYSCTL=y -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -# CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set -# CONFIG_SYSV68_PARTITION is not set - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set -# CONFIG_UCC_SLOW is not set - -# -# Library routines -# -CONFIG_BITREVERSE=y -# CONFIG_CRC_CCITT is not set -# CONFIG_CRC16 is not set -# CONFIG_CRC_ITU_T is not set -CONFIG_CRC32=y -# CONFIG_CRC7 is not set -# CONFIG_LIBCRC32C is not set -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_KERNEL is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_MANAGER=y -# CONFIG_CRYPTO_HMAC is not set -# CONFIG_CRYPTO_XCBC is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -# 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_CRYPTD 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 -# CONFIG_CRYPTO_AES is not set -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_ARC4 is not set -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -# 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 -CONFIG_CRYPTO_HW=y diff --git a/trunk/arch/powerpc/kernel/cputable.c b/trunk/arch/powerpc/kernel/cputable.c index 7c21f52d982a..9ed351f3c966 100644 --- a/trunk/arch/powerpc/kernel/cputable.c +++ b/trunk/arch/powerpc/kernel/cputable.c @@ -888,7 +888,7 @@ static struct cpu_spec __initdata cpu_specs[] = { .cpu_setup = __setup_cpu_603, .platform = "ppc603", }, - { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */ + { /* e300c3 on 83xx */ .pvr_mask = 0x7fff0000, .pvr_value = 0x00850000, .cpu_name = "e300c3", @@ -899,17 +899,6 @@ static struct cpu_spec __initdata cpu_specs[] = { .cpu_setup = __setup_cpu_603, .platform = "ppc603", }, - { /* e300c4 (e300c1, plus one IU) */ - .pvr_mask = 0x7fff0000, - .pvr_value = 0x00860000, - .cpu_name = "e300c4", - .cpu_features = CPU_FTRS_E300, - .cpu_user_features = COMMON_USER, - .icache_bsize = 32, - .dcache_bsize = 32, - .cpu_setup = __setup_cpu_603, - .platform = "ppc603", - }, { /* default match, we assume split I/D cache & TB (non-601)... */ .pvr_mask = 0x00000000, .pvr_value = 0x00000000, diff --git a/trunk/arch/powerpc/kernel/traps.c b/trunk/arch/powerpc/kernel/traps.c index cad64840fce4..59c464e26f38 100644 --- a/trunk/arch/powerpc/kernel/traps.c +++ b/trunk/arch/powerpc/kernel/traps.c @@ -622,9 +622,6 @@ static void parse_fpe(struct pt_regs *regs) #define INST_POPCNTB 0x7c0000f4 #define INST_POPCNTB_MASK 0xfc0007fe -#define INST_ISEL 0x7c00001e -#define INST_ISEL_MASK 0xfc00003e - static int emulate_string_inst(struct pt_regs *regs, u32 instword) { u8 rT = (instword >> 21) & 0x1f; @@ -710,23 +707,6 @@ static int emulate_popcntb_inst(struct pt_regs *regs, u32 instword) return 0; } -static int emulate_isel(struct pt_regs *regs, u32 instword) -{ - u8 rT = (instword >> 21) & 0x1f; - u8 rA = (instword >> 16) & 0x1f; - u8 rB = (instword >> 11) & 0x1f; - u8 BC = (instword >> 6) & 0x1f; - u8 bit; - unsigned long tmp; - - tmp = (rA == 0) ? 0 : regs->gpr[rA]; - bit = (regs->ccr >> (31 - BC)) & 0x1; - - regs->gpr[rT] = bit ? tmp : regs->gpr[rB]; - - return 0; -} - static int emulate_instruction(struct pt_regs *regs) { u32 instword; @@ -769,11 +749,6 @@ static int emulate_instruction(struct pt_regs *regs) return emulate_popcntb_inst(regs, instword); } - /* Emulate isel (Integer Select) instruction */ - if ((instword & INST_ISEL_MASK) == INST_ISEL) { - return emulate_isel(regs, instword); - } - return -EINVAL; } diff --git a/trunk/arch/powerpc/platforms/82xx/pq2fads.c b/trunk/arch/powerpc/platforms/82xx/pq2fads.c index 1be500501806..4f457a9c79ae 100644 --- a/trunk/arch/powerpc/platforms/82xx/pq2fads.c +++ b/trunk/arch/powerpc/platforms/82xx/pq2fads.c @@ -15,12 +15,12 @@ #include #include #include -#include #include #include #include #include +#include #include #include diff --git a/trunk/arch/powerpc/platforms/83xx/Kconfig b/trunk/arch/powerpc/platforms/83xx/Kconfig index 2430ac840493..ec305f18abd8 100644 --- a/trunk/arch/powerpc/platforms/83xx/Kconfig +++ b/trunk/arch/powerpc/platforms/83xx/Kconfig @@ -50,11 +50,6 @@ config MPC836x_MDS help This option enables support for the MPC836x MDS Processor Board. -config MPC837x_MDS - bool "Freescale MPC837x MDS" - select DEFAULT_UIMAGE - help - This option enables support for the MPC837x MDS Processor Board. endchoice config PPC_MPC831x @@ -80,9 +75,3 @@ config PPC_MPC836x select PPC_UDBG_16550 select PPC_INDIRECT_PCI default y if MPC836x_MDS - -config PPC_MPC837x - bool - select PPC_UDBG_16550 - select PPC_INDIRECT_PCI - default y if MPC837x_MDS diff --git a/trunk/arch/powerpc/platforms/83xx/Makefile b/trunk/arch/powerpc/platforms/83xx/Makefile index df4662999a95..5a98f885779f 100644 --- a/trunk/arch/powerpc/platforms/83xx/Makefile +++ b/trunk/arch/powerpc/platforms/83xx/Makefile @@ -9,4 +9,3 @@ obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o -obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o diff --git a/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c index 6fb82993967c..33766b8f2594 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc8313_rdb.c @@ -70,9 +70,9 @@ void __init mpc8313_rdb_init_IRQ(void) */ static int __init mpc8313_rdb_probe(void) { - unsigned long root = of_get_flat_dt_root(); + unsigned long root = of_get_flat_dt_root(); - return of_flat_dt_is_compatible(root, "MPC8313ERDB"); + return of_flat_dt_is_compatible(root, "MPC8313ERDB"); } 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 1e570bb947fc..39ee7a13b25a 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc832x_mds.c @@ -23,9 +23,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c index ffb2e9361ce3..d4bd04001b99 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc832x_rdb.c @@ -19,8 +19,8 @@ #include #include #include -#include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c index 459fb7227e76..a81bb3ce6b94 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -107,30 +106,14 @@ static void __init mpc834x_mds_init_IRQ(void) ipic_set_default_priority(); } -static struct of_device_id mpc834x_ids[] = { - { .type = "soc", }, - { .compatible = "soc", }, - {}, -}; - -static int __init mpc834x_declare_of_platform_devices(void) -{ - if (!machine_is(mpc834x_mds)) - return 0; - - of_platform_bus_probe(NULL, mpc834x_ids, NULL); - return 0; -} -device_initcall(mpc834x_declare_of_platform_devices); - /* * Called very early, MMU is off, device-tree isn't unflattened */ static int __init mpc834x_mds_probe(void) { - unsigned long root = of_get_flat_dt_root(); + unsigned long root = of_get_flat_dt_root(); - return of_flat_dt_is_compatible(root, "MPC834xMDS"); + return of_flat_dt_is_compatible(root, "MPC834xMDS"); } define_machine(mpc834x_mds) { diff --git a/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c index 2ac9890b763c..e40012f8f488 100644 --- a/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/trunk/arch/powerpc/platforms/83xx/mpc836x_mds.c @@ -29,9 +29,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/83xx/mpc837x_mds.c b/trunk/arch/powerpc/platforms/83xx/mpc837x_mds.c deleted file mode 100644 index 166c1116b1ac..000000000000 --- a/trunk/arch/powerpc/platforms/83xx/mpc837x_mds.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * arch/powerpc/platforms/83xx/mpc837x_mds.c - * - * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved. - * - * MPC837x MDS board specific routines - * - * 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. - */ - -#include -#include -#include - -#include -#include -#include -#include - -#include "mpc83xx.h" - -#ifndef CONFIG_PCI -unsigned long isa_io_base = 0; -unsigned long isa_mem_base = 0; -#endif - -/* ************************************************************************ - * - * Setup the architecture - * - */ -static void __init mpc837x_mds_setup_arch(void) -{ -#ifdef CONFIG_PCI - struct device_node *np; -#endif - - if (ppc_md.progress) - ppc_md.progress("mpc837x_mds_setup_arch()", 0); - -#ifdef CONFIG_PCI - for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") - mpc83xx_add_bridge(np); -#endif -} - -static struct of_device_id mpc837x_ids[] = { - { .type = "soc", }, - { .compatible = "soc", }, - {}, -}; - -static int __init mpc837x_declare_of_platform_devices(void) -{ - if (!machine_is(mpc837x_mds)) - return 0; - - /* Publish of_device */ - of_platform_bus_probe(NULL, mpc837x_ids, NULL); - - return 0; -} -device_initcall(mpc837x_declare_of_platform_devices); - -static void __init mpc837x_mds_init_IRQ(void) -{ - struct device_node *np; - - np = of_find_compatible_node(NULL, NULL, "fsl,ipic"); - if (!np) - return; - - ipic_init(np, 0); - - /* Initialize the default interrupt mapping priorities, - * in case the boot rom changed something on us. - */ - ipic_set_default_priority(); -} - -/* - * Called very early, MMU is off, device-tree isn't unflattened - */ -static int __init mpc837x_mds_probe(void) -{ - unsigned long root = of_get_flat_dt_root(); - - return of_flat_dt_is_compatible(root, "fsl,mpc837xmds"); -} - -define_machine(mpc837x_mds) { - .name = "MPC837x MDS", - .probe = mpc837x_mds_probe, - .setup_arch = mpc837x_mds_setup_arch, - .init_IRQ = mpc837x_mds_init_IRQ, - .get_irq = ipic_get_irq, - .restart = mpc83xx_restart, - .time_init = mpc83xx_time_init, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -}; diff --git a/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c index e6c63a5b1efb..61b3eedf41b9 100644 --- a/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -30,9 +30,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/trunk/arch/powerpc/platforms/8xx/Kconfig b/trunk/arch/powerpc/platforms/8xx/Kconfig index 91fbe4241918..bd28655043a0 100644 --- a/trunk/arch/powerpc/platforms/8xx/Kconfig +++ b/trunk/arch/powerpc/platforms/8xx/Kconfig @@ -18,7 +18,6 @@ config MPC8XXFADS config MPC86XADS bool "MPC86XADS" select CPM1 - select PPC_CPM_NEW_BINDING help MPC86x Application Development System by Freescale Semiconductor. The MPC86xADS is meant to serve as a platform for s/w and h/w diff --git a/trunk/arch/powerpc/platforms/8xx/mpc86xads.h b/trunk/arch/powerpc/platforms/8xx/mpc86xads.h index 17b1fe75e0b2..cffa194ccf1f 100644 --- a/trunk/arch/powerpc/platforms/8xx/mpc86xads.h +++ b/trunk/arch/powerpc/platforms/8xx/mpc86xads.h @@ -15,6 +15,27 @@ #ifndef __ASM_MPC86XADS_H__ #define __ASM_MPC86XADS_H__ +#include + +/* U-Boot maps BCSR to 0xff080000 */ +#define BCSR_ADDR ((uint)0xff080000) +#define BCSR_SIZE ((uint)32) +#define BCSR0 ((uint)(BCSR_ADDR + 0x00)) +#define BCSR1 ((uint)(BCSR_ADDR + 0x04)) +#define BCSR2 ((uint)(BCSR_ADDR + 0x08)) +#define BCSR3 ((uint)(BCSR_ADDR + 0x0c)) +#define BCSR4 ((uint)(BCSR_ADDR + 0x10)) + +#define CFG_PHYDEV_ADDR ((uint)0xff0a0000) +#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300)) + +#define MPC8xx_CPM_OFFSET (0x9c0) +#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) +#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver + +#define PCMCIA_MEM_ADDR ((uint)0xff020000) +#define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) + /* Bits of interest in the BCSRs. */ #define BCSR1_ETHEN ((uint)0x20000000) @@ -43,5 +64,28 @@ #define BCSR5_MII1_EN 0x02 #define BCSR5_MII1_RST 0x01 +/* Interrupt level assignments */ +#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */ +#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */ +#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */ + +/* We don't use the 8259 */ +#define NR_8259_INTS 0 + +/* CPM Ethernet through SCC1 */ +#define PA_ENET_RXD ((ushort)0x0001) +#define PA_ENET_TXD ((ushort)0x0002) +#define PA_ENET_TCLK ((ushort)0x0100) +#define PA_ENET_RCLK ((ushort)0x0200) +#define PB_ENET_TENA ((uint)0x00001000) +#define PC_ENET_CLSN ((ushort)0x0010) +#define PC_ENET_RENA ((ushort)0x0020) + +/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to + * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero. + */ +#define SICR_ENET_MASK ((uint)0x000000ff) +#define SICR_ENET_CLKRT ((uint)0x0000002c) + #endif /* __ASM_MPC86XADS_H__ */ #endif /* __KERNEL__ */ diff --git a/trunk/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/trunk/arch/powerpc/platforms/8xx/mpc86xads_setup.c index d2927a434aef..49012835f453 100644 --- a/trunk/arch/powerpc/platforms/8xx/mpc86xads_setup.c +++ b/trunk/arch/powerpc/platforms/8xx/mpc86xads_setup.c @@ -6,134 +6,264 @@ * * Copyright 2005 MontaVista Software Inc. * - * Heavily modified by Scott Wood - * Copyright 2007 Freescale Semiconductor, Inc. - * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied. */ #include -#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include #include #include +#include +#include #include #include #include #include #include #include -#include +#include #include -#include "mpc86xads.h" - -struct cpm_pin { - int port, pin, flags; -}; - -static struct cpm_pin mpc866ads_pins[] = { - /* SMC1 */ - {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */ - {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */ - - /* SMC2 */ - {CPM_PORTB, 21, CPM_PIN_INPUT}, /* RX */ - {CPM_PORTB, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */ - - /* SCC1 */ - {CPM_PORTA, 6, CPM_PIN_INPUT}, /* CLK1 */ - {CPM_PORTA, 7, CPM_PIN_INPUT}, /* CLK2 */ - {CPM_PORTA, 14, CPM_PIN_INPUT}, /* TX */ - {CPM_PORTA, 15, CPM_PIN_INPUT}, /* RX */ - {CPM_PORTB, 19, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TENA */ - {CPM_PORTC, 10, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* RENA */ - {CPM_PORTC, 11, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* CLSN */ - - /* MII */ - {CPM_PORTD, 3, CPM_PIN_OUTPUT}, - {CPM_PORTD, 4, CPM_PIN_OUTPUT}, - {CPM_PORTD, 5, CPM_PIN_OUTPUT}, - {CPM_PORTD, 6, CPM_PIN_OUTPUT}, - {CPM_PORTD, 7, CPM_PIN_OUTPUT}, - {CPM_PORTD, 8, CPM_PIN_OUTPUT}, - {CPM_PORTD, 9, CPM_PIN_OUTPUT}, - {CPM_PORTD, 10, CPM_PIN_OUTPUT}, - {CPM_PORTD, 11, CPM_PIN_OUTPUT}, - {CPM_PORTD, 12, CPM_PIN_OUTPUT}, - {CPM_PORTD, 13, CPM_PIN_OUTPUT}, - {CPM_PORTD, 14, CPM_PIN_OUTPUT}, - {CPM_PORTD, 15, CPM_PIN_OUTPUT}, -}; +static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi); +static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi); +static void init_scc1_ioports(struct fs_platform_info* ptr); -static void __init init_ioports(void) +void __init mpc86xads_board_setup(void) { - int i; + cpm8xx_t *cp; + unsigned int *bcsr_io; + u8 tmpval8; - for (i = 0; i < ARRAY_SIZE(mpc866ads_pins); i++) { - struct cpm_pin *pin = &mpc866ads_pins[i]; - cpm1_set_pin(pin->port, pin->pin, pin->flags); + bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); + cp = (cpm8xx_t *)immr_map(im_cpm); + + if (bcsr_io == NULL) { + printk(KERN_CRIT "Could not remap BCSR\n"); + return; } +#ifdef CONFIG_SERIAL_CPM_SMC1 + clrbits32(bcsr_io, BCSR1_RS232EN_1); + clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */ + tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX); + out_8(&(cp->cp_smc[0].smc_smcm), tmpval8); + clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); +#else + setbits32(bcsr_io,BCSR1_RS232EN_1); + out_be16(&cp->cp_smc[0].smc_smcmr, 0); + out_8(&cp->cp_smc[0].smc_smce, 0); +#endif - cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX); - cpm1_clk_setup(CPM_CLK_SMC2, CPM_BRG2, CPM_CLK_RTX); - cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK1, CPM_CLK_TX); - cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK2, CPM_CLK_RX); +#ifdef CONFIG_SERIAL_CPM_SMC2 + clrbits32(bcsr_io,BCSR1_RS232EN_2); + clrbits32(&cp->cp_simode, 0xe0000000 >> 1); + setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */ + tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX); + out_8(&(cp->cp_smc[1].smc_smcm), tmpval8); + clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN); - /* Set FEC1 and FEC2 to MII mode */ - clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180); + init_smc2_uart_ioports(0); +#else + setbits32(bcsr_io,BCSR1_RS232EN_2); + out_be16(&cp->cp_smc[1].smc_smcmr, 0); + out_8(&cp->cp_smc[1].smc_smce, 0); +#endif + immr_unmap(cp); + iounmap(bcsr_io); } -static void __init mpc86xads_setup_arch(void) + +static void init_fec1_ioports(struct fs_platform_info* ptr) { - struct device_node *np; - u32 __iomem *bcsr_io; + iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); - cpm_reset(); - init_ioports(); + /* configure FEC1 pins */ - np = of_find_compatible_node(NULL, NULL, "fsl,mpc866ads-bcsr"); - if (!np) { - printk(KERN_CRIT "Could not find fsl,mpc866ads-bcsr node\n"); + setbits16(&io_port->iop_pdpar, 0x1fff); + setbits16(&io_port->iop_pddir, 0x1fff); + + immr_unmap(io_port); +} + +void init_fec_ioports(struct fs_platform_info *fpi) +{ + int fec_no = fs_get_fec_index(fpi->fs_no); + + switch (fec_no) { + case 0: + init_fec1_ioports(fpi); + break; + default: + printk(KERN_ERR "init_fec_ioports: invalid FEC number\n"); return; } +} - bcsr_io = of_iomap(np, 0); - of_node_put(np); +static void init_scc1_ioports(struct fs_platform_info* fpi) +{ + unsigned *bcsr_io; + iop8xx_t *io_port; + cpm8xx_t *cp; + + bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); + io_port = (iop8xx_t *)immr_map(im_ioport); + cp = (cpm8xx_t *)immr_map(im_cpm); if (bcsr_io == NULL) { printk(KERN_CRIT "Could not remap BCSR\n"); return; } - clrbits32(bcsr_io, BCSR1_RS232EN_1 | BCSR1_RS232EN_2 | BCSR1_ETHEN); + /* Configure port A pins for Txd and Rxd. + */ + setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD); + clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD); + clrbits16(&io_port->iop_paodr, PA_ENET_TXD); + + /* Configure port C pins to enable CLSN and RENA. + */ + clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA); + clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA); + setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA); + + /* Configure port A for TCLK and RCLK. + */ + setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK); + clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK); + clrbits32(&cp->cp_pbpar, PB_ENET_TENA); + clrbits32(&cp->cp_pbdir, PB_ENET_TENA); + + /* Configure Serial Interface clock routing. + * First, clear all SCC bits to zero, then set the ones we want. + */ + clrbits32(&cp->cp_sicr, SICR_ENET_MASK); + setbits32(&cp->cp_sicr, SICR_ENET_CLKRT); + + /* In the original SCC enet driver the following code is placed at + the end of the initialization */ + setbits32(&cp->cp_pbpar, PB_ENET_TENA); + setbits32(&cp->cp_pbdir, PB_ENET_TENA); + + clrbits32(bcsr_io+1, BCSR1_ETHEN); iounmap(bcsr_io); + immr_unmap(cp); + immr_unmap(io_port); } -static int __init mpc86xads_probe(void) +void init_scc_ioports(struct fs_platform_info *fpi) +{ + int scc_no = fs_get_scc_index(fpi->fs_no); + + switch (scc_no) { + case 0: + init_scc1_ioports(fpi); + break; + default: + printk(KERN_ERR "init_scc_ioports: invalid SCC number\n"); + return; + } +} + + + +static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr) { - unsigned long root = of_get_flat_dt_root(); - return of_flat_dt_is_compatible(root, "fsl,mpc866ads"); + unsigned *bcsr_io; + cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); + + setbits32(&cp->cp_pbpar, 0x000000c0); + clrbits32(&cp->cp_pbdir, 0x000000c0); + clrbits16(&cp->cp_pbodr, 0x00c0); + immr_unmap(cp); + + bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); + + if (bcsr_io == NULL) { + printk(KERN_CRIT "Could not remap BCSR1\n"); + return; + } + clrbits32(bcsr_io,BCSR1_RS232EN_1); + iounmap(bcsr_io); } -static struct of_device_id __initdata of_bus_ids[] = { - { .name = "soc", }, - { .name = "cpm", }, - { .name = "localbus", }, - {}, -}; +static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi) +{ + unsigned *bcsr_io; + cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); + + setbits32(&cp->cp_pbpar, 0x00000c00); + clrbits32(&cp->cp_pbdir, 0x00000c00); + clrbits16(&cp->cp_pbodr, 0x0c00); + immr_unmap(cp); + + bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); -static int __init declare_of_platform_devices(void) + if (bcsr_io == NULL) { + printk(KERN_CRIT "Could not remap BCSR1\n"); + return; + } + clrbits32(bcsr_io,BCSR1_RS232EN_2); + iounmap(bcsr_io); +} + +void init_smc_ioports(struct fs_uart_platform_info *data) { - if (machine_is(mpc86x_ads)) - of_platform_bus_probe(NULL, of_bus_ids, NULL); + int smc_no = fs_uart_id_fsid2smc(data->fs_no); + switch (smc_no) { + case 0: + init_smc1_uart_ioports(data); + data->brg = data->clk_rx; + break; + case 1: + init_smc2_uart_ioports(data); + data->brg = data->clk_rx; + break; + default: + printk(KERN_ERR "init_scc_ioports: invalid SCC number\n"); + return; + } +} + +int platform_device_skip(const char *model, int id) +{ return 0; } -device_initcall(declare_of_platform_devices); + +static void __init mpc86xads_setup_arch(void) +{ + cpm_reset(); + + mpc86xads_board_setup(); + + ROOT_DEV = Root_NFS; +} + +static int __init mpc86xads_probe(void) +{ + char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), + "model", NULL); + if (model == NULL) + return 0; + if (strcmp(model, "MPC866ADS")) + return 0; + + return 1; +} define_machine(mpc86x_ads) { .name = "MPC86x ADS", @@ -145,5 +275,4 @@ define_machine(mpc86x_ads) { .calibrate_decr = mpc8xx_calibrate_decr, .set_rtc_time = mpc8xx_set_rtc_time, .get_rtc_time = mpc8xx_get_rtc_time, - .progress = udbg_progress, }; diff --git a/trunk/arch/powerpc/platforms/cell/pmu.c b/trunk/arch/powerpc/platforms/cell/pmu.c index 1ed303678887..99d688e88cbe 100644 --- a/trunk/arch/powerpc/platforms/cell/pmu.c +++ b/trunk/arch/powerpc/platforms/cell/pmu.c @@ -213,7 +213,7 @@ u32 cbe_read_pm(u32 cpu, enum pm_reg_name reg) break; case pm_interval: - READ_SHADOW_REG(val, pm_interval); + READ_MMIO_UPPER32(val, pm_interval); break; case pm_start_stop: diff --git a/trunk/arch/powerpc/sysdev/commproc.c b/trunk/arch/powerpc/sysdev/commproc.c index 621bc6c1d408..f6a63780bbde 100644 --- a/trunk/arch/powerpc/sysdev/commproc.c +++ b/trunk/arch/powerpc/sysdev/commproc.c @@ -240,34 +240,6 @@ void __init cpm_reset(void) #endif } -static DEFINE_SPINLOCK(cmd_lock); - -#define MAX_CR_CMD_LOOPS 10000 - -int cpm_command(u32 command, u8 opcode) -{ - int i, ret; - unsigned long flags; - - if (command & 0xffffff0f) - return -EINVAL; - - spin_lock_irqsave(&cmd_lock, flags); - - ret = 0; - out_be16(&cpmp->cp_cpcr, command | CPM_CR_FLG | (opcode << 8)); - for (i = 0; i < MAX_CR_CMD_LOOPS; i++) - if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) - goto out; - - printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__); - ret = -EIO; -out: - spin_unlock_irqrestore(&cmd_lock, flags); - return ret; -} -EXPORT_SYMBOL(cpm_command); - /* We used to do this earlier, but have to postpone as long as possible * to ensure the kernel VM is now running. */ @@ -436,7 +408,7 @@ EXPORT_SYMBOL(cpm_dpram_phys); #endif /* !CONFIG_PPC_CPM_NEW_BINDING */ struct cpm_ioport16 { - __be16 dir, par, odr_sor, dat, intr; + __be16 dir, par, sor, dat, intr; __be16 res[3]; }; @@ -466,13 +438,6 @@ static void cpm1_set_pin32(int port, int pin, int flags) else clrbits32(&iop->par, pin); - if (port == CPM_PORTB) { - if (flags & CPM_PIN_OPENDRAIN) - setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin); - else - clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin); - } - if (port == CPM_PORTE) { if (flags & CPM_PIN_SECONDARY) setbits32(&iop->sor, pin); @@ -506,17 +471,11 @@ static void cpm1_set_pin16(int port, int pin, int flags) else clrbits16(&iop->par, pin); - if (port == CPM_PORTA) { - if (flags & CPM_PIN_OPENDRAIN) - setbits16(&iop->odr_sor, pin); - else - clrbits16(&iop->odr_sor, pin); - } if (port == CPM_PORTC) { if (flags & CPM_PIN_SECONDARY) - setbits16(&iop->odr_sor, pin); + setbits16(&iop->sor, pin); else - clrbits16(&iop->odr_sor, pin); + clrbits16(&iop->sor, pin); } } diff --git a/trunk/arch/powerpc/sysdev/cpm2_common.c b/trunk/arch/powerpc/sysdev/cpm2_common.c index 0a7054579d98..859362fecb7c 100644 --- a/trunk/arch/powerpc/sysdev/cpm2_common.c +++ b/trunk/arch/powerpc/sysdev/cpm2_common.c @@ -83,31 +83,6 @@ cpm2_reset(void) cpmp = &cpm2_immr->im_cpm; } -static DEFINE_SPINLOCK(cmd_lock); - -#define MAX_CR_CMD_LOOPS 10000 - -int cpm_command(u32 command, u8 opcode) -{ - int i, ret; - unsigned long flags; - - spin_lock_irqsave(&cmd_lock, flags); - - ret = 0; - out_be32(&cpmp->cp_cpcr, command | opcode | CPM_CR_FLG); - for (i = 0; i < MAX_CR_CMD_LOOPS; i++) - if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0) - goto out; - - printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__); - ret = -EIO; -out: - spin_unlock_irqrestore(&cmd_lock, flags); - return ret; -} -EXPORT_SYMBOL(cpm_command); - /* Set a baud rate generator. This needs lots of work. There are * eight BRGs, which can be connected to the CPM channels or output * as clocks. The BRGs are in two different block of internal diff --git a/trunk/arch/powerpc/sysdev/fsl_soc.c b/trunk/arch/powerpc/sysdev/fsl_soc.c index 4baad80ab731..3ace7474809e 100644 --- a/trunk/arch/powerpc/sysdev/fsl_soc.c +++ b/trunk/arch/powerpc/sysdev/fsl_soc.c @@ -132,18 +132,15 @@ EXPORT_SYMBOL(get_baudrate); static int __init gfar_mdio_of_init(void) { - struct device_node *np = NULL; + struct device_node *np; + unsigned int i; struct platform_device *mdio_dev; struct resource res; int ret; - np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio"); - - /* try the deprecated version */ - if (!np) - np = of_find_compatible_node(np, "mdio", "gianfar"); - - if (np) { + for (np = NULL, i = 0; + (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; + i++) { int k; struct device_node *child = NULL; struct gianfar_mdio_data mdio_data; @@ -182,13 +179,11 @@ static int __init gfar_mdio_of_init(void) goto unreg; } - of_node_put(np); return 0; unreg: platform_device_unregister(mdio_dev); err: - of_node_put(np); return ret; } @@ -395,11 +390,13 @@ static void __init of_register_i2c_devices(struct device_node *adap_node, static int __init fsl_i2c_of_init(void) { struct device_node *np; - unsigned int i = 0; + unsigned int i; struct platform_device *i2c_dev; int ret; - for_each_compatible_node(np, NULL, "fsl-i2c") { + for (np = NULL, i = 0; + (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; + i++) { struct resource r[2]; struct fsl_i2c_platform_data i2c_data; const unsigned char *flags = NULL; @@ -435,7 +432,7 @@ static int __init fsl_i2c_of_init(void) if (ret) goto unreg; - of_register_i2c_devices(np, i++); + of_register_i2c_devices(np, i); } return 0; diff --git a/trunk/arch/powerpc/sysdev/ipic.c b/trunk/arch/powerpc/sysdev/ipic.c index 7274750fd9c6..05a56e55804c 100644 --- a/trunk/arch/powerpc/sysdev/ipic.c +++ b/trunk/arch/powerpc/sysdev/ipic.c @@ -30,32 +30,11 @@ #include "ipic.h" static struct ipic * primary_ipic; -static struct irq_chip ipic_level_irq_chip, ipic_edge_irq_chip; static DEFINE_SPINLOCK(ipic_lock); static struct ipic_info ipic_info[] = { - [1] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_C, - .force = IPIC_SIFCR_H, - .bit = 16, - .prio_mask = 0, - }, - [2] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_C, - .force = IPIC_SIFCR_H, - .bit = 17, - .prio_mask = 1, - }, - [4] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_C, - .force = IPIC_SIFCR_H, - .bit = 19, - .prio_mask = 3, - }, [9] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_D, .force = IPIC_SIFCR_H, @@ -63,6 +42,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 0, }, [10] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_D, .force = IPIC_SIFCR_H, @@ -70,27 +50,15 @@ static struct ipic_info ipic_info[] = { .prio_mask = 1, }, [11] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_D, .force = IPIC_SIFCR_H, .bit = 26, .prio_mask = 2, }, - [12] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 27, - .prio_mask = 3, - }, - [13] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_D, - .force = IPIC_SIFCR_H, - .bit = 28, - .prio_mask = 4, - }, [14] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_D, .force = IPIC_SIFCR_H, @@ -98,6 +66,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 5, }, [15] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_D, .force = IPIC_SIFCR_H, @@ -105,6 +74,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 6, }, [16] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_D, .force = IPIC_SIFCR_H, @@ -112,7 +82,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 7, }, [17] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_A, .force = IPIC_SEFCR, @@ -120,7 +90,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 5, }, [18] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_A, .force = IPIC_SEFCR, @@ -128,7 +98,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 6, }, [19] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_A, .force = IPIC_SEFCR, @@ -136,7 +106,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 7, }, [20] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_B, .force = IPIC_SEFCR, @@ -144,7 +114,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 4, }, [21] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_B, .force = IPIC_SEFCR, @@ -152,7 +122,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 5, }, [22] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_B, .force = IPIC_SEFCR, @@ -160,7 +130,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 6, }, [23] = { - .ack = IPIC_SEPNR, + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_B, .force = IPIC_SEFCR, @@ -168,6 +138,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 7, }, [32] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -175,6 +146,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 0, }, [33] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -182,6 +154,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 1, }, [34] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -189,6 +162,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 2, }, [35] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -196,6 +170,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 3, }, [36] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -203,6 +178,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 4, }, [37] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -210,6 +186,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 5, }, [38] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, @@ -217,48 +194,15 @@ static struct ipic_info ipic_info[] = { .prio_mask = 6, }, [39] = { + .pend = IPIC_SIPNR_H, .mask = IPIC_SIMSR_H, .prio = IPIC_SIPRR_A, .force = IPIC_SIFCR_H, .bit = 7, .prio_mask = 7, }, - [42] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_B, - .force = IPIC_SIFCR_H, - .bit = 10, - .prio_mask = 2, - }, - [44] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_B, - .force = IPIC_SIFCR_H, - .bit = 12, - .prio_mask = 4, - }, - [45] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_B, - .force = IPIC_SIFCR_H, - .bit = 13, - .prio_mask = 5, - }, - [46] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_B, - .force = IPIC_SIFCR_H, - .bit = 14, - .prio_mask = 6, - }, - [47] = { - .mask = IPIC_SIMSR_H, - .prio = IPIC_SIPRR_B, - .force = IPIC_SIFCR_H, - .bit = 15, - .prio_mask = 7, - }, [48] = { + .pend = IPIC_SEPNR, .mask = IPIC_SEMSR, .prio = IPIC_SMPRR_A, .force = IPIC_SEFCR, @@ -266,6 +210,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 4, }, [64] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_A, .force = IPIC_SIFCR_L, @@ -273,6 +218,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 0, }, [65] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_A, .force = IPIC_SIFCR_L, @@ -280,6 +226,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 1, }, [66] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_A, .force = IPIC_SIFCR_L, @@ -287,6 +234,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 2, }, [67] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_A, .force = IPIC_SIFCR_L, @@ -294,6 +242,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 3, }, [68] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_B, .force = IPIC_SIFCR_L, @@ -301,6 +250,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 0, }, [69] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_B, .force = IPIC_SIFCR_L, @@ -308,6 +258,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 1, }, [70] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_B, .force = IPIC_SIFCR_L, @@ -315,6 +266,7 @@ static struct ipic_info ipic_info[] = { .prio_mask = 2, }, [71] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = IPIC_SMPRR_B, .force = IPIC_SIFCR_L, @@ -322,114 +274,91 @@ static struct ipic_info ipic_info[] = { .prio_mask = 3, }, [72] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 8, }, [73] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 9, }, [74] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 10, }, [75] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 11, }, [76] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 12, }, [77] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 13, }, [78] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 14, }, [79] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 15, }, [80] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 16, }, - [81] = { - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 17, - }, - [82] = { - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 18, - }, [84] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 20, }, [85] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 21, }, - [86] = { - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 22, - }, - [87] = { - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 23, - }, - [88] = { - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 24, - }, - [89] = { - .mask = IPIC_SIMSR_L, - .prio = 0, - .force = IPIC_SIFCR_L, - .bit = 25, - }, [90] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, .bit = 26, }, [91] = { + .pend = IPIC_SIPNR_L, .mask = IPIC_SIMSR_L, .prio = 0, .force = IPIC_SIFCR_L, @@ -483,10 +412,6 @@ static void ipic_mask_irq(unsigned int virq) temp &= ~(1 << (31 - ipic_info[src].bit)); ipic_write(ipic->regs, ipic_info[src].mask, temp); - /* mb() can't guarantee that masking is finished. But it does finish - * for nearly all cases. */ - mb(); - spin_unlock_irqrestore(&ipic_lock, flags); } @@ -499,13 +424,9 @@ static void ipic_ack_irq(unsigned int virq) spin_lock_irqsave(&ipic_lock, flags); - temp = ipic_read(ipic->regs, ipic_info[src].ack); + temp = ipic_read(ipic->regs, ipic_info[src].pend); temp |= (1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].ack, temp); - - /* mb() can't guarantee that ack is finished. But it does finish - * for nearly all cases. */ - mb(); + ipic_write(ipic->regs, ipic_info[src].pend, temp); spin_unlock_irqrestore(&ipic_lock, flags); } @@ -523,13 +444,9 @@ static void ipic_mask_irq_and_ack(unsigned int virq) temp &= ~(1 << (31 - ipic_info[src].bit)); ipic_write(ipic->regs, ipic_info[src].mask, temp); - temp = ipic_read(ipic->regs, ipic_info[src].ack); + temp = ipic_read(ipic->regs, ipic_info[src].pend); temp |= (1 << (31 - ipic_info[src].bit)); - ipic_write(ipic->regs, ipic_info[src].ack, temp); - - /* mb() can't guarantee that ack is finished. But it does finish - * for nearly all cases. */ - mb(); + ipic_write(ipic->regs, ipic_info[src].pend, temp); spin_unlock_irqrestore(&ipic_lock, flags); } @@ -551,22 +468,14 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type) flow_type); return -EINVAL; } - /* ipic supports only edge mode on external interrupts */ - if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !ipic_info[src].ack) { - printk(KERN_ERR "ipic: edge sense not supported on internal " - "interrupts\n"); - return -EINVAL; - } desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; if (flow_type & IRQ_TYPE_LEVEL_LOW) { desc->status |= IRQ_LEVEL; desc->handle_irq = handle_level_irq; - desc->chip = &ipic_level_irq_chip; } else { desc->handle_irq = handle_edge_irq; - desc->chip = &ipic_edge_irq_chip; } /* only EXT IRQ senses are programmable on ipic @@ -591,16 +500,7 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type) return 0; } -/* level interrupts and edge interrupts have different ack operations */ -static struct irq_chip ipic_level_irq_chip = { - .typename = " IPIC ", - .unmask = ipic_unmask_irq, - .mask = ipic_mask_irq, - .mask_ack = ipic_mask_irq, - .set_type = ipic_set_irq_type, -}; - -static struct irq_chip ipic_edge_irq_chip = { +static struct irq_chip ipic_irq_chip = { .typename = " IPIC ", .unmask = ipic_unmask_irq, .mask = ipic_mask_irq, @@ -619,9 +519,13 @@ static int ipic_host_map(struct irq_host *h, unsigned int virq, irq_hw_number_t hw) { struct ipic *ipic = h->host_data; + struct irq_chip *chip; + + /* Default chip */ + chip = &ipic->hc_irq; set_irq_chip_data(virq, ipic); - set_irq_chip_and_handler(virq, &ipic_level_irq_chip, handle_level_irq); + set_irq_chip_and_handler(virq, chip, handle_level_irq); /* Set default irq type */ set_irq_type(virq, IRQ_TYPE_NONE); @@ -680,6 +584,7 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) ipic->regs = ioremap(res.start, res.end - res.start + 1); ipic->irqhost->host_data = ipic; + ipic->hc_irq = ipic_irq_chip; /* init hw */ ipic_write(ipic->regs, IPIC_SICNR, 0x0); @@ -688,10 +593,6 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) * configure SICFR accordingly */ if (flags & IPIC_SPREADMODE_GRP_A) temp |= SICFR_IPSA; - if (flags & IPIC_SPREADMODE_GRP_B) - temp |= SICFR_IPSB; - if (flags & IPIC_SPREADMODE_GRP_C) - temp |= SICFR_IPSC; if (flags & IPIC_SPREADMODE_GRP_D) temp |= SICFR_IPSD; if (flags & IPIC_SPREADMODE_MIX_A) @@ -699,7 +600,7 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags) if (flags & IPIC_SPREADMODE_MIX_B) temp |= SICFR_MPSB; - ipic_write(ipic->regs, IPIC_SICFR, temp); + ipic_write(ipic->regs, IPIC_SICNR, temp); /* handle MCP route */ temp = 0; @@ -771,12 +672,10 @@ void ipic_set_highest_priority(unsigned int virq) void ipic_set_default_priority(void) { - ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_PRIORITY_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SIPRR_B, IPIC_PRIORITY_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SIPRR_C, IPIC_PRIORITY_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_PRIORITY_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_PRIORITY_DEFAULT); - ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_PRIORITY_DEFAULT); + ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_SIPRR_A_DEFAULT); + ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_SIPRR_D_DEFAULT); + ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_SMPRR_A_DEFAULT); + ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_SMPRR_B_DEFAULT); } void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) diff --git a/trunk/arch/powerpc/sysdev/ipic.h b/trunk/arch/powerpc/sysdev/ipic.h index 9391c57b0c51..bb309a501b2d 100644 --- a/trunk/arch/powerpc/sysdev/ipic.h +++ b/trunk/arch/powerpc/sysdev/ipic.h @@ -23,12 +23,13 @@ #define IPIC_IRQ_EXT7 23 /* Default Priority Registers */ -#define IPIC_PRIORITY_DEFAULT 0x05309770 +#define IPIC_SIPRR_A_DEFAULT 0x05309770 +#define IPIC_SIPRR_D_DEFAULT 0x05309770 +#define IPIC_SMPRR_A_DEFAULT 0x05309770 +#define IPIC_SMPRR_B_DEFAULT 0x05309770 /* System Global Interrupt Configuration Register */ #define SICFR_IPSA 0x00010000 -#define SICFR_IPSB 0x00020000 -#define SICFR_IPSC 0x00040000 #define SICFR_IPSD 0x00080000 #define SICFR_MPSA 0x00200000 #define SICFR_MPSB 0x00400000 @@ -44,11 +45,13 @@ struct ipic { /* The remapper for this IPIC */ struct irq_host *irqhost; + + /* The "linux" controller struct */ + struct irq_chip hc_irq; }; struct ipic_info { - u8 ack; /* pending register offset from base if the irq - supports ack operation */ + u8 pend; /* pending register offset from base */ u8 mask; /* mask register offset from base */ u8 prio; /* priority register offset from base */ u8 force; /* force register offset from base */ diff --git a/trunk/arch/powerpc/sysdev/qe_lib/qe.c b/trunk/arch/powerpc/sysdev/qe_lib/qe.c index 21e01061aca9..3d57d3835b04 100644 --- a/trunk/arch/powerpc/sysdev/qe_lib/qe.c +++ b/trunk/arch/powerpc/sysdev/qe_lib/qe.c @@ -167,20 +167,19 @@ unsigned int get_brg_clk(void) /* Program the BRG to the given sampling rate and multiplier * - * @brg: the BRG, QE_BRG1 - QE_BRG16 + * @brg: the BRG, 1-16 * @rate: the desired sampling rate * @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or * GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01, * then 'multiplier' should be 8. + * + * Also note that the value programmed into the BRGC register must be even. */ -int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier) +void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier) { u32 divisor, tempval; u32 div16 = 0; - if ((brg < QE_BRG1) || (brg > QE_BRG16)) - return -EINVAL; - divisor = get_brg_clk() / (rate * multiplier); if (divisor > QE_BRGC_DIVISOR_MAX + 1) { @@ -197,43 +196,8 @@ int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier) tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | QE_BRGC_ENABLE | div16; - out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval); - - return 0; -} -EXPORT_SYMBOL(qe_setbrg); - -/* Convert a string to a QE clock source enum - * - * This function takes a string, typically from a property in the device - * tree, and returns the corresponding "enum qe_clock" value. -*/ -enum qe_clock qe_clock_source(const char *source) -{ - unsigned int i; - - if (strcasecmp(source, "none") == 0) - return QE_CLK_NONE; - - if (strncasecmp(source, "brg", 3) == 0) { - i = simple_strtoul(source + 3, NULL, 10); - if ((i >= 1) && (i <= 16)) - return (QE_BRG1 - 1) + i; - else - return QE_CLK_DUMMY; - } - - if (strncasecmp(source, "clk", 3) == 0) { - i = simple_strtoul(source + 3, NULL, 10); - if ((i >= 1) && (i <= 24)) - return (QE_CLK1 - 1) + i; - else - return QE_CLK_DUMMY; - } - - return QE_CLK_DUMMY; + out_be32(&qe_immr->brg.brgc[brg - 1], tempval); } -EXPORT_SYMBOL(qe_clock_source); /* Initialize SNUMs (thread serial numbers) according to * QE Module Control chapter, SNUM table diff --git a/trunk/drivers/macintosh/adb.c b/trunk/drivers/macintosh/adb.c index 5ae28f076d25..5c742a526082 100644 --- a/trunk/drivers/macintosh/adb.c +++ b/trunk/drivers/macintosh/adb.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -83,11 +82,21 @@ struct adb_driver *adb_controller; BLOCKING_NOTIFIER_HEAD(adb_client_list); static int adb_got_sleep; static int adb_inited; +static pid_t adb_probe_task_pid; static DECLARE_MUTEX(adb_probe_mutex); +static struct completion adb_probe_task_comp; static int sleepy_trackpad; static int autopoll_devs; int __adb_probe_sync; +#ifdef CONFIG_PM_SLEEP +static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when); +static struct pmu_sleep_notifier adb_sleep_notifier = { + adb_notify_sleep, + SLEEP_LEVEL_ADB, +}; +#endif + static int adb_scan_bus(void); static int do_adb_reset_bus(void); static void adbdev_init(void); @@ -125,6 +134,16 @@ static void printADBreply(struct adb_request *req) } #endif + +static __inline__ void adb_wait_ms(unsigned int ms) +{ + if (current->pid && adb_probe_task_pid && + adb_probe_task_pid == current->pid) + msleep(ms); + else + mdelay(ms); +} + static int adb_scan_bus(void) { int i, highFree=0, noMovement; @@ -229,10 +248,13 @@ static int adb_scan_bus(void) static int adb_probe_task(void *x) { + strcpy(current->comm, "kadbprobe"); + printk(KERN_INFO "adb: starting probe task...\n"); do_adb_reset_bus(); printk(KERN_INFO "adb: finished probe task...\n"); + adb_probe_task_pid = 0; up(&adb_probe_mutex); return 0; @@ -241,7 +263,7 @@ adb_probe_task(void *x) static void __adb_probe_task(struct work_struct *bullshit) { - kthread_run(adb_probe_task, NULL, "kadbprobe"); + adb_probe_task_pid = kernel_thread(adb_probe_task, NULL, SIGCHLD | CLONE_KERNEL); } static DECLARE_WORK(adb_reset_work, __adb_probe_task); @@ -259,36 +281,6 @@ adb_reset_bus(void) return 0; } -#ifdef CONFIG_PM -/* - * notify clients before sleep - */ -static int adb_suspend(struct platform_device *dev, pm_message_t state) -{ - adb_got_sleep = 1; - /* We need to get a lock on the probe thread */ - down(&adb_probe_mutex); - /* Stop autopoll */ - if (adb_controller->autopoll) - adb_controller->autopoll(0); - blocking_notifier_call_chain(&adb_client_list, ADB_MSG_POWERDOWN, NULL); - - return 0; -} - -/* - * reset bus after sleep - */ -static int adb_resume(struct platform_device *dev) -{ - adb_got_sleep = 0; - up(&adb_probe_mutex); - adb_reset_bus(); - - return 0; -} -#endif /* CONFIG_PM */ - int __init adb_init(void) { struct adb_driver *driver; @@ -321,12 +313,15 @@ int __init adb_init(void) printk(KERN_WARNING "Warning: no ADB interface detected\n"); adb_controller = NULL; } else { +#ifdef CONFIG_PM_SLEEP + pmu_register_sleep_notifier(&adb_sleep_notifier); +#endif /* CONFIG_PM */ #ifdef CONFIG_PPC if (machine_is_compatible("AAPL,PowerBook1998") || machine_is_compatible("PowerBook1,1")) sleepy_trackpad = 1; #endif /* CONFIG_PPC */ - + init_completion(&adb_probe_task_comp); adbdev_init(); adb_reset_bus(); } @@ -335,6 +330,33 @@ int __init adb_init(void) __initcall(adb_init); +#ifdef CONFIG_PM +/* + * notify clients before sleep and reset bus afterwards + */ +void +adb_notify_sleep(struct pmu_sleep_notifier *self, int when) +{ + switch (when) { + case PBOOK_SLEEP_REQUEST: + adb_got_sleep = 1; + /* We need to get a lock on the probe thread */ + down(&adb_probe_mutex); + /* Stop autopoll */ + if (adb_controller->autopoll) + adb_controller->autopoll(0); + blocking_notifier_call_chain(&adb_client_list, + ADB_MSG_POWERDOWN, NULL); + break; + case PBOOK_WAKE: + adb_got_sleep = 0; + up(&adb_probe_mutex); + adb_reset_bus(); + break; + } +} +#endif /* CONFIG_PM */ + static int do_adb_reset_bus(void) { @@ -351,7 +373,7 @@ do_adb_reset_bus(void) if (sleepy_trackpad) { /* Let the trackpad settle down */ - msleep(500); + adb_wait_ms(500); } down(&adb_handler_sem); @@ -367,7 +389,7 @@ do_adb_reset_bus(void) if (sleepy_trackpad) { /* Let the trackpad settle down */ - msleep(1500); + adb_wait_ms(1500); } if (!ret) { @@ -391,27 +413,41 @@ adb_poll(void) adb_controller->poll(); } -static void adb_sync_req_done(struct adb_request *req) +static void +adb_probe_wakeup(struct adb_request *req) { - struct completion *comp = req->arg; - - complete(comp); + complete(&adb_probe_task_comp); } +/* Static request used during probe */ +static struct adb_request adb_sreq; +static unsigned long adb_sreq_lock; // Use semaphore ! */ + int adb_request(struct adb_request *req, void (*done)(struct adb_request *), int flags, int nbytes, ...) { va_list list; - int i; + int i, use_sreq; int rc; - struct completion comp; if ((adb_controller == NULL) || (adb_controller->send_request == NULL)) return -ENXIO; if (nbytes < 1) return -EINVAL; - + if (req == NULL && (flags & ADBREQ_NOSEND)) + return -EINVAL; + + if (req == NULL) { + if (test_and_set_bit(0,&adb_sreq_lock)) { + printk("adb.c: Warning: contention on static request !\n"); + return -EPERM; + } + req = &adb_sreq; + flags |= ADBREQ_SYNC; + use_sreq = 1; + } else + use_sreq = 0; req->nbytes = nbytes+1; req->done = done; req->reply_expected = flags & ADBREQ_REPLY; @@ -424,18 +460,25 @@ adb_request(struct adb_request *req, void (*done)(struct adb_request *), if (flags & ADBREQ_NOSEND) return 0; - /* Synchronous requests block using an on-stack completion */ - if (flags & ADBREQ_SYNC) { - WARN_ON(done); - req->done = adb_sync_req_done; - req->arg = ∁ - init_completion(&comp); + /* Synchronous requests send from the probe thread cause it to + * block. Beware that the "done" callback will be overriden ! + */ + if ((flags & ADBREQ_SYNC) && + (current->pid && adb_probe_task_pid && + adb_probe_task_pid == current->pid)) { + req->done = adb_probe_wakeup; + rc = adb_controller->send_request(req, 0); + if (rc || req->complete) + goto bail; + wait_for_completion(&adb_probe_task_comp); + rc = 0; + goto bail; } - rc = adb_controller->send_request(req, 0); - - if ((flags & ADBREQ_SYNC) && !rc && !req->complete) - wait_for_completion(&comp); + rc = adb_controller->send_request(req, flags & ADBREQ_SYNC); +bail: + if (use_sreq) + clear_bit(0, &adb_sreq_lock); return rc; } @@ -821,29 +864,7 @@ static const struct file_operations adb_fops = { .release = adb_release, }; -static struct platform_driver adb_pfdrv = { - .driver = { - .name = "adb", - }, -#ifdef CONFIG_PM - .suspend = adb_suspend, - .resume = adb_resume, -#endif -}; - -static struct platform_device adb_pfdev = { - .name = "adb", -}; - -static int __init -adb_dummy_probe(struct platform_device *dev) -{ - if (dev == &adb_pfdev) - return 0; - return -ENODEV; -} - -static void __init +static void adbdev_init(void) { if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) { @@ -855,7 +876,4 @@ adbdev_init(void) if (IS_ERR(adb_dev_class)) return; class_device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb"); - - platform_device_register(&adb_pfdev); - platform_driver_probe(&adb_pfdrv, adb_dummy_probe); } diff --git a/trunk/drivers/macintosh/mediabay.c b/trunk/drivers/macintosh/mediabay.c index 192bef5c20b3..48d647abea46 100644 --- a/trunk/drivers/macintosh/mediabay.c +++ b/trunk/drivers/macintosh/mediabay.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -36,6 +35,7 @@ #define MB_DEBUG +#define MB_IGNORE_SIGNALS #ifdef MB_DEBUG #define MBDBG(fmt, arg...) printk(KERN_INFO fmt , ## arg) @@ -622,7 +622,12 @@ static int media_bay_task(void *x) { int i; - while (!kthread_should_stop()) { + strcpy(current->comm, "media-bay"); +#ifdef MB_IGNORE_SIGNALS + sigfillset(¤t->blocked); +#endif + + for (;;) { for (i = 0; i < media_bay_count; ++i) { down(&media_bays[i].lock); if (!media_bays[i].sleeping) @@ -631,8 +636,9 @@ static int media_bay_task(void *x) } msleep_interruptible(MB_POLL_DELAY); + if (signal_pending(current)) + return 0; } - return 0; } static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) @@ -693,7 +699,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de /* Startup kernel thread */ if (i == 0) - kthread_run(media_bay_task, NULL, "media-bay"); + kernel_thread(media_bay_task, NULL, CLONE_KERNEL); return 0; diff --git a/trunk/drivers/macintosh/therm_pm72.c b/trunk/drivers/macintosh/therm_pm72.c index 6fadc9ac66b0..e43554e754a4 100644 --- a/trunk/drivers/macintosh/therm_pm72.c +++ b/trunk/drivers/macintosh/therm_pm72.c @@ -121,7 +121,6 @@ #include #include #include -#include #include #include #include @@ -162,7 +161,7 @@ static struct slots_pid_state slots_state; static int state; static int cpu_count; static int cpu_pid_type; -static struct task_struct *ctrl_task; +static pid_t ctrl_task; static struct completion ctrl_complete; static int critical_state; static int rackmac; @@ -1780,6 +1779,8 @@ static int call_critical_overtemp(void) */ static int main_control_loop(void *x) { + daemonize("kfand"); + DBG("main_control_loop started\n"); down(&driver_lock); @@ -1955,7 +1956,7 @@ static void start_control_loops(void) { init_completion(&ctrl_complete); - ctrl_task = kthread_run(main_control_loop, NULL, "kfand"); + ctrl_task = kernel_thread(main_control_loop, NULL, SIGCHLD | CLONE_KERNEL); } /* @@ -1963,7 +1964,7 @@ static void start_control_loops(void) */ static void stop_control_loops(void) { - if (ctrl_task) + if (ctrl_task != 0) wait_for_completion(&ctrl_complete); } diff --git a/trunk/drivers/macintosh/therm_windtunnel.c b/trunk/drivers/macintosh/therm_windtunnel.c index 37224025f00e..5452da1bb1a5 100644 --- a/trunk/drivers/macintosh/therm_windtunnel.c +++ b/trunk/drivers/macintosh/therm_windtunnel.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -62,7 +61,8 @@ I2C_CLIENT_INSMOD; static struct { volatile int running; - struct task_struct *poll_task; + struct completion completion; + pid_t poll_task; struct semaphore lock; struct of_device *of_dev; @@ -282,27 +282,27 @@ restore_regs( void ) write_reg( x.fan, 0x00, x.r0, 1 ); } -static int control_loop(void *dummy) +static int +control_loop( void *dummy ) { - down(&x.lock); + daemonize("g4fand"); + + down( &x.lock ); setup_hardware(); - up(&x.lock); - for (;;) { - msleep_interruptible(8000); - if (kthread_should_stop()) - break; + while( x.running ) { + up( &x.lock ); - down(&x.lock); + msleep_interruptible(8000); + + down( &x.lock ); poll_temp(); - up(&x.lock); } - down(&x.lock); restore_regs(); - up(&x.lock); + up( &x.lock ); - return 0; + complete_and_exit( &x.completion, 0 ); } @@ -322,7 +322,8 @@ do_attach( struct i2c_adapter *adapter ) ret = i2c_probe( adapter, &addr_data, &do_probe ); if( x.thermostat && x.fan ) { x.running = 1; - x.poll_task = kthread_run(control_loop, NULL, "g4fand"); + init_completion( &x.completion ); + x.poll_task = kernel_thread( control_loop, NULL, SIGCHLD | CLONE_KERNEL ); } } return ret; @@ -338,8 +339,7 @@ do_detach( struct i2c_client *client ) else { if( x.running ) { x.running = 0; - kthread_stop(x.poll_task); - x.poll_task = NULL; + wait_for_completion( &x.completion ); } if( client == x.thermostat ) x.thermostat = NULL; diff --git a/trunk/drivers/macintosh/via-pmu.c b/trunk/drivers/macintosh/via-pmu.c index 8f98257e6a15..35e1f22089d6 100644 --- a/trunk/drivers/macintosh/via-pmu.c +++ b/trunk/drivers/macintosh/via-pmu.c @@ -10,11 +10,13 @@ * * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi. * Copyright (C) 2001-2002 Benjamin Herrenschmidt - * Copyright (C) 2006-2007 Johannes Berg * * THIS DRIVER IS BECOMING A TOTAL MESS ! * - Cleanup atomically disabling reply to PMU events after * a sleep or a freq. switch + * - Move sleep code out of here to pmac_pm, merge into new + * common PM infrastructure + * - Save/Restore PCI space properly * */ #include @@ -62,7 +64,7 @@ #include "via-pmu-event.h" /* Some compile options */ -#undef DEBUG_SLEEP +#define DEBUG_SLEEP /* Misc minor number allocated for /dev/pmu */ #define PMU_MINOR 154 @@ -147,9 +149,12 @@ static spinlock_t pmu_lock; static u8 pmu_intr_mask; static int pmu_version; static int drop_interrupts; -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) static int option_lid_wakeup = 1; -#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */ +#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ +#if (defined(CONFIG_PM_SLEEP)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY) +static int sleep_in_progress; +#endif static unsigned long async_req_locks; static unsigned int pmu_irq_stats[11]; @@ -169,6 +174,7 @@ static struct proc_dir_entry *proc_pmu_batt[PMU_MAX_BATTERIES]; int __fake_sleep; int asleep; +BLOCKING_NOTIFIER_HEAD(sleep_notifier_list); #ifdef CONFIG_ADB static int adb_dev_map; @@ -197,12 +203,6 @@ static int proc_read_options(char *page, char **start, off_t off, static int proc_write_options(struct file *file, const char __user *buffer, unsigned long count, void *data); -#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) -static void powerbook_sleep_init_3400(void); -#else -#define powerbook_sleep_init_3400() do { } while (0) -#endif - #ifdef CONFIG_ADB struct adb_driver via_pmu_driver = { "PMU", @@ -221,7 +221,7 @@ extern void enable_kernel_fp(void); #ifdef DEBUG_SLEEP int pmu_polled_request(struct adb_request *req); -void pmu_blink(int n); +int pmu_wink(struct adb_request *req); #endif /* @@ -450,10 +450,6 @@ static int __init via_pmu_start(void) pmu_poll(); } while (pmu_state != idle); - /* Do allocations and ioremaps that will be needed for sleep */ - if (pmu_kind == PMU_OHARE_BASED) - powerbook_sleep_init_3400(); - return 0; } @@ -876,7 +872,7 @@ proc_read_options(char *page, char **start, off_t off, { char *p = page; -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) if (pmu_kind == PMU_KEYLARGO_BASED && pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup); @@ -917,7 +913,7 @@ proc_write_options(struct file *file, const char __user *buffer, *(val++) = 0; while(*val == ' ') val++; -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) if (pmu_kind == PMU_KEYLARGO_BASED && pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) if (!strcmp(label, "lid_wakeup")) @@ -1723,7 +1719,206 @@ pmu_present(void) return via != 0; } -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) +#ifdef CONFIG_PM_SLEEP + +static LIST_HEAD(sleep_notifiers); + +int +pmu_register_sleep_notifier(struct pmu_sleep_notifier *n) +{ + struct list_head *list; + struct pmu_sleep_notifier *notifier; + + for (list = sleep_notifiers.next; list != &sleep_notifiers; + list = list->next) { + notifier = list_entry(list, struct pmu_sleep_notifier, list); + if (n->priority > notifier->priority) + break; + } + __list_add(&n->list, list->prev, list); + return 0; +} +EXPORT_SYMBOL(pmu_register_sleep_notifier); + +int +pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n) +{ + if (n->list.next == 0) + return -ENOENT; + list_del(&n->list); + n->list.next = NULL; + return 0; +} +EXPORT_SYMBOL(pmu_unregister_sleep_notifier); +#endif /* CONFIG_PM_SLEEP */ + +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) + +/* Sleep is broadcast last-to-first */ +static void broadcast_sleep(int when) +{ + struct list_head *list; + struct pmu_sleep_notifier *notifier; + + for (list = sleep_notifiers.prev; list != &sleep_notifiers; + list = list->prev) { + notifier = list_entry(list, struct pmu_sleep_notifier, list); + notifier->notifier_call(notifier, when); + } +} + +/* Wake is broadcast first-to-last */ +static void broadcast_wake(void) +{ + struct list_head *list; + struct pmu_sleep_notifier *notifier; + + for (list = sleep_notifiers.next; list != &sleep_notifiers; + list = list->next) { + notifier = list_entry(list, struct pmu_sleep_notifier, list); + notifier->notifier_call(notifier, PBOOK_WAKE); + } +} + +/* + * This struct is used to store config register values for + * PCI devices which may get powered off when we sleep. + */ +static struct pci_save { + u16 command; + u16 cache_lat; + u16 intr; + u32 rom_address; +} *pbook_pci_saves; +static int pbook_npci_saves; + +static void +pbook_alloc_pci_save(void) +{ + int npci; + struct pci_dev *pd = NULL; + + npci = 0; + while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { + ++npci; + } + if (npci == 0) + return; + pbook_pci_saves = (struct pci_save *) + kmalloc(npci * sizeof(struct pci_save), GFP_KERNEL); + pbook_npci_saves = npci; +} + +static void +pbook_free_pci_save(void) +{ + if (pbook_pci_saves == NULL) + return; + kfree(pbook_pci_saves); + pbook_pci_saves = NULL; + pbook_npci_saves = 0; +} + +static void +pbook_pci_save(void) +{ + struct pci_save *ps = pbook_pci_saves; + struct pci_dev *pd = NULL; + int npci = pbook_npci_saves; + + if (ps == NULL) + return; + + while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { + if (npci-- == 0) { + pci_dev_put(pd); + return; + } + pci_read_config_word(pd, PCI_COMMAND, &ps->command); + pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat); + pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr); + pci_read_config_dword(pd, PCI_ROM_ADDRESS, &ps->rom_address); + ++ps; + } +} + +/* For this to work, we must take care of a few things: If gmac was enabled + * during boot, it will be in the pci dev list. If it's disabled at this point + * (and it will probably be), then you can't access it's config space. + */ +static void +pbook_pci_restore(void) +{ + u16 cmd; + struct pci_save *ps = pbook_pci_saves - 1; + struct pci_dev *pd = NULL; + int npci = pbook_npci_saves; + int j; + + while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { + if (npci-- == 0) + return; + ps++; + if (ps->command == 0) + continue; + pci_read_config_word(pd, PCI_COMMAND, &cmd); + if ((ps->command & ~cmd) == 0) + continue; + switch (pd->hdr_type) { + case PCI_HEADER_TYPE_NORMAL: + for (j = 0; j < 6; ++j) + pci_write_config_dword(pd, + PCI_BASE_ADDRESS_0 + j*4, + pd->resource[j].start); + pci_write_config_dword(pd, PCI_ROM_ADDRESS, + ps->rom_address); + pci_write_config_word(pd, PCI_CACHE_LINE_SIZE, + ps->cache_lat); + pci_write_config_word(pd, PCI_INTERRUPT_LINE, + ps->intr); + pci_write_config_word(pd, PCI_COMMAND, ps->command); + break; + } + } +} + +#ifdef DEBUG_SLEEP +/* N.B. This doesn't work on the 3400 */ +void +pmu_blink(int n) +{ + struct adb_request req; + + memset(&req, 0, sizeof(req)); + + for (; n > 0; --n) { + req.nbytes = 4; + req.done = NULL; + req.data[0] = 0xee; + req.data[1] = 4; + req.data[2] = 0; + req.data[3] = 1; + req.reply[0] = ADB_RET_OK; + req.reply_len = 1; + req.reply_expected = 0; + pmu_polled_request(&req); + mdelay(50); + req.nbytes = 4; + req.done = NULL; + req.data[0] = 0xee; + req.data[1] = 4; + req.data[2] = 0; + req.data[3] = 0; + req.reply[0] = ADB_RET_OK; + req.reply_len = 1; + req.reply_expected = 0; + pmu_polled_request(&req); + mdelay(50); + } + mdelay(50); +} +#endif + /* * Put the powerbook to sleep. */ @@ -1760,6 +1955,132 @@ restore_via_state(void) extern void pmu_backlight_set_sleep(int sleep); +static int +pmac_suspend_devices(void) +{ + int ret; + + pm_prepare_console(); + + /* Notify old-style device drivers */ + broadcast_sleep(PBOOK_SLEEP_REQUEST); + + /* Sync the disks. */ + /* XXX It would be nice to have some way to ensure that + * nobody is dirtying any new buffers while we wait. That + * could be achieved using the refrigerator for processes + * that swsusp uses + */ + sys_sync(); + + broadcast_sleep(PBOOK_SLEEP_NOW); + + /* Send suspend call to devices, hold the device core's dpm_sem */ + ret = device_suspend(PMSG_SUSPEND); + if (ret) { + broadcast_wake(); + printk(KERN_ERR "Driver sleep failed\n"); + return -EBUSY; + } + +#ifdef CONFIG_PMAC_BACKLIGHT + /* Tell backlight code not to muck around with the chip anymore */ + pmu_backlight_set_sleep(1); +#endif + + /* Call platform functions marked "on sleep" */ + pmac_pfunc_i2c_suspend(); + pmac_pfunc_base_suspend(); + + /* Stop preemption */ + preempt_disable(); + + /* Make sure the decrementer won't interrupt us */ + asm volatile("mtdec %0" : : "r" (0x7fffffff)); + /* Make sure any pending DEC interrupt occurring while we did + * the above didn't re-enable the DEC */ + mb(); + asm volatile("mtdec %0" : : "r" (0x7fffffff)); + + /* We can now disable MSR_EE. This code of course works properly only + * on UP machines... For SMP, if we ever implement sleep, we'll have to + * stop the "other" CPUs way before we do all that stuff. + */ + local_irq_disable(); + + /* Broadcast power down irq + * This isn't that useful in most cases (only directly wired devices can + * use this but still... This will take care of sysdev's as well, so + * we exit from here with local irqs disabled and PIC off. + */ + ret = device_power_down(PMSG_SUSPEND); + if (ret) { + wakeup_decrementer(); + local_irq_enable(); + preempt_enable(); + device_resume(); + broadcast_wake(); + printk(KERN_ERR "Driver powerdown failed\n"); + return -EBUSY; + } + + /* Wait for completion of async requests */ + while (!batt_req.complete) + pmu_poll(); + + /* Giveup the lazy FPU & vec so we don't have to back them + * up from the low level code + */ + enable_kernel_fp(); + +#ifdef CONFIG_ALTIVEC + if (cpu_has_feature(CPU_FTR_ALTIVEC)) + enable_kernel_altivec(); +#endif /* CONFIG_ALTIVEC */ + + return 0; +} + +static int +pmac_wakeup_devices(void) +{ + mdelay(100); + +#ifdef CONFIG_PMAC_BACKLIGHT + /* Tell backlight code it can use the chip again */ + pmu_backlight_set_sleep(0); +#endif + + /* Power back up system devices (including the PIC) */ + device_power_up(); + + /* Force a poll of ADB interrupts */ + adb_int_pending = 1; + via_pmu_interrupt(0, NULL); + + /* Restart jiffies & scheduling */ + wakeup_decrementer(); + + /* Re-enable local CPU interrupts */ + local_irq_enable(); + mdelay(10); + preempt_enable(); + + /* Call platform functions marked "on wake" */ + pmac_pfunc_base_resume(); + pmac_pfunc_i2c_resume(); + + /* Resume devices */ + device_resume(); + + /* Notify old style drivers */ + broadcast_wake(); + + pm_restore_console(); + + return 0; +} + #define GRACKLE_PM (1<<7) #define GRACKLE_DOZE (1<<5) #define GRACKLE_NAP (1<<4) @@ -1770,12 +2091,19 @@ static int powerbook_sleep_grackle(void) unsigned long save_l2cr; unsigned short pmcr1; struct adb_request req; + int ret; struct pci_dev *grackle; grackle = pci_get_bus_and_slot(0, 0); if (!grackle) return -ENODEV; + ret = pmac_suspend_devices(); + if (ret) { + printk(KERN_ERR "Sleep rejected by devices\n"); + return ret; + } + /* Turn off various things. Darwin does some retry tests here... */ pmu_request(&req, NULL, 2, PMU_POWER_CTRL0, PMU_POW0_OFF|PMU_POW0_HARD_DRIVE); pmu_wait_complete(&req); @@ -1838,6 +2166,8 @@ static int powerbook_sleep_grackle(void) PMU_POW_ON|PMU_POW_BACKLIGHT|PMU_POW_CHARGER|PMU_POW_IRLED|PMU_POW_MEDIABAY); pmu_wait_complete(&req); + pmac_wakeup_devices(); + return 0; } @@ -1847,6 +2177,7 @@ powerbook_sleep_Core99(void) unsigned long save_l2cr; unsigned long save_l3cr; struct adb_request req; + int ret; if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0) { printk(KERN_ERR "Sleep mode not supported on this machine\n"); @@ -1856,6 +2187,12 @@ powerbook_sleep_Core99(void) if (num_online_cpus() > 1 || cpu_is_offline(0)) return -EAGAIN; + ret = pmac_suspend_devices(); + if (ret) { + printk(KERN_ERR "Sleep rejected by devices\n"); + return ret; + } + /* Stop environment and ADB interrupts */ pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0); pmu_wait_complete(&req); @@ -1926,33 +2263,44 @@ powerbook_sleep_Core99(void) /* Restore LPJ, cpufreq will adjust the cpu frequency */ loops_per_jiffy /= 2; + pmac_wakeup_devices(); + return 0; } #define PB3400_MEM_CTRL 0xf8000000 #define PB3400_MEM_CTRL_SLEEP 0x70 -static void __iomem *pb3400_mem_ctrl; - -static void powerbook_sleep_init_3400(void) -{ - /* map in the memory controller registers */ - pb3400_mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100); - if (pb3400_mem_ctrl == NULL) - printk(KERN_WARNING "ioremap failed: sleep won't be possible"); -} - -static int powerbook_sleep_3400(void) +static int +powerbook_sleep_3400(void) { - int i, x; + int ret, i, x; unsigned int hid0; - unsigned long msr; + unsigned long p; struct adb_request sleep_req; + void __iomem *mem_ctrl; unsigned int __iomem *mem_ctrl_sleep; - if (pb3400_mem_ctrl == NULL) + /* first map in the memory controller registers */ + mem_ctrl = ioremap(PB3400_MEM_CTRL, 0x100); + if (mem_ctrl == NULL) { + printk("powerbook_sleep_3400: ioremap failed\n"); return -ENOMEM; - mem_ctrl_sleep = pb3400_mem_ctrl + PB3400_MEM_CTRL_SLEEP; + } + mem_ctrl_sleep = mem_ctrl + PB3400_MEM_CTRL_SLEEP; + + /* Allocate room for PCI save */ + pbook_alloc_pci_save(); + + ret = pmac_suspend_devices(); + if (ret) { + pbook_free_pci_save(); + printk(KERN_ERR "Sleep rejected by devices\n"); + return ret; + } + + /* Save the state of PCI config space for some slots */ + pbook_pci_save(); /* Set the memory controller to keep the memory refreshed while we're asleep */ @@ -1967,34 +2315,41 @@ static int powerbook_sleep_3400(void) /* Ask the PMU to put us to sleep */ pmu_request(&sleep_req, NULL, 5, PMU_SLEEP, 'M', 'A', 'T', 'T'); - pmu_wait_complete(&sleep_req); - pmu_unlock(); + while (!sleep_req.complete) + mb(); - pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 1); + pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,1); + /* displacement-flush the L2 cache - necessary? */ + for (p = KERNELBASE; p < KERNELBASE + 0x100000; p += 0x1000) + i = *(volatile int *)p; asleep = 1; /* Put the CPU into sleep mode */ hid0 = mfspr(SPRN_HID0); hid0 = (hid0 & ~(HID0_NAP | HID0_DOZE)) | HID0_SLEEP; mtspr(SPRN_HID0, hid0); - local_irq_enable(); - msr = mfmsr() | MSR_POW; - while (asleep) { - mb(); - mtmsr(msr); - isync(); - } - local_irq_disable(); + mtmsr(mfmsr() | MSR_POW | MSR_EE); + udelay(10); /* OK, we're awake again, start restoring things */ out_be32(mem_ctrl_sleep, 0x3f); - pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, 0); + pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,0); + pbook_pci_restore(); + pmu_unlock(); + + /* wait for the PMU interrupt sequence to complete */ + while (asleep) + mb(); + + pmac_wakeup_devices(); + pbook_free_pci_save(); + iounmap(mem_ctrl); return 0; } -#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */ +#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ /* * Support for /dev/pmu device @@ -2167,129 +2522,6 @@ pmu_release(struct inode *inode, struct file *file) return 0; } -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) -/* - * overrides the weak arch_suspend_disable_irqs in kernel/power/main.c - * - * XXX: Once Scott Wood's patch is merged, this needs to use the ppc_md - * hooks that patch adds! - */ -void arch_suspend_disable_irqs(void) -{ -#ifdef CONFIG_PMAC_BACKLIGHT - /* Tell backlight code not to muck around with the chip anymore */ - pmu_backlight_set_sleep(1); -#endif - - /* Call platform functions marked "on sleep" */ - pmac_pfunc_i2c_suspend(); - pmac_pfunc_base_suspend(); - - /* Stop preemption */ - preempt_disable(); - - /* Make sure the decrementer won't interrupt us */ - asm volatile("mtdec %0" : : "r" (0x7fffffff)); - /* Make sure any pending DEC interrupt occurring while we did - * the above didn't re-enable the DEC */ - mb(); - asm volatile("mtdec %0" : : "r" (0x7fffffff)); - - local_irq_disable(); -} - -static int powerbook_sleep(suspend_state_t state) -{ - int error = 0; - - /* Wait for completion of async requests */ - while (!batt_req.complete) - pmu_poll(); - - /* Giveup the lazy FPU & vec so we don't have to back them - * up from the low level code - */ - enable_kernel_fp(); - -#ifdef CONFIG_ALTIVEC - if (cpu_has_feature(CPU_FTR_ALTIVEC)) - enable_kernel_altivec(); -#endif /* CONFIG_ALTIVEC */ - - switch (pmu_kind) { - case PMU_OHARE_BASED: - error = powerbook_sleep_3400(); - break; - case PMU_HEATHROW_BASED: - case PMU_PADDINGTON_BASED: - error = powerbook_sleep_grackle(); - break; - case PMU_KEYLARGO_BASED: - error = powerbook_sleep_Core99(); - break; - default: - return -ENOSYS; - } - - if (error) - return error; - - mdelay(100); - -#ifdef CONFIG_PMAC_BACKLIGHT - /* Tell backlight code it can use the chip again */ - pmu_backlight_set_sleep(0); -#endif - - return 0; -} - -/* - * overrides the weak arch_suspend_enable_irqs in kernel/power/main.c - * - * XXX: Once Scott Wood's patch is merged, this needs to use the ppc_md - * hooks that patch adds! - */ -void arch_suspend_enable_irqs(void) -{ - /* Force a poll of ADB interrupts */ - adb_int_pending = 1; - via_pmu_interrupt(0, NULL); - - /* Restart jiffies & scheduling */ - wakeup_decrementer(); - - /* Re-enable local CPU interrupts */ - local_irq_enable(); - mdelay(10); - preempt_enable(); - - /* Call platform functions marked "on wake" */ - pmac_pfunc_base_resume(); - pmac_pfunc_i2c_resume(); -} - -static int pmu_sleep_valid(suspend_state_t state) -{ - return state == PM_SUSPEND_MEM - && (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) >= 0); -} - -static struct platform_suspend_ops pmu_pm_ops = { - .enter = powerbook_sleep, - .valid = pmu_sleep_valid, -}; - -static int register_pmu_pm_ops(void) -{ - suspend_set_ops(&pmu_pm_ops); - - return 0; -} - -device_initcall(register_pmu_pm_ops); -#endif - static int pmu_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg) @@ -2298,15 +2530,35 @@ pmu_ioctl(struct inode * inode, struct file *filp, int error = -EINVAL; switch (cmd) { +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) case PMU_IOC_SLEEP: if (!capable(CAP_SYS_ADMIN)) return -EACCES; - return pm_suspend(PM_SUSPEND_MEM); + if (sleep_in_progress) + return -EBUSY; + sleep_in_progress = 1; + switch (pmu_kind) { + case PMU_OHARE_BASED: + error = powerbook_sleep_3400(); + break; + case PMU_HEATHROW_BASED: + case PMU_PADDINGTON_BASED: + error = powerbook_sleep_grackle(); + break; + case PMU_KEYLARGO_BASED: + error = powerbook_sleep_Core99(); + break; + default: + error = -ENOSYS; + } + sleep_in_progress = 0; + break; case PMU_IOC_CAN_SLEEP: - if (pmac_call_feature(PMAC_FTR_SLEEP_STATE, NULL, 0, -1) < 0) + if (pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) < 0) return put_user(0, argp); else return put_user(1, argp); +#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY /* Compatibility ioctl's for backlight */ @@ -2314,6 +2566,9 @@ pmu_ioctl(struct inode * inode, struct file *filp, { int brightness; + if (sleep_in_progress) + return -EBUSY; + brightness = pmac_backlight_get_legacy_brightness(); if (brightness < 0) return brightness; @@ -2325,6 +2580,9 @@ pmu_ioctl(struct inode * inode, struct file *filp, { int brightness; + if (sleep_in_progress) + return -EBUSY; + error = get_user(brightness, argp); if (error) return error; @@ -2449,43 +2707,15 @@ pmu_polled_request(struct adb_request *req) local_irq_restore(flags); return 0; } +#endif /* DEBUG_SLEEP */ -/* N.B. This doesn't work on the 3400 */ -void pmu_blink(int n) -{ - struct adb_request req; - memset(&req, 0, sizeof(req)); +/* FIXME: This is a temporary set of callbacks to enable us + * to do suspend-to-disk. + */ - for (; n > 0; --n) { - req.nbytes = 4; - req.done = NULL; - req.data[0] = 0xee; - req.data[1] = 4; - req.data[2] = 0; - req.data[3] = 1; - req.reply[0] = ADB_RET_OK; - req.reply_len = 1; - req.reply_expected = 0; - pmu_polled_request(&req); - mdelay(50); - req.nbytes = 4; - req.done = NULL; - req.data[0] = 0xee; - req.data[1] = 4; - req.data[2] = 0; - req.data[3] = 0; - req.reply[0] = ADB_RET_OK; - req.reply_len = 1; - req.reply_expected = 0; - pmu_polled_request(&req); - mdelay(50); - } - mdelay(50); -} -#endif /* DEBUG_SLEEP */ +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) int pmu_sys_suspended; static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state) @@ -2519,7 +2749,7 @@ static int pmu_sys_resume(struct sys_device *sysdev) return 0; } -#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */ +#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ static struct sysdev_class pmu_sysclass = { set_kset_name("pmu"), @@ -2530,10 +2760,10 @@ static struct sys_device device_pmu = { }; static struct sysdev_driver driver_pmu = { -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) .suspend = &pmu_sys_suspend, .resume = &pmu_sys_resume, -#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */ +#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ }; static int __init init_pmu_sysfs(void) @@ -2568,10 +2798,10 @@ EXPORT_SYMBOL(pmu_wait_complete); EXPORT_SYMBOL(pmu_suspend); EXPORT_SYMBOL(pmu_resume); EXPORT_SYMBOL(pmu_unlock); -#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) +#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) EXPORT_SYMBOL(pmu_enable_irled); EXPORT_SYMBOL(pmu_battery_count); EXPORT_SYMBOL(pmu_batteries); EXPORT_SYMBOL(pmu_power_flags); -#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */ +#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ diff --git a/trunk/drivers/net/fs_enet/mac-fcc.c b/trunk/drivers/net/fs_enet/mac-fcc.c index e36321152d50..da4efbca646e 100644 --- a/trunk/drivers/net/fs_enet/mac-fcc.c +++ b/trunk/drivers/net/fs_enet/mac-fcc.c @@ -81,8 +81,16 @@ static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op) { const struct fs_platform_info *fpi = fep->fpi; + int i; + + W32(cpmp, cp_cpcr, fpi->cp_command | op | CPM_CR_FLG); + for (i = 0; i < MAX_CR_CMD_LOOPS; i++) + if ((R32(cpmp, cp_cpcr) & CPM_CR_FLG) == 0) + return 0; - return cpm_command(fpi->cp_command, op); + printk(KERN_ERR "%s(): Not able to issue CPM command\n", + __FUNCTION__); + return 1; } static int do_pd_setup(struct fs_enet_private *fep) diff --git a/trunk/drivers/net/fs_enet/mac-scc.c b/trunk/drivers/net/fs_enet/mac-scc.c index 5ff856d7590b..03134f47a4eb 100644 --- a/trunk/drivers/net/fs_enet/mac-scc.c +++ b/trunk/drivers/net/fs_enet/mac-scc.c @@ -89,12 +89,21 @@ * Delay to wait for SCC reset command to complete (in us) */ #define SCC_RESET_DELAY 50 +#define MAX_CR_CMD_LOOPS 10000 static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op) { const struct fs_platform_info *fpi = fep->fpi; + int i; + + W16(cpmp, cp_cpcr, fpi->cp_command | CPM_CR_FLG | (op << 8)); + for (i = 0; i < MAX_CR_CMD_LOOPS; i++) + if ((R16(cpmp, cp_cpcr) & CPM_CR_FLG) == 0) + return 0; - return cpm_command(fpi->cp_command, op); + printk(KERN_ERR "%s(): Not able to issue CPM command\n", + __FUNCTION__); + return 1; } static int do_pd_setup(struct fs_enet_private *fep) diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c index 0f7626856a6b..7f689907ac28 100644 --- a/trunk/drivers/net/ucc_geth.c +++ b/trunk/drivers/net/ucc_geth.c @@ -3822,7 +3822,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma int err, ucc_num, max_speed = 0; const phandle *ph; const unsigned int *prop; - const char *sprop; const void *mac_addr; phy_interface_t phy_interface; static const int enet_to_speed[] = { @@ -3855,56 +3854,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ug_info->uf_info.ucc_num = ucc_num; - sprop = of_get_property(np, "rx-clock-name", NULL); - if (sprop) { - ug_info->uf_info.rx_clock = qe_clock_source(sprop); - if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) || - (ug_info->uf_info.rx_clock > QE_CLK24)) { - printk(KERN_ERR - "ucc_geth: invalid rx-clock-name property\n"); - return -EINVAL; - } - } else { - prop = of_get_property(np, "rx-clock", NULL); - if (!prop) { - /* If both rx-clock-name and rx-clock are missing, - we want to tell people to use rx-clock-name. */ - printk(KERN_ERR - "ucc_geth: missing rx-clock-name property\n"); - return -EINVAL; - } - if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) { - printk(KERN_ERR - "ucc_geth: invalid rx-clock propperty\n"); - return -EINVAL; - } - ug_info->uf_info.rx_clock = *prop; - } - - sprop = of_get_property(np, "tx-clock-name", NULL); - if (sprop) { - ug_info->uf_info.tx_clock = qe_clock_source(sprop); - if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) || - (ug_info->uf_info.tx_clock > QE_CLK24)) { - printk(KERN_ERR - "ucc_geth: invalid tx-clock-name property\n"); - return -EINVAL; - } - } else { - prop = of_get_property(np, "rx-clock", NULL); - if (!prop) { - printk(KERN_ERR - "ucc_geth: mising tx-clock-name property\n"); - return -EINVAL; - } - if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) { - printk(KERN_ERR - "ucc_geth: invalid tx-clock property\n"); - return -EINVAL; - } - ug_info->uf_info.tx_clock = *prop; - } - + prop = of_get_property(np, "rx-clock", NULL); + ug_info->uf_info.rx_clock = *prop; + prop = of_get_property(np, "tx-clock", NULL); + ug_info->uf_info.tx_clock = *prop; err = of_address_to_resource(np, 0, &res); if (err) return -EINVAL; diff --git a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 6ea0366e26ae..52fb044bb79a 100644 --- a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm1.c @@ -52,7 +52,11 @@ #ifdef CONFIG_PPC_CPM_NEW_BINDING void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) { - cpm_command(port->command, cmd); + u16 __iomem *cpcr = &cpmp->cp_cpcr; + + out_be16(cpcr, port->command | (cmd << 8) | CPM_CR_FLG); + while (in_be16(cpcr) & CPM_CR_FLG) + ; } #else void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) diff --git a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c index def01582de5c..882dbc17d590 100644 --- a/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/trunk/drivers/serial/cpm_uart/cpm_uart_cpm2.c @@ -52,7 +52,13 @@ #ifdef CONFIG_PPC_CPM_NEW_BINDING void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) { - cpm_command(port->command, cmd); + cpm_cpm2_t __iomem *cp = cpm2_map(im_cpm); + + out_be32(&cp->cp_cpcr, port->command | cmd | CPM_CR_FLG); + while (in_be32(&cp->cp_cpcr) & CPM_CR_FLG) + ; + + cpm2_unmap(cp); } #else void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) diff --git a/trunk/include/asm-powerpc/cpm.h b/trunk/include/asm-powerpc/cpm.h index fae83b137337..48df9f330e76 100644 --- a/trunk/include/asm-powerpc/cpm.h +++ b/trunk/include/asm-powerpc/cpm.h @@ -10,6 +10,5 @@ int cpm_muram_free(unsigned long offset); unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size); void __iomem *cpm_muram_addr(unsigned long offset); dma_addr_t cpm_muram_dma(void __iomem *addr); -int cpm_command(u32 command, u8 opcode); #endif diff --git a/trunk/include/asm-powerpc/immap_86xx.h b/trunk/include/asm-powerpc/immap_86xx.h index 0f165e59c326..0ad4e653d464 100644 --- a/trunk/include/asm-powerpc/immap_86xx.h +++ b/trunk/include/asm-powerpc/immap_86xx.h @@ -89,14 +89,14 @@ struct ccsr_guts { * them. * * guts: Pointer to GUTS structure - * co: The DMA controller (0 or 1) + * co: The DMA controller (1 or 2) * ch: The channel on the DMA controller (0, 1, 2, or 3) * device: The device to set as the source (CCSR_GUTS_DMACR_DEV_xx) */ static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts, unsigned int co, unsigned int ch, unsigned int device) { - unsigned int shift = 16 + (8 * (1 - co) + 2 * (3 - ch)); + unsigned int shift = 16 + (8 * (2 - co) + 2 * (3 - ch)); clrsetbits_be32(&guts->dmacr, 3 << shift, device << shift); } @@ -118,27 +118,6 @@ static inline void guts_set_dmacr(struct ccsr_guts __iomem *guts, #define CCSR_GUTS_PMUXCR_DMA1_0 0x00000002 #define CCSR_GUTS_PMUXCR_DMA1_3 0x00000001 -/* - * Set the DMA external control bits in the GUTS - * - * The DMA external control bits in the PMUXCR are only meaningful for - * channels 0 and 3. Any other channels are ignored. - * - * guts: Pointer to GUTS structure - * co: The DMA controller (0 or 1) - * ch: The channel on the DMA controller (0, 1, 2, or 3) - * value: the new value for the bit (0 or 1) - */ -static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts, - unsigned int co, unsigned int ch, unsigned int value) -{ - if ((ch == 0) || (ch == 3)) { - unsigned int shift = 2 * (co + 1) - (ch & 1) - 1; - - clrsetbits_be32(&guts->pmuxcr, 1 << shift, value << shift); - } -} - #define CCSR_GUTS_CLKDVDR_PXCKEN 0x80000000 #define CCSR_GUTS_CLKDVDR_SSICKEN 0x20000000 #define CCSR_GUTS_CLKDVDR_PXCKINV 0x10000000 diff --git a/trunk/include/asm-powerpc/ipic.h b/trunk/include/asm-powerpc/ipic.h index 8ff08be00146..edec79dcb7c1 100644 --- a/trunk/include/asm-powerpc/ipic.h +++ b/trunk/include/asm-powerpc/ipic.h @@ -20,13 +20,11 @@ /* Flags when we init the IPIC */ #define IPIC_SPREADMODE_GRP_A 0x00000001 -#define IPIC_SPREADMODE_GRP_B 0x00000002 -#define IPIC_SPREADMODE_GRP_C 0x00000004 -#define IPIC_SPREADMODE_GRP_D 0x00000008 -#define IPIC_SPREADMODE_MIX_A 0x00000010 -#define IPIC_SPREADMODE_MIX_B 0x00000020 -#define IPIC_DISABLE_MCP_OUT 0x00000040 -#define IPIC_IRQ0_MCP 0x00000080 +#define IPIC_SPREADMODE_GRP_D 0x00000002 +#define IPIC_SPREADMODE_MIX_A 0x00000004 +#define IPIC_SPREADMODE_MIX_B 0x00000008 +#define IPIC_DISABLE_MCP_OUT 0x00000010 +#define IPIC_IRQ0_MCP 0x00000020 /* IPIC registers offsets */ #define IPIC_SICFR 0x00 /* System Global Interrupt Configuration Register */ diff --git a/trunk/include/asm-powerpc/qe.h b/trunk/include/asm-powerpc/qe.h index a24b7b14958f..0dabe46a29d2 100644 --- a/trunk/include/asm-powerpc/qe.h +++ b/trunk/include/asm-powerpc/qe.h @@ -28,52 +28,6 @@ #define MEM_PART_SECONDARY 1 #define MEM_PART_MURAM 2 -/* Clocks and BRGs */ -enum qe_clock { - QE_CLK_NONE = 0, - QE_BRG1, /* Baud Rate Generator 1 */ - QE_BRG2, /* Baud Rate Generator 2 */ - QE_BRG3, /* Baud Rate Generator 3 */ - QE_BRG4, /* Baud Rate Generator 4 */ - QE_BRG5, /* Baud Rate Generator 5 */ - QE_BRG6, /* Baud Rate Generator 6 */ - QE_BRG7, /* Baud Rate Generator 7 */ - QE_BRG8, /* Baud Rate Generator 8 */ - QE_BRG9, /* Baud Rate Generator 9 */ - QE_BRG10, /* Baud Rate Generator 10 */ - QE_BRG11, /* Baud Rate Generator 11 */ - QE_BRG12, /* Baud Rate Generator 12 */ - QE_BRG13, /* Baud Rate Generator 13 */ - QE_BRG14, /* Baud Rate Generator 14 */ - QE_BRG15, /* Baud Rate Generator 15 */ - QE_BRG16, /* Baud Rate Generator 16 */ - QE_CLK1, /* Clock 1 */ - QE_CLK2, /* Clock 2 */ - QE_CLK3, /* Clock 3 */ - QE_CLK4, /* Clock 4 */ - QE_CLK5, /* Clock 5 */ - QE_CLK6, /* Clock 6 */ - QE_CLK7, /* Clock 7 */ - QE_CLK8, /* Clock 8 */ - QE_CLK9, /* Clock 9 */ - QE_CLK10, /* Clock 10 */ - QE_CLK11, /* Clock 11 */ - QE_CLK12, /* Clock 12 */ - QE_CLK13, /* Clock 13 */ - QE_CLK14, /* Clock 14 */ - QE_CLK15, /* Clock 15 */ - QE_CLK16, /* Clock 16 */ - QE_CLK17, /* Clock 17 */ - QE_CLK18, /* Clock 18 */ - QE_CLK19, /* Clock 19 */ - QE_CLK20, /* Clock 20 */ - QE_CLK21, /* Clock 21 */ - QE_CLK22, /* Clock 22 */ - QE_CLK23, /* Clock 23 */ - QE_CLK24, /* Clock 24 */ - QE_CLK_DUMMY -}; - /* Export QE common operations */ extern void qe_reset(void); extern int par_io_init(struct device_node *np); @@ -84,8 +38,7 @@ extern int par_io_data_set(u8 port, u8 pin, u8 val); /* QE internal API */ int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); -enum qe_clock qe_clock_source(const char *source); -int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier); +void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier); int qe_get_snum(void); void qe_put_snum(u8 snum); unsigned long qe_muram_alloc(int size, int align); @@ -176,6 +129,52 @@ enum comm_dir { COMM_DIR_RX_AND_TX = 3 }; +/* Clocks and BRGs */ +enum qe_clock { + QE_CLK_NONE = 0, + QE_BRG1, /* Baud Rate Generator 1 */ + QE_BRG2, /* Baud Rate Generator 2 */ + QE_BRG3, /* Baud Rate Generator 3 */ + QE_BRG4, /* Baud Rate Generator 4 */ + QE_BRG5, /* Baud Rate Generator 5 */ + QE_BRG6, /* Baud Rate Generator 6 */ + QE_BRG7, /* Baud Rate Generator 7 */ + QE_BRG8, /* Baud Rate Generator 8 */ + QE_BRG9, /* Baud Rate Generator 9 */ + QE_BRG10, /* Baud Rate Generator 10 */ + QE_BRG11, /* Baud Rate Generator 11 */ + QE_BRG12, /* Baud Rate Generator 12 */ + QE_BRG13, /* Baud Rate Generator 13 */ + QE_BRG14, /* Baud Rate Generator 14 */ + QE_BRG15, /* Baud Rate Generator 15 */ + QE_BRG16, /* Baud Rate Generator 16 */ + QE_CLK1, /* Clock 1 */ + QE_CLK2, /* Clock 2 */ + QE_CLK3, /* Clock 3 */ + QE_CLK4, /* Clock 4 */ + QE_CLK5, /* Clock 5 */ + QE_CLK6, /* Clock 6 */ + QE_CLK7, /* Clock 7 */ + QE_CLK8, /* Clock 8 */ + QE_CLK9, /* Clock 9 */ + QE_CLK10, /* Clock 10 */ + QE_CLK11, /* Clock 11 */ + QE_CLK12, /* Clock 12 */ + QE_CLK13, /* Clock 13 */ + QE_CLK14, /* Clock 14 */ + QE_CLK15, /* Clock 15 */ + QE_CLK16, /* Clock 16 */ + QE_CLK17, /* Clock 17 */ + QE_CLK18, /* Clock 18 */ + QE_CLK19, /* Clock 19 */ + QE_CLK20, /* Clock 20 */ + QE_CLK21, /* Clock 21 */ + QE_CLK22, /* Clock 22 */ + QE_CLK23, /* Clock 23 */ + QE_CLK24, /* Clock 24 */ + QE_CLK_DUMMY, +}; + /* QE CMXUCR Registers. * There are two UCCs represented in each of the four CMXUCR registers. * These values are for the UCC in the LSBs diff --git a/trunk/include/asm-powerpc/reg_booke.h b/trunk/include/asm-powerpc/reg_booke.h index 98350f0f92c9..8fdc2b47afb9 100644 --- a/trunk/include/asm-powerpc/reg_booke.h +++ b/trunk/include/asm-powerpc/reg_booke.h @@ -123,23 +123,16 @@ #define SPRN_SPEFSCR 0x200 /* SPE & Embedded FP Status & Control */ #define SPRN_BBEAR 0x201 /* Branch Buffer Entry Address Register */ #define SPRN_BBTAR 0x202 /* Branch Buffer Target Address Register */ -#define SPRN_ATB 0x20E /* Alternate Time Base */ -#define SPRN_ATBL 0x20E /* Alternate Time Base Lower */ -#define SPRN_ATBU 0x20F /* Alternate Time Base Upper */ #define SPRN_IVOR32 0x210 /* Interrupt Vector Offset Register 32 */ #define SPRN_IVOR33 0x211 /* Interrupt Vector Offset Register 33 */ #define SPRN_IVOR34 0x212 /* Interrupt Vector Offset Register 34 */ #define SPRN_IVOR35 0x213 /* Interrupt Vector Offset Register 35 */ -#define SPRN_IVOR36 0x214 /* Interrupt Vector Offset Register 36 */ -#define SPRN_IVOR37 0x215 /* Interrupt Vector Offset Register 37 */ #define SPRN_MCSRR0 0x23A /* Machine Check Save and Restore Register 0 */ #define SPRN_MCSRR1 0x23B /* Machine Check Save and Restore Register 1 */ #define SPRN_MCSR 0x23C /* Machine Check Status Register */ #define SPRN_MCAR 0x23D /* Machine Check Address Register */ #define SPRN_DSRR0 0x23E /* Debug Save and Restore Register 0 */ #define SPRN_DSRR1 0x23F /* Debug Save and Restore Register 1 */ -#define SPRN_SPRG8 0x25C /* Special Purpose Register General 8 */ -#define SPRN_SPRG9 0x25D /* Special Purpose Register General 9 */ #define SPRN_MAS0 0x270 /* MMU Assist Register 0 */ #define SPRN_MAS1 0x271 /* MMU Assist Register 1 */ #define SPRN_MAS2 0x272 /* MMU Assist Register 2 */ @@ -147,18 +140,15 @@ #define SPRN_MAS4 0x274 /* MMU Assist Register 4 */ #define SPRN_MAS5 0x275 /* MMU Assist Register 5 */ #define SPRN_MAS6 0x276 /* MMU Assist Register 6 */ +#define SPRN_MAS7 0x3b0 /* MMU Assist Register 7 */ #define SPRN_PID1 0x279 /* Process ID Register 1 */ #define SPRN_PID2 0x27A /* Process ID Register 2 */ #define SPRN_TLB0CFG 0x2B0 /* TLB 0 Config Register */ #define SPRN_TLB1CFG 0x2B1 /* TLB 1 Config Register */ -#define SPRN_EPR 0x2BE /* External Proxy Register */ #define SPRN_CCR1 0x378 /* Core Configuration Register 1 */ #define SPRN_ZPR 0x3B0 /* Zone Protection Register (40x) */ -#define SPRN_MAS7 0x3B0 /* MMU Assist Register 7 */ #define SPRN_MMUCR 0x3B2 /* MMU Control Register */ #define SPRN_CCR0 0x3B3 /* Core Configuration Register 0 */ -#define SPRN_EPLC 0x3B3 /* External Process ID Load Context */ -#define SPRN_EPSC 0x3B4 /* External Process ID Store Context */ #define SPRN_SGR 0x3B9 /* Storage Guarded Register */ #define SPRN_DCWR 0x3BA /* Data Cache Write-thru Register */ #define SPRN_SLER 0x3BB /* Little-endian real mode */ @@ -169,7 +159,6 @@ #define SPRN_L1CSR0 0x3F2 /* L1 Cache Control and Status Register 0 */ #define SPRN_L1CSR1 0x3F3 /* L1 Cache Control and Status Register 1 */ #define SPRN_PIT 0x3DB /* Programmable Interval Timer */ -#define SPRN_BUCSR 0x3F5 /* Branch Unit Control and Status */ #define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */ #define SPRN_ICCR 0x3FB /* Instruction Cache Cacheability Register */ #define SPRN_SVR 0x3FF /* System Version Register */ diff --git a/trunk/include/linux/pmu.h b/trunk/include/linux/pmu.h index 177ae4812b88..b7824c215354 100644 --- a/trunk/include/linux/pmu.h +++ b/trunk/include/linux/pmu.h @@ -159,6 +159,42 @@ extern void pmu_unlock(void); extern int pmu_present(void); extern int pmu_get_model(void); +#ifdef CONFIG_PM +/* + * Stuff for putting the powerbook to sleep and waking it again. + * + */ +#include + +struct pmu_sleep_notifier +{ + void (*notifier_call)(struct pmu_sleep_notifier *self, int when); + int priority; + struct list_head list; +}; + +/* Code values for calling sleep/wakeup handlers + */ +#define PBOOK_SLEEP_REQUEST 1 +#define PBOOK_SLEEP_NOW 2 +#define PBOOK_WAKE 3 + +/* priority levels in notifiers */ +#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ +#define SLEEP_LEVEL_MEDIABAY 90 /* Media bay driver */ +#define SLEEP_LEVEL_BLOCK 80 /* IDE, SCSI */ +#define SLEEP_LEVEL_NET 70 /* bmac, gmac */ +#define SLEEP_LEVEL_MISC 60 /* Anything else */ +#define SLEEP_LEVEL_USERLAND 55 /* Reserved for apm_emu */ +#define SLEEP_LEVEL_ADB 50 /* ADB (async) */ +#define SLEEP_LEVEL_SOUND 40 /* Sound driver (blocking) */ + +/* special register notifier functions */ +int pmu_register_sleep_notifier(struct pmu_sleep_notifier* notifier); +int pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* notifier); + +#endif /* CONFIG_PM */ + #define PMU_MAX_BATTERIES 2 /* values for pmu_power_flags */