diff --git a/[refs] b/[refs] index b4d6f584cb21..de5ba8a072ab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 99d8be052e248e09abf51d4a656717259bf9b930 +refs/heads/master: 22b619eee525371a65d1386e5d6439b26d9b024c diff --git a/trunk/Documentation/powerpc/booting-without-of.txt b/trunk/Documentation/powerpc/booting-without-of.txt index 1df9d4cfc0e6..7b4e8a70882c 100644 --- a/trunk/Documentation/powerpc/booting-without-of.txt +++ b/trunk/Documentation/powerpc/booting-without-of.txt @@ -1269,6 +1269,10 @@ platforms are moved over to use the flattened-device-tree model. Recommended properties: + - linux,network-index : This is the intended "index" of this + network device. This is used by the bootwrapper to interpret + MAC addresses passed by the firmware when no information other + than indices is available to associate an address with a device. - phy-connection-type : a string naming the controller/PHY interface type, i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", "tbi", or "rtbi". This property is only really needed if the connection @@ -1663,6 +1667,10 @@ platforms are moved over to use the flattened-device-tree model. - phy-handle : The phandle for the PHY connected to this controller. Recommended properties: + - linux,network-index : This is the intended "index" of this + network device. This is used by the bootwrapper to interpret + MAC addresses passed by the firmware when no information other + than indices is available to associate an address with a device. - phy-connection-type : a string naming the controller/PHY interface type, i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), @@ -1987,6 +1995,7 @@ platforms are moved over to use the flattened-device-tree model. interrupts = <20 8>; interrupt-parent = <&PIC>; phy-handle = <&PHY0>; + linux,network-index = <0>; fsl,cpm-command = <12000300>; }; @@ -2208,6 +2217,12 @@ platforms are moved over to use the flattened-device-tree model. EMAC, that is the content of the current (bogus) "phy-port" property. + Recommended properties: + - linux,network-index : This is the intended "index" of this + network device. This is used by the bootwrapper to interpret + MAC addresses passed by the firmware when no information other + than indices is available to associate an address with a device. + Optional properties: - phy-address : 1 cell, optional, MDIO address of the PHY. If absent, a search is performed. @@ -2231,6 +2246,7 @@ platforms are moved over to use the flattened-device-tree model. Example: EMAC0: ethernet@40000800 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index f43d82dbc323..3651355b6ad7 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -501,9 +501,6 @@ config FSL_PCI bool select PPC_INDIRECT_PCI -config 4xx_SOC - bool - # Yes MCA RS/6000s exist but Linux-PPC does not currently support any config MCA bool diff --git a/trunk/arch/powerpc/boot/Makefile b/trunk/arch/powerpc/boot/Makefile index 75b4e1f64b51..1aded8f759d0 100644 --- a/trunk/arch/powerpc/boot/Makefile +++ b/trunk/arch/powerpc/boot/Makefile @@ -64,7 +64,7 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ fixed-head.S ep88xc.c ep405.c \ cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ - cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c + cuboot-warp.c cuboot-85xx-cpm2.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) @@ -216,7 +216,6 @@ image-$(CONFIG_RAINIER) += cuImage.rainier image-$(CONFIG_TAISHAN) += cuImage.taishan image-$(CONFIG_KATMAI) += cuImage.katmai image-$(CONFIG_WARP) += cuImage.warp -image-$(CONFIG_YOSEMITE) += cuImage.yosemite # Board ports in arch/powerpc/platform/8xx/Kconfig image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads diff --git a/trunk/arch/powerpc/boot/bamboo.c b/trunk/arch/powerpc/boot/bamboo.c index b82cacbc60db..54b33f1500e2 100644 --- a/trunk/arch/powerpc/boot/bamboo.c +++ b/trunk/arch/powerpc/boot/bamboo.c @@ -33,8 +33,7 @@ static void bamboo_fixups(void) ibm440ep_fixup_clocks(sysclk, 11059200, 25000000); ibm4xx_sdram_fixup_memsize(); ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); - dt_fixup_mac_address_by_alias("ethernet0", bamboo_mac0); - dt_fixup_mac_address_by_alias("ethernet1", bamboo_mac1); + dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1); } void bamboo_init(void *mac0, void *mac1) diff --git a/trunk/arch/powerpc/boot/cuboot-rainier.c b/trunk/arch/powerpc/boot/cuboot-rainier.c index 0a3fddee54df..cf452b66dce8 100644 --- a/trunk/arch/powerpc/boot/cuboot-rainier.c +++ b/trunk/arch/powerpc/boot/cuboot-rainier.c @@ -42,8 +42,7 @@ static void rainier_fixups(void) ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); ibm4xx_denali_fixup_memsize(); - dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); - dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); + dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); } void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, diff --git a/trunk/arch/powerpc/boot/cuboot-sequoia.c b/trunk/arch/powerpc/boot/cuboot-sequoia.c index caf8f2e842ea..f555575a44de 100644 --- a/trunk/arch/powerpc/boot/cuboot-sequoia.c +++ b/trunk/arch/powerpc/boot/cuboot-sequoia.c @@ -42,8 +42,7 @@ static void sequoia_fixups(void) ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); ibm4xx_denali_fixup_memsize(); - dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); - dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); + dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); } void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, diff --git a/trunk/arch/powerpc/boot/cuboot-taishan.c b/trunk/arch/powerpc/boot/cuboot-taishan.c index 9bc906a754dd..b55b80467eed 100644 --- a/trunk/arch/powerpc/boot/cuboot-taishan.c +++ b/trunk/arch/powerpc/boot/cuboot-taishan.c @@ -40,8 +40,7 @@ static void taishan_fixups(void) ibm4xx_sdram_fixup_memsize(); - dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); - dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); + dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); } diff --git a/trunk/arch/powerpc/boot/cuboot-warp.c b/trunk/arch/powerpc/boot/cuboot-warp.c index eb108a877492..3db93e85e9ea 100644 --- a/trunk/arch/powerpc/boot/cuboot-warp.c +++ b/trunk/arch/powerpc/boot/cuboot-warp.c @@ -24,7 +24,7 @@ static void warp_fixups(void) ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); ibm4xx_sdram_fixup_memsize(); ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); - dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); + dt_fixup_mac_addresses(&bd.bi_enetaddr); } diff --git a/trunk/arch/powerpc/boot/cuboot-yosemite.c b/trunk/arch/powerpc/boot/cuboot-yosemite.c deleted file mode 100644 index cc6e338c5d0d..000000000000 --- a/trunk/arch/powerpc/boot/cuboot-yosemite.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Old U-boot compatibility for Yosemite - * - * Author: Josh Boyer - * - * Copyright 2008 IBM Corporation - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. - */ - -#include "ops.h" -#include "stdio.h" -#include "4xx.h" -#include "44x.h" -#include "cuboot.h" - -#define TARGET_4xx -#define TARGET_44x -#include "ppcboot.h" - -static bd_t bd; - -static void yosemite_fixups(void) -{ - unsigned long sysclk = 66666666; - - ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); - ibm4xx_sdram_fixup_memsize(); - ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); - dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); - dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); -} - -void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, - unsigned long r6, unsigned long r7) -{ - CUBOOT_INIT(); - platform_ops.fixups = yosemite_fixups; - platform_ops.exit = ibm44x_dbcr_reset; - fdt_init(_dtb_start); - serial_console_init(); -} diff --git a/trunk/arch/powerpc/boot/dts/bamboo.dts b/trunk/arch/powerpc/boot/dts/bamboo.dts index ba2521bdaab1..7dc37c9a7446 100644 --- a/trunk/arch/powerpc/boot/dts/bamboo.dts +++ b/trunk/arch/powerpc/boot/dts/bamboo.dts @@ -204,6 +204,7 @@ }; EMAC0: ethernet@ef600e00 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; @@ -224,6 +225,7 @@ }; EMAC1: ethernet@ef600f00 { + linux,network-index = <1>; device_type = "network"; compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; diff --git a/trunk/arch/powerpc/boot/dts/canyonlands.dts b/trunk/arch/powerpc/boot/dts/canyonlands.dts deleted file mode 100644 index 657f2b4d3b1b..000000000000 --- a/trunk/arch/powerpc/boot/dts/canyonlands.dts +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Device Tree Source for AMCC Canyonlands (460EX) - * - * Copyright 2008 DENX Software Engineering, Stefan Roese - * - * 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. - */ - -/ { - #address-cells = <2>; - #size-cells = <1>; - model = "amcc,canyonlands"; - compatible = "amcc,canyonlands"; - dcr-parent = <&/cpus/cpu@0>; - - aliases { - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - serial0 = &UART0; - serial1 = &UART1; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - model = "PowerPC,460EX"; - reg = <0>; - clock-frequency = <0>; /* Filled in by U-Boot */ - timebase-frequency = <0>; /* Filled in by U-Boot */ - i-cache-line-size = <20>; - d-cache-line-size = <20>; - i-cache-size = <8000>; - d-cache-size = <8000>; - dcr-controller; - dcr-access-method = "native"; - }; - }; - - memory { - device_type = "memory"; - reg = <0 0 0>; /* Filled in by U-Boot */ - }; - - UIC0: interrupt-controller0 { - compatible = "ibm,uic-460ex","ibm,uic"; - interrupt-controller; - cell-index = <0>; - dcr-reg = <0c0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - }; - - UIC1: interrupt-controller1 { - compatible = "ibm,uic-460ex","ibm,uic"; - interrupt-controller; - cell-index = <1>; - dcr-reg = <0d0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = <1e 4 1f 4>; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - UIC2: interrupt-controller2 { - compatible = "ibm,uic-460ex","ibm,uic"; - interrupt-controller; - cell-index = <2>; - dcr-reg = <0e0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = ; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - UIC3: interrupt-controller3 { - compatible = "ibm,uic-460ex","ibm,uic"; - interrupt-controller; - cell-index = <3>; - dcr-reg = <0f0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = <10 4 11 4>; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - SDR0: sdr { - compatible = "ibm,sdr-460ex"; - dcr-reg = <00e 002>; - }; - - CPR0: cpr { - compatible = "ibm,cpr-460ex"; - dcr-reg = <00c 002>; - }; - - plb { - compatible = "ibm,plb-460ex", "ibm,plb4"; - #address-cells = <2>; - #size-cells = <1>; - ranges; - clock-frequency = <0>; /* Filled in by U-Boot */ - - SDRAM0: sdram { - compatible = "ibm,sdram-460ex", "ibm,sdram-405gp"; - dcr-reg = <010 2>; - }; - - MAL0: mcmal { - compatible = "ibm,mcmal-460ex", "ibm,mcmal2"; - dcr-reg = <180 62>; - num-tx-chans = <2>; - num-rx-chans = <10>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-parent = <&UIC2>; - interrupts = < /*TXEOB*/ 6 4 - /*RXEOB*/ 7 4 - /*SERR*/ 3 4 - /*TXDE*/ 4 4 - /*RXDE*/ 5 4>; - }; - - POB0: opb { - compatible = "ibm,opb-460ex", "ibm,opb"; - #address-cells = <1>; - #size-cells = <1>; - ranges = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - - EBC0: ebc { - compatible = "ibm,ebc-460ex", "ibm,ebc"; - dcr-reg = <012 2>; - #address-cells = <2>; - #size-cells = <1>; - clock-frequency = <0>; /* Filled in by U-Boot */ - interrupts = <6 4>; - interrupt-parent = <&UIC1>; - }; - - UART0: serial@ef600300 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC1>; - interrupts = <1 4>; - }; - - UART1: serial@ef600400 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC0>; - interrupts = <1 4>; - }; - - UART2: serial@ef600500 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC1>; - interrupts = <1d 4>; - }; - - UART3: serial@ef600600 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC1>; - interrupts = <1e 4>; - }; - - IIC0: i2c@ef600700 { - compatible = "ibm,iic-460ex", "ibm,iic"; - reg = ; - interrupt-parent = <&UIC0>; - interrupts = <2 4>; - }; - - IIC1: i2c@ef600800 { - compatible = "ibm,iic-460ex", "ibm,iic"; - reg = ; - interrupt-parent = <&UIC0>; - interrupts = <3 4>; - }; - - ZMII0: emac-zmii@ef600d00 { - compatible = "ibm,zmii-460ex", "ibm,zmii"; - reg = ; - }; - - RGMII0: emac-rgmii@ef601500 { - compatible = "ibm,rgmii-460ex", "ibm,rgmii"; - reg = ; - has-mdio; - }; - - EMAC0: ethernet@ef600e00 { - device_type = "network"; - compatible = "ibm,emac-460ex", "ibm,emac4"; - interrupt-parent = <&EMAC0>; - interrupts = <0 1>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - reg = ; - local-mac-address = [000000000000]; /* Filled in by U-Boot */ - mal-device = <&MAL0>; - mal-tx-channel = <0>; - mal-rx-channel = <0>; - cell-index = <0>; - max-frame-size = <2328>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rgmii"; - phy-map = <00000000>; - zmii-device = <&ZMII0>; - zmii-channel = <0>; - rgmii-device = <&RGMII0>; - rgmii-channel = <0>; - has-inverted-stacr-oc; - has-new-stacr-staopc; - }; - - EMAC1: ethernet@ef600f00 { - device_type = "network"; - compatible = "ibm,emac-460ex", "ibm,emac4"; - interrupt-parent = <&EMAC1>; - interrupts = <0 1>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - reg = ; - local-mac-address = [000000000000]; /* Filled in by U-Boot */ - mal-device = <&MAL0>; - mal-tx-channel = <1>; - mal-rx-channel = <8>; - cell-index = <1>; - max-frame-size = <2328>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rgmii"; - phy-map = <00000000>; - zmii-device = <&ZMII0>; - zmii-channel = <1>; - rgmii-device = <&RGMII0>; - rgmii-channel = <1>; - has-inverted-stacr-oc; - has-new-stacr-staopc; - }; - }; - - PCIX0: pci@c0ec00000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb-pcix-460ex", "ibm,plb-pcix"; - primary; - large-inbound-windows; - enable-msi-hole; - reg = ; /* Internal messaging registers */ - - /* Outbound ranges, one memory and one IO, - * later cannot be changed - */ - ranges = <02000000 0 80000000 0000000d 80000000 0 80000000 - 01000000 0 00000000 0000000c 08000000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* This drives busses 0 to 0x3f */ - bus-range = <0 3f>; - - /* All PCI interrupts are routed to ext IRQ 2 -> UIC1-0 */ - interrupt-map-mask = <0000 0 0 0>; - interrupt-map = < 0000 0 0 0 &UIC1 0 8 >; - }; - - PCIE0: pciex@d00000000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; - primary; - port = <0>; /* port number */ - reg = ; /* Registers */ - dcr-reg = <100 020>; - sdr-base = <300>; - - /* Outbound ranges, one memory and one IO, - * later cannot be changed - */ - ranges = <02000000 0 80000000 0000000e 00000000 0 80000000 - 01000000 0 00000000 0000000f 80000000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* This drives busses 40 to 0x7f */ - bus-range = <40 7f>; - - /* Legacy interrupts (note the weird polarity, the bridge seems - * to invert PCIe legacy interrupts). - * We are de-swizzling here because the numbers are actually for - * port of the root complex virtual P2P bridge. But I want - * to avoid putting a node for it in the tree, so the numbers - * below are basically de-swizzled numbers. - * The real slot is on idsel 0, so the swizzling is 1:1 - */ - interrupt-map-mask = <0000 0 0 7>; - interrupt-map = < - 0000 0 0 1 &UIC3 c 4 /* swizzled int A */ - 0000 0 0 2 &UIC3 d 4 /* swizzled int B */ - 0000 0 0 3 &UIC3 e 4 /* swizzled int C */ - 0000 0 0 4 &UIC3 f 4 /* swizzled int D */>; - }; - - PCIE1: pciex@d20000000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; - primary; - port = <1>; /* port number */ - reg = ; /* Registers */ - dcr-reg = <120 020>; - sdr-base = <340>; - - /* Outbound ranges, one memory and one IO, - * later cannot be changed - */ - ranges = <02000000 0 80000000 0000000e 80000000 0 80000000 - 01000000 0 00000000 0000000f 80010000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* This drives busses 80 to 0xbf */ - bus-range = <80 bf>; - - /* Legacy interrupts (note the weird polarity, the bridge seems - * to invert PCIe legacy interrupts). - * We are de-swizzling here because the numbers are actually for - * port of the root complex virtual P2P bridge. But I want - * to avoid putting a node for it in the tree, so the numbers - * below are basically de-swizzled numbers. - * The real slot is on idsel 0, so the swizzling is 1:1 - */ - interrupt-map-mask = <0000 0 0 7>; - interrupt-map = < - 0000 0 0 1 &UIC3 10 4 /* swizzled int A */ - 0000 0 0 2 &UIC3 11 4 /* swizzled int B */ - 0000 0 0 3 &UIC3 12 4 /* swizzled int C */ - 0000 0 0 4 &UIC3 13 4 /* swizzled int D */>; - }; - }; -}; diff --git a/trunk/arch/powerpc/boot/dts/ebony.dts b/trunk/arch/powerpc/boot/dts/ebony.dts index 5079dc890e0e..0b000cb7ed8b 100644 --- a/trunk/arch/powerpc/boot/dts/ebony.dts +++ b/trunk/arch/powerpc/boot/dts/ebony.dts @@ -241,6 +241,7 @@ }; EMAC0: ethernet@40000800 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; @@ -260,6 +261,7 @@ zmii-channel = <0>; }; EMAC1: ethernet@40000900 { + linux,network-index = <1>; device_type = "network"; compatible = "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; diff --git a/trunk/arch/powerpc/boot/dts/glacier.dts b/trunk/arch/powerpc/boot/dts/glacier.dts deleted file mode 100644 index 7a7c9bfa0211..000000000000 --- a/trunk/arch/powerpc/boot/dts/glacier.dts +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Device Tree Source for AMCC Glacier (460GT) - * - * Copyright 2008 DENX Software Engineering, Stefan Roese - * - * 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. - */ - -/ { - #address-cells = <2>; - #size-cells = <1>; - model = "amcc,glacier"; - compatible = "amcc,glacier", "amcc,canyonlands"; - dcr-parent = <&/cpus/cpu@0>; - - aliases { - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - ethernet2 = &EMAC2; - ethernet3 = &EMAC3; - serial0 = &UART0; - serial1 = &UART1; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - model = "PowerPC,460GT"; - reg = <0>; - clock-frequency = <0>; /* Filled in by U-Boot */ - timebase-frequency = <0>; /* Filled in by U-Boot */ - i-cache-line-size = <20>; - d-cache-line-size = <20>; - i-cache-size = <8000>; - d-cache-size = <8000>; - dcr-controller; - dcr-access-method = "native"; - }; - }; - - memory { - device_type = "memory"; - reg = <0 0 0>; /* Filled in by U-Boot */ - }; - - UIC0: interrupt-controller0 { - compatible = "ibm,uic-460gt","ibm,uic"; - interrupt-controller; - cell-index = <0>; - dcr-reg = <0c0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - }; - - UIC1: interrupt-controller1 { - compatible = "ibm,uic-460gt","ibm,uic"; - interrupt-controller; - cell-index = <1>; - dcr-reg = <0d0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = <1e 4 1f 4>; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - UIC2: interrupt-controller2 { - compatible = "ibm,uic-460gt","ibm,uic"; - interrupt-controller; - cell-index = <2>; - dcr-reg = <0e0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = ; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - UIC3: interrupt-controller3 { - compatible = "ibm,uic-460gt","ibm,uic"; - interrupt-controller; - cell-index = <3>; - dcr-reg = <0f0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = <10 4 11 4>; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - SDR0: sdr { - compatible = "ibm,sdr-460gt"; - dcr-reg = <00e 002>; - }; - - CPR0: cpr { - compatible = "ibm,cpr-460gt"; - dcr-reg = <00c 002>; - }; - - plb { - compatible = "ibm,plb-460gt", "ibm,plb4"; - #address-cells = <2>; - #size-cells = <1>; - ranges; - clock-frequency = <0>; /* Filled in by U-Boot */ - - SDRAM0: sdram { - compatible = "ibm,sdram-460gt", "ibm,sdram-405gp"; - dcr-reg = <010 2>; - }; - - MAL0: mcmal { - compatible = "ibm,mcmal-460gt", "ibm,mcmal2"; - dcr-reg = <180 62>; - num-tx-chans = <4>; - num-rx-chans = <20>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-parent = <&UIC2>; - interrupts = < /*TXEOB*/ 6 4 - /*RXEOB*/ 7 4 - /*SERR*/ 3 4 - /*TXDE*/ 4 4 - /*RXDE*/ 5 4>; - desc-base-addr-high = <8>; - }; - - POB0: opb { - compatible = "ibm,opb-460gt", "ibm,opb"; - #address-cells = <1>; - #size-cells = <1>; - ranges = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - - EBC0: ebc { - compatible = "ibm,ebc-460gt", "ibm,ebc"; - dcr-reg = <012 2>; - #address-cells = <2>; - #size-cells = <1>; - clock-frequency = <0>; /* Filled in by U-Boot */ - interrupts = <6 4>; - interrupt-parent = <&UIC1>; - }; - - UART0: serial@ef600300 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC1>; - interrupts = <1 4>; - }; - - UART1: serial@ef600400 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC0>; - interrupts = <1 4>; - }; - - UART2: serial@ef600500 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC1>; - interrupts = <1d 4>; - }; - - UART3: serial@ef600600 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by U-Boot */ - current-speed = <0>; /* Filled in by U-Boot */ - interrupt-parent = <&UIC1>; - interrupts = <1e 4>; - }; - - IIC0: i2c@ef600700 { - compatible = "ibm,iic-460gt", "ibm,iic"; - reg = ; - interrupt-parent = <&UIC0>; - interrupts = <2 4>; - }; - - IIC1: i2c@ef600800 { - compatible = "ibm,iic-460gt", "ibm,iic"; - reg = ; - interrupt-parent = <&UIC0>; - interrupts = <3 4>; - }; - - ZMII0: emac-zmii@ef600d00 { - compatible = "ibm,zmii-460gt", "ibm,zmii"; - reg = ; - }; - - RGMII0: emac-rgmii@ef601500 { - compatible = "ibm,rgmii-460gt", "ibm,rgmii"; - reg = ; - has-mdio; - }; - - RGMII1: emac-rgmii@ef601600 { - compatible = "ibm,rgmii-460gt", "ibm,rgmii"; - reg = ; - has-mdio; - }; - - TAH0: emac-tah@ef601350 { - compatible = "ibm,tah-460gt", "ibm,tah"; - reg = ; - }; - - TAH1: emac-tah@ef601450 { - compatible = "ibm,tah-460gt", "ibm,tah"; - reg = ; - }; - - EMAC0: ethernet@ef600e00 { - device_type = "network"; - compatible = "ibm,emac-460gt", "ibm,emac4"; - interrupt-parent = <&EMAC0>; - interrupts = <0 1>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - reg = ; - local-mac-address = [000000000000]; /* Filled in by U-Boot */ - mal-device = <&MAL0>; - mal-tx-channel = <0>; - mal-rx-channel = <0>; - cell-index = <0>; - max-frame-size = <2328>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rgmii"; - phy-map = <00000000>; - rgmii-device = <&RGMII0>; - rgmii-channel = <0>; - tah-device = <&TAH0>; - tah-channel = <0>; - has-inverted-stacr-oc; - has-new-stacr-staopc; - }; - - EMAC1: ethernet@ef600f00 { - device_type = "network"; - compatible = "ibm,emac-460gt", "ibm,emac4"; - interrupt-parent = <&EMAC1>; - interrupts = <0 1>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - reg = ; - local-mac-address = [000000000000]; /* Filled in by U-Boot */ - mal-device = <&MAL0>; - mal-tx-channel = <1>; - mal-rx-channel = <8>; - cell-index = <1>; - max-frame-size = <2328>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rgmii"; - phy-map = <00000000>; - rgmii-device = <&RGMII0>; - rgmii-channel = <1>; - tah-device = <&TAH1>; - tah-channel = <0>; - has-inverted-stacr-oc; - has-new-stacr-staopc; - }; - - EMAC2: ethernet@ef601100 { - device_type = "network"; - compatible = "ibm,emac-460gt", "ibm,emac4"; - interrupt-parent = <&EMAC2>; - interrupts = <0 1>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - reg = ; - local-mac-address = [000000000000]; /* Filled in by U-Boot */ - mal-device = <&MAL0>; - mal-tx-channel = <2>; - mal-rx-channel = <10>; - cell-index = <2>; - max-frame-size = <2328>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rgmii"; - phy-map = <00000000>; - rgmii-device = <&RGMII1>; - rgmii-channel = <0>; - has-inverted-stacr-oc; - has-new-stacr-staopc; - }; - - EMAC3: ethernet@ef601200 { - device_type = "network"; - compatible = "ibm,emac-460gt", "ibm,emac4"; - interrupt-parent = <&EMAC3>; - interrupts = <0 1>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - reg = ; - local-mac-address = [000000000000]; /* Filled in by U-Boot */ - mal-device = <&MAL0>; - mal-tx-channel = <3>; - mal-rx-channel = <18>; - cell-index = <3>; - max-frame-size = <2328>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rgmii"; - phy-map = <00000000>; - rgmii-device = <&RGMII1>; - rgmii-channel = <1>; - has-inverted-stacr-oc; - has-new-stacr-staopc; - }; - }; - - PCIX0: pci@c0ec00000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb-pcix-460gt", "ibm,plb-pcix"; - primary; - large-inbound-windows; - enable-msi-hole; - reg = ; /* Internal messaging registers */ - - /* Outbound ranges, one memory and one IO, - * later cannot be changed - */ - ranges = <02000000 0 80000000 0000000d 80000000 0 80000000 - 01000000 0 00000000 0000000c 08000000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* This drives busses 0 to 0x3f */ - bus-range = <0 3f>; - - /* All PCI interrupts are routed to ext IRQ 2 -> UIC1-0 */ - interrupt-map-mask = <0000 0 0 0>; - interrupt-map = < 0000 0 0 0 &UIC1 0 8 >; - }; - - PCIE0: pciex@d00000000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; - primary; - port = <0>; /* port number */ - reg = ; /* Registers */ - dcr-reg = <100 020>; - sdr-base = <300>; - - /* Outbound ranges, one memory and one IO, - * later cannot be changed - */ - ranges = <02000000 0 80000000 0000000e 00000000 0 80000000 - 01000000 0 00000000 0000000f 80000000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* This drives busses 40 to 0x7f */ - bus-range = <40 7f>; - - /* Legacy interrupts (note the weird polarity, the bridge seems - * to invert PCIe legacy interrupts). - * We are de-swizzling here because the numbers are actually for - * port of the root complex virtual P2P bridge. But I want - * to avoid putting a node for it in the tree, so the numbers - * below are basically de-swizzled numbers. - * The real slot is on idsel 0, so the swizzling is 1:1 - */ - interrupt-map-mask = <0000 0 0 7>; - interrupt-map = < - 0000 0 0 1 &UIC3 c 4 /* swizzled int A */ - 0000 0 0 2 &UIC3 d 4 /* swizzled int B */ - 0000 0 0 3 &UIC3 e 4 /* swizzled int C */ - 0000 0 0 4 &UIC3 f 4 /* swizzled int D */>; - }; - - PCIE1: pciex@d20000000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb-pciex-460ex", "ibm,plb-pciex"; - primary; - port = <1>; /* port number */ - reg = ; /* Registers */ - dcr-reg = <120 020>; - sdr-base = <340>; - - /* Outbound ranges, one memory and one IO, - * later cannot be changed - */ - ranges = <02000000 0 80000000 0000000e 80000000 0 80000000 - 01000000 0 00000000 0000000f 80010000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* This drives busses 80 to 0xbf */ - bus-range = <80 bf>; - - /* Legacy interrupts (note the weird polarity, the bridge seems - * to invert PCIe legacy interrupts). - * We are de-swizzling here because the numbers are actually for - * port of the root complex virtual P2P bridge. But I want - * to avoid putting a node for it in the tree, so the numbers - * below are basically de-swizzled numbers. - * The real slot is on idsel 0, so the swizzling is 1:1 - */ - interrupt-map-mask = <0000 0 0 7>; - interrupt-map = < - 0000 0 0 1 &UIC3 10 4 /* swizzled int A */ - 0000 0 0 2 &UIC3 11 4 /* swizzled int B */ - 0000 0 0 3 &UIC3 12 4 /* swizzled int C */ - 0000 0 0 4 &UIC3 13 4 /* swizzled int D */>; - }; - }; -}; diff --git a/trunk/arch/powerpc/boot/dts/haleakala.dts b/trunk/arch/powerpc/boot/dts/haleakala.dts index 02e4ba31dc44..ae68fefc01b6 100644 --- a/trunk/arch/powerpc/boot/dts/haleakala.dts +++ b/trunk/arch/powerpc/boot/dts/haleakala.dts @@ -12,7 +12,7 @@ #address-cells = <1>; #size-cells = <1>; model = "amcc,haleakala"; - compatible = "amcc,haleakala", "amcc,kilauea"; + compatible = "amcc,kilauea"; dcr-parent = <&/cpus/cpu@0>; aliases { diff --git a/trunk/arch/powerpc/boot/dts/rainier.dts b/trunk/arch/powerpc/boot/dts/rainier.dts index 9f6f58b2e077..f947c75a2e94 100644 --- a/trunk/arch/powerpc/boot/dts/rainier.dts +++ b/trunk/arch/powerpc/boot/dts/rainier.dts @@ -254,6 +254,7 @@ }; EMAC0: ethernet@ef600e00 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; interrupt-parent = <&EMAC0>; @@ -283,6 +284,7 @@ }; EMAC1: ethernet@ef600f00 { + linux,network-index = <1>; device_type = "network"; compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; interrupt-parent = <&EMAC1>; diff --git a/trunk/arch/powerpc/boot/dts/sequoia.dts b/trunk/arch/powerpc/boot/dts/sequoia.dts index 675026bf1fb0..8db9515d7dc3 100644 --- a/trunk/arch/powerpc/boot/dts/sequoia.dts +++ b/trunk/arch/powerpc/boot/dts/sequoia.dts @@ -269,6 +269,7 @@ }; EMAC0: ethernet@ef600e00 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440epx", "ibm,emac4"; interrupt-parent = <&EMAC0>; @@ -298,6 +299,7 @@ }; EMAC1: ethernet@ef600f00 { + linux,network-index = <1>; device_type = "network"; compatible = "ibm,emac-440epx", "ibm,emac4"; interrupt-parent = <&EMAC1>; diff --git a/trunk/arch/powerpc/boot/dts/taishan.dts b/trunk/arch/powerpc/boot/dts/taishan.dts index 96d033d6c05e..8278068c802c 100644 --- a/trunk/arch/powerpc/boot/dts/taishan.dts +++ b/trunk/arch/powerpc/boot/dts/taishan.dts @@ -104,16 +104,6 @@ // FIXME: anything else? }; - L2C0: l2c { - compatible = "ibm,l2-cache-440gx", "ibm,l2-cache"; - dcr-reg = <20 8 /* Internal SRAM DCR's */ - 30 8>; /* L2 cache DCR's */ - cache-line-size = <20>; /* 32 bytes */ - cache-size = <40000>; /* L2, 256K */ - interrupt-parent = <&UIC2>; - interrupts = <17 1>; - }; - plb { compatible = "ibm,plb-440gx", "ibm,plb4"; #address-cells = <2>; @@ -242,18 +232,10 @@ reg = <40000790 8>; }; - TAH0: emac-tah@40000b50 { - compatible = "ibm,tah-440gx", "ibm,tah"; - reg = <40000b50 30>; - }; - - TAH1: emac-tah@40000d50 { - compatible = "ibm,tah-440gx", "ibm,tah"; - reg = <40000d50 30>; - }; EMAC0: ethernet@40000800 { unused = <1>; + linux,network-index = <2>; device_type = "network"; compatible = "ibm,emac-440gx", "ibm,emac4"; interrupt-parent = <&UIC1>; @@ -274,6 +256,7 @@ }; EMAC1: ethernet@40000900 { unused = <1>; + linux,network-index = <3>; device_type = "network"; compatible = "ibm,emac-440gx", "ibm,emac4"; interrupt-parent = <&UIC1>; @@ -294,6 +277,7 @@ }; EMAC2: ethernet@40000c00 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440gx", "ibm,emac4"; interrupt-parent = <&UIC2>; @@ -313,11 +297,10 @@ rgmii-channel = <0>; zmii-device = <&ZMII0>; zmii-channel = <2>; - tah-device = <&TAH0>; - tah-channel = <0>; }; EMAC3: ethernet@40000e00 { + linux,network-index = <1>; device_type = "network"; compatible = "ibm,emac-440gx", "ibm,emac4"; interrupt-parent = <&UIC2>; @@ -337,8 +320,6 @@ rgmii-channel = <1>; zmii-device = <&ZMII0>; zmii-channel = <3>; - tah-device = <&TAH1>; - tah-channel = <0>; }; diff --git a/trunk/arch/powerpc/boot/dts/walnut.dts b/trunk/arch/powerpc/boot/dts/walnut.dts index a328607c8f84..dcc21b0438e5 100644 --- a/trunk/arch/powerpc/boot/dts/walnut.dts +++ b/trunk/arch/powerpc/boot/dts/walnut.dts @@ -125,6 +125,7 @@ }; EMAC: ethernet@ef600800 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-405gp", "ibm,emac"; interrupt-parent = <&UIC0>; diff --git a/trunk/arch/powerpc/boot/dts/warp.dts b/trunk/arch/powerpc/boot/dts/warp.dts index b04a52e22bf5..dc1499d30f43 100644 --- a/trunk/arch/powerpc/boot/dts/warp.dts +++ b/trunk/arch/powerpc/boot/dts/warp.dts @@ -204,6 +204,7 @@ }; EMAC0: ethernet@ef600e00 { + linux,network-index = <0>; device_type = "network"; compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; interrupt-parent = <&UIC1>; diff --git a/trunk/arch/powerpc/boot/dts/yosemite.dts b/trunk/arch/powerpc/boot/dts/yosemite.dts deleted file mode 100644 index 0d6d332814e0..000000000000 --- a/trunk/arch/powerpc/boot/dts/yosemite.dts +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Device Tree Source for AMCC Yosemite - * - * Copyright 2008 IBM Corp. - * Josh Boyer - * - * 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. - */ - -/ { - #address-cells = <2>; - #size-cells = <1>; - model = "amcc,yosemite"; - compatible = "amcc,yosemite","amcc,bamboo"; - dcr-parent = <&/cpus/cpu@0>; - - aliases { - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - serial0 = &UART0; - serial1 = &UART1; - serial2 = &UART2; - serial3 = &UART3; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - model = "PowerPC,440EP"; - reg = <0>; - clock-frequency = <0>; /* Filled in by zImage */ - timebase-frequency = <0>; /* Filled in by zImage */ - i-cache-line-size = <20>; - d-cache-line-size = <20>; - i-cache-size = <8000>; - d-cache-size = <8000>; - dcr-controller; - dcr-access-method = "native"; - }; - }; - - memory { - device_type = "memory"; - reg = <0 0 0>; /* Filled in by zImage */ - }; - - UIC0: interrupt-controller0 { - compatible = "ibm,uic-440ep","ibm,uic"; - interrupt-controller; - cell-index = <0>; - dcr-reg = <0c0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - }; - - UIC1: interrupt-controller1 { - compatible = "ibm,uic-440ep","ibm,uic"; - interrupt-controller; - cell-index = <1>; - dcr-reg = <0d0 009>; - #address-cells = <0>; - #size-cells = <0>; - #interrupt-cells = <2>; - interrupts = <1e 4 1f 4>; /* cascade */ - interrupt-parent = <&UIC0>; - }; - - SDR0: sdr { - compatible = "ibm,sdr-440ep"; - dcr-reg = <00e 002>; - }; - - CPR0: cpr { - compatible = "ibm,cpr-440ep"; - dcr-reg = <00c 002>; - }; - - plb { - compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4"; - #address-cells = <2>; - #size-cells = <1>; - ranges; - clock-frequency = <0>; /* Filled in by zImage */ - - SDRAM0: sdram { - compatible = "ibm,sdram-440ep", "ibm,sdram-405gp"; - dcr-reg = <010 2>; - }; - - DMA0: dma { - compatible = "ibm,dma-440ep", "ibm,dma-440gp"; - dcr-reg = <100 027>; - }; - - MAL0: mcmal { - compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal"; - dcr-reg = <180 62>; - num-tx-chans = <4>; - num-rx-chans = <2>; - interrupt-parent = <&MAL0>; - interrupts = <0 1 2 3 4>; - #interrupt-cells = <1>; - #address-cells = <0>; - #size-cells = <0>; - interrupt-map = ; - }; - - POB0: opb { - compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb"; - #address-cells = <1>; - #size-cells = <1>; - /* Bamboo is oddball in the 44x world and doesn't use the ERPN - * bits. - */ - ranges = <00000000 0 00000000 80000000 - 80000000 0 80000000 80000000>; - interrupt-parent = <&UIC1>; - interrupts = <7 4>; - clock-frequency = <0>; /* Filled in by zImage */ - - EBC0: ebc { - compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc"; - dcr-reg = <012 2>; - #address-cells = <2>; - #size-cells = <1>; - clock-frequency = <0>; /* Filled in by zImage */ - interrupts = <5 1>; - interrupt-parent = <&UIC1>; - }; - - UART0: serial@ef600300 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; /* Filled in by zImage */ - current-speed = <1c200>; - interrupt-parent = <&UIC0>; - interrupts = <0 4>; - }; - - UART1: serial@ef600400 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; - current-speed = <0>; - interrupt-parent = <&UIC0>; - interrupts = <1 4>; - }; - - UART2: serial@ef600500 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; - current-speed = <0>; - interrupt-parent = <&UIC0>; - interrupts = <3 4>; - status = "disabled"; - }; - - UART3: serial@ef600600 { - device_type = "serial"; - compatible = "ns16550"; - reg = ; - virtual-reg = ; - clock-frequency = <0>; - current-speed = <0>; - interrupt-parent = <&UIC0>; - interrupts = <4 4>; - status = "disabled"; - }; - - IIC0: i2c@ef600700 { - compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; - reg = ; - interrupt-parent = <&UIC0>; - interrupts = <2 4>; - }; - - IIC1: i2c@ef600800 { - compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic"; - reg = ; - interrupt-parent = <&UIC0>; - interrupts = <7 4>; - }; - - spi@ef600900 { - compatible = "amcc,spi-440ep"; - reg = ; - interrupts = <8 4>; - interrupt-parent = <&UIC0>; - }; - - ZMII0: emac-zmii@ef600d00 { - compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii"; - reg = ; - }; - - EMAC0: ethernet@ef600e00 { - device_type = "network"; - compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; - interrupt-parent = <&UIC1>; - interrupts = <1c 4 1d 4>; - reg = ; - local-mac-address = [000000000000]; - mal-device = <&MAL0>; - mal-tx-channel = <0 1>; - mal-rx-channel = <0>; - cell-index = <0>; - max-frame-size = <5dc>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rmii"; - phy-map = <00000000>; - zmii-device = <&ZMII0>; - zmii-channel = <0>; - }; - - EMAC1: ethernet@ef600f00 { - device_type = "network"; - compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; - interrupt-parent = <&UIC1>; - interrupts = <1e 4 1f 4>; - reg = ; - local-mac-address = [000000000000]; - mal-device = <&MAL0>; - mal-tx-channel = <2 3>; - mal-rx-channel = <1>; - cell-index = <1>; - max-frame-size = <5dc>; - rx-fifo-size = <1000>; - tx-fifo-size = <800>; - phy-mode = "rmii"; - phy-map = <00000000>; - zmii-device = <&ZMII0>; - zmii-channel = <1>; - }; - - usb@ef601000 { - compatible = "ohci-be"; - reg = ; - interrupts = <8 4 9 4>; - interrupt-parent = < &UIC1 >; - }; - }; - - PCI0: pci@ec000000 { - device_type = "pci"; - #interrupt-cells = <1>; - #size-cells = <2>; - #address-cells = <3>; - compatible = "ibm,plb440ep-pci", "ibm,plb-pci"; - primary; - reg = <0 eec00000 8 /* Config space access */ - 0 eed00000 4 /* IACK */ - 0 eed00000 4 /* Special cycle */ - 0 ef400000 40>; /* Internal registers */ - - /* Outbound ranges, one memory and one IO, - * later cannot be changed. Chip supports a second - * IO range but we don't use it for now - */ - ranges = <02000000 0 a0000000 0 a0000000 0 20000000 - 01000000 0 00000000 0 e8000000 0 00010000>; - - /* Inbound 2GB range starting at 0 */ - dma-ranges = <42000000 0 0 0 0 0 80000000>; - - /* Bamboo has all 4 IRQ pins tied together per slot */ - interrupt-map-mask = ; - interrupt-map = < - /* IDSEL 1 */ - 0800 0 0 0 &UIC0 1c 8 - - /* IDSEL 2 */ - 1000 0 0 0 &UIC0 1b 8 - - /* IDSEL 3 */ - 1800 0 0 0 &UIC0 1a 8 - - /* IDSEL 4 */ - 2000 0 0 0 &UIC0 19 8 - >; - }; - }; - - chosen { - linux,stdout-path = "/plb/opb/serial@ef600300"; - }; -}; diff --git a/trunk/arch/powerpc/boot/ebony.c b/trunk/arch/powerpc/boot/ebony.c index 5532ab3221dd..f61364c47a76 100644 --- a/trunk/arch/powerpc/boot/ebony.c +++ b/trunk/arch/powerpc/boot/ebony.c @@ -75,8 +75,7 @@ static void ebony_fixups(void) ibm440gp_fixup_clocks(sysclk, 6 * 1843200); ibm4xx_sdram_fixup_memsize(); - dt_fixup_mac_address_by_alias("ethernet0", ebony_mac0); - dt_fixup_mac_address_by_alias("ethernet1", ebony_mac1); + dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); ebony_flashsel_fixup(); } diff --git a/trunk/arch/powerpc/boot/treeboot-walnut.c b/trunk/arch/powerpc/boot/treeboot-walnut.c index 097974e59fac..472e36605a52 100644 --- a/trunk/arch/powerpc/boot/treeboot-walnut.c +++ b/trunk/arch/powerpc/boot/treeboot-walnut.c @@ -68,7 +68,7 @@ static void walnut_fixups(void) ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); ibm4xx_fixup_ebc_ranges("/plb/ebc"); walnut_flashsel_fixup(); - dt_fixup_mac_address_by_alias("ethernet0", (u8 *) WALNUT_OPENBIOS_MAC_OFF); + dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF); } void platform_init(void) diff --git a/trunk/arch/powerpc/configs/canyonlands_defconfig b/trunk/arch/powerpc/configs/canyonlands_defconfig deleted file mode 100644 index a3b763c45ec6..000000000000 --- a/trunk/arch/powerpc/configs/canyonlands_defconfig +++ /dev/null @@ -1,721 +0,0 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.25-rc1 -# Thu Feb 21 14:29:28 2008 -# -# CONFIG_PPC64 is not set - -# -# Processor support -# -# CONFIG_6xx is not set -# CONFIG_PPC_85xx is not set -# CONFIG_PPC_8xx is not set -# CONFIG_40x is not set -CONFIG_44x=y -# CONFIG_E200 is not set -CONFIG_PPC_FPU=y -CONFIG_4xx=y -CONFIG_BOOKE=y -CONFIG_PTE_64BIT=y -CONFIG_PHYS_64BIT=y -# CONFIG_PPC_MM_SLICES is not set -CONFIG_NOT_COHERENT_CACHE=y -CONFIG_PPC32=y -CONFIG_WORD_SIZE=32 -CONFIG_PPC_MERGE=y -CONFIG_MMU=y -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_GENERIC_TIME=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_HARDIRQS=y -# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set -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 is not set -CONFIG_PPC_DCR_NATIVE=y -# CONFIG_PPC_DCR_MMIO is not set -CONFIG_PPC_DCR=y -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=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_CGROUPS is not set -# CONFIG_FAIR_GROUP_SCHED is not set -CONFIG_SYSFS_DEPRECATED=y -# CONFIG_RELAY is not set -# CONFIG_NAMESPACES 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_ALL is not set -# CONFIG_KALLSYMS_EXTRA_PASS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -# CONFIG_LOGBUFFER is not set -CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_COMPAT_BRK=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_ANON_INODES=y -CONFIG_EPOLL=y -CONFIG_SIGNALFD=y -CONFIG_TIMERFD=y -CONFIG_EVENTFD=y -CONFIG_SHMEM=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_SLUB_DEBUG=y -# CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set -# CONFIG_PROFILING is not set -# CONFIG_MARKERS is not set -CONFIG_HAVE_OPROFILE=y -# CONFIG_KPROBES is not set -CONFIG_HAVE_KPROBES=y -CONFIG_PROC_PAGE_MONITOR=y -CONFIG_SLABINFO=y -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=y -CONFIG_BLOCK=y -CONFIG_LBD=y -# 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" -CONFIG_CLASSIC_RCU=y -# CONFIG_PREEMPT_RCU is not set -CONFIG_PPC4xx_PCI_EXPRESS=y - -# -# Platform support -# -# CONFIG_PPC_MPC512x is not set -# CONFIG_PPC_MPC5121 is not set -# CONFIG_PPC_CELL is not set -# CONFIG_PPC_CELL_NATIVE is not set -# CONFIG_PQ2ADS is not set -# CONFIG_BAMBOO is not set -# CONFIG_EBONY is not set -# CONFIG_SEQUOIA is not set -# CONFIG_TAISHAN is not set -# CONFIG_KATMAI is not set -# CONFIG_RAINIER is not set -# CONFIG_WARP is not set -CONFIG_CANYONLANDS=y -CONFIG_460EX=y -# CONFIG_IPIC is not set -# 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_FSL_ULI1575 is not set - -# -# Kernel options -# -# CONFIG_HIGHMEM is not set -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -# 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_SCHED_HRTICK is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_RCU_TRACE=y -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -# CONFIG_MATH_EMULATION is not set -# CONFIG_IOMMU_HELPER is not set -CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y -CONFIG_ARCH_HAS_WALK_MEMORY=y -CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=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_SPARSEMEM_VMEMMAP_ENABLE is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_RESOURCES_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_BOUNCE=y -CONFIG_VIRT_TO_BUS=y -CONFIG_PROC_DEVICETREE=y -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="" -CONFIG_SECCOMP=y -CONFIG_WANT_DEVICE_TREE=y -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -CONFIG_ZONE_DMA=y -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_SYSCALL=y -# CONFIG_PCIEPORTBUS is not set -CONFIG_ARCH_SUPPORTS_MSI=y -# CONFIG_PCI_MSI is not set -CONFIG_PCI_LEGACY=y -# CONFIG_PCI_DEBUG is not set -# CONFIG_PCCARD is not set -# CONFIG_HOTPLUG_PCI 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=0xc0000000 -CONFIG_CONSISTENT_START=0xff100000 -CONFIG_CONSISTENT_SIZE=0x00200000 -CONFIG_BOOT_LOAD=0x01000000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -# CONFIG_PACKET_MMAP is not set -CONFIG_UNIX=y -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# 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_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# 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 is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_LRO is not set -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 -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_CAN 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_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set -# CONFIG_SYS_HYPERVISOR is not set -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y -# 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_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_SX8 is not set -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=35000 -# CONFIG_BLK_DEV_XIP is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -# CONFIG_XILINX_SYSACE is not set -# CONFIG_MISC_DEVICES is not set -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set -# CONFIG_SCSI_DMA is not set -# CONFIG_SCSI_NETLINK is not set -# CONFIG_ATA is not set -# CONFIG_MD is not set -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_FIREWIRE is not set -# CONFIG_IEEE1394 is not set -# CONFIG_I2O 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_VETH is not set -# CONFIG_ARCNET is not set -# CONFIG_PHYLIB is not set -CONFIG_NET_ETHERNET=y -# CONFIG_MII is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_IBM_NEW_EMAC=y -CONFIG_IBM_NEW_EMAC_RXB=256 -CONFIG_IBM_NEW_EMAC_TXB=256 -CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32 -CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256 -CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0 -# CONFIG_IBM_NEW_EMAC_DEBUG is not set -CONFIG_IBM_NEW_EMAC_ZMII=y -CONFIG_IBM_NEW_EMAC_RGMII=y -CONFIG_IBM_NEW_EMAC_TAH=y -CONFIG_IBM_NEW_EMAC_EMAC4=y -# CONFIG_NET_PCI is not set -# CONFIG_B44 is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set -# CONFIG_TR is not set - -# -# Wireless LAN -# -# CONFIG_WLAN_PRE80211 is not set -# CONFIG_WLAN_80211 is not set -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP 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 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 -# CONFIG_NOZOMI is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_8250_EXTENDED=y -# CONFIG_SERIAL_8250_MANY_PORTS is not set -CONFIG_SERIAL_8250_SHARE_IRQ=y -# CONFIG_SERIAL_8250_DETECT_IRQ is not set -# CONFIG_SERIAL_8250_RSA 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_JSM is not set -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_IPMI_HANDLER is not set -# CONFIG_HW_RANDOM is not set -# CONFIG_NVRAM is not set -# CONFIG_GEN_RTC is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_TCG_TPM is not set -CONFIG_DEVPORT=y -# CONFIG_I2C 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 is not set -# CONFIG_THERMAL is not set -# CONFIG_WATCHDOG is not set - -# -# Sonics Silicon Backplane -# -CONFIG_SSB_POSSIBLE=y -# CONFIG_SSB 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_AGP is not set -# CONFIG_DRM is not set -# CONFIG_VGASTATE is not set -CONFIG_VIDEO_OUTPUT_CONTROL=m -# CONFIG_FB is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set - -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set - -# -# Sound -# -# CONFIG_SOUND is not set -# CONFIG_USB_SUPPORT is not set -# CONFIG_MMC is not set -# CONFIG_MEMSTICK is not set -# CONFIG_NEW_LEDS is not set -# CONFIG_INFINIBAND is not set -# CONFIG_EDAC is not set -# CONFIG_RTC_CLASS is not set - -# -# 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 is not set -# CONFIG_EXT4DEV_FS is not set -# 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_DNOTIFY=y -CONFIG_INOTIFY=y -CONFIG_INOTIFY_USER=y -# CONFIG_QUOTA is not set -# 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_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=y -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=y -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -# CONFIG_NFS_V4 is not set -# 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_BIND34 is not set -# CONFIG_RPCSEC_GSS_KRB5 is not set -# 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 is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_NLS is not set -# CONFIG_DLM 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_ZLIB_INFLATE=y -CONFIG_PLIST=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_DMA=y - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_MAGIC_SYSRQ=y -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHED_DEBUG=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_TIMER_STATS is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_BOOT_PRINTK_DELAY is not set -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_SAMPLES is not set -# CONFIG_DEBUG_STACKOVERFLOW is not set -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUGGER=y -# CONFIG_KGDB is not set -# CONFIG_XMON is not set -# CONFIG_VIRQ_DEBUG is not set -# CONFIG_BDI_SWITCH is not set -# CONFIG_PPC_EARLY_DEBUG is not set - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITY_FILE_CAPABILITIES is not set -# CONFIG_CRYPTO is not set -# CONFIG_PPC_CLOCK is not set diff --git a/trunk/arch/powerpc/kernel/cpu_setup_44x.S b/trunk/arch/powerpc/kernel/cpu_setup_44x.S index 5465e8de0e61..6250443ab9c9 100644 --- a/trunk/arch/powerpc/kernel/cpu_setup_44x.S +++ b/trunk/arch/powerpc/kernel/cpu_setup_44x.S @@ -3,7 +3,7 @@ * Valentine Barshak * MontaVista Software, Inc (c) 2007 * - * Based on cpu_setup_6xx code by + * Based on cpu_setup_6xx code by * Benjamin Herrenschmidt * * This program is free software; you can redistribute it and/or @@ -32,9 +32,6 @@ _GLOBAL(__setup_cpu_440grx) bl __fixup_440A_mcheck mtlr r4 blr -_GLOBAL(__setup_cpu_460ex) -_GLOBAL(__setup_cpu_460gt) - b __init_fpu_44x _GLOBAL(__setup_cpu_440gx) _GLOBAL(__setup_cpu_440spe) b __fixup_440A_mcheck diff --git a/trunk/arch/powerpc/kernel/cputable.c b/trunk/arch/powerpc/kernel/cputable.c index 26ffb44e2701..2a8f5cc5184f 100644 --- a/trunk/arch/powerpc/kernel/cputable.c +++ b/trunk/arch/powerpc/kernel/cputable.c @@ -36,8 +36,6 @@ extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec); -extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec); -extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); @@ -1399,30 +1397,6 @@ static struct cpu_spec __initdata cpu_specs[] = { .machine_check = machine_check_440A, .platform = "ppc440", }, - { /* 460EX */ - .pvr_mask = 0xffff0002, - .pvr_value = 0x13020002, - .cpu_name = "460EX", - .cpu_features = CPU_FTRS_44X, - .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, - .icache_bsize = 32, - .dcache_bsize = 32, - .cpu_setup = __setup_cpu_460ex, - .machine_check = machine_check_440A, - .platform = "ppc440", - }, - { /* 460GT */ - .pvr_mask = 0xffff0002, - .pvr_value = 0x13020000, - .cpu_name = "460GT", - .cpu_features = CPU_FTRS_44X, - .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, - .icache_bsize = 32, - .dcache_bsize = 32, - .cpu_setup = __setup_cpu_460gt, - .machine_check = machine_check_440A, - .platform = "ppc440", - }, #endif /* CONFIG_44x */ #ifdef CONFIG_FSL_BOOKE #ifdef CONFIG_E200 @@ -1538,7 +1512,7 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) *t = *s; *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE) - /* ppc64 and booke expect identify_cpu to also call + /* ppc64 and booke expect identify_cpu to also call * setup_cpu for that processor. I will consolidate * that at a later time, for now, just use #ifdef. * we also don't need to PTRRELOC the function pointer diff --git a/trunk/arch/powerpc/platforms/44x/Kconfig b/trunk/arch/powerpc/platforms/44x/Kconfig index 5fc28aa459e3..1bfb2191010a 100644 --- a/trunk/arch/powerpc/platforms/44x/Kconfig +++ b/trunk/arch/powerpc/platforms/44x/Kconfig @@ -67,25 +67,6 @@ config WARP See http://www.pikatechnologies.com/ and follow the "PIKA for Computer Telephony Developers" link for more information. -config CANYONLANDS - bool "Canyonlands" - depends on 44x - default n - select 460EX - select PCI - select PPC4xx_PCI_EXPRESS - help - This option enables support for the AMCC PPC460EX evaluation board. - -config YOSEMITE - bool "Yosemite" - depends on 44x - default n - select 440EP - select PCI - help - This option enables support for the AMCC PPC440EP evaluation board. - #config LUAN # bool "Luan" # depends on 44x @@ -129,7 +110,6 @@ config 440GP config 440GX bool - select 4xx_SOC select IBM_NEW_EMAC_EMAC4 select IBM_NEW_EMAC_RGMII select IBM_NEW_EMAC_ZMII #test only @@ -142,14 +122,6 @@ config 440SPe bool select IBM_NEW_EMAC_EMAC4 -config 460EX - bool - select PPC_FPU - select IBM_NEW_EMAC_EMAC4 - select IBM_NEW_EMAC_RGMII - select IBM_NEW_EMAC_ZMII - select IBM_NEW_EMAC_TAH - # 44x errata/workaround config symbols, selected by the CPU models above config IBM440EP_ERR42 bool diff --git a/trunk/arch/powerpc/platforms/44x/Makefile b/trunk/arch/powerpc/platforms/44x/Makefile index 2320ae5dc8a7..0864d4f1cbc2 100644 --- a/trunk/arch/powerpc/platforms/44x/Makefile +++ b/trunk/arch/powerpc/platforms/44x/Makefile @@ -2,10 +2,8 @@ obj-$(CONFIG_44x) := misc_44x.o obj-$(CONFIG_EBONY) += ebony.o obj-$(CONFIG_TAISHAN) += taishan.o obj-$(CONFIG_BAMBOO) += bamboo.o -obj-$(CONFIG_YOSEMITE) += bamboo.o obj-$(CONFIG_SEQUOIA) += sequoia.o obj-$(CONFIG_KATMAI) += katmai.o obj-$(CONFIG_RAINIER) += rainier.o obj-$(CONFIG_WARP) += warp.o obj-$(CONFIG_WARP) += warp-nand.o -obj-$(CONFIG_CANYONLANDS) += canyonlands.o diff --git a/trunk/arch/powerpc/platforms/44x/canyonlands.c b/trunk/arch/powerpc/platforms/44x/canyonlands.c deleted file mode 100644 index dac5b3203696..000000000000 --- a/trunk/arch/powerpc/platforms/44x/canyonlands.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Canyonlands board specific routines - * - * Copyright 2008 DENX Software Engineering, Stefan Roese - * - * Based on the Katmai code by - * Benjamin Herrenschmidt - * Copyright 2007 IBM Corp. - * Josh Boyer - * Copyright 2007 IBM Corporation - * - * 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 - -#include "44x.h" - -static __initdata struct of_device_id canyonlands_of_bus[] = { - { .compatible = "ibm,plb4", }, - { .compatible = "ibm,opb", }, - { .compatible = "ibm,ebc", }, - {}, -}; - -static int __init canyonlands_device_probe(void) -{ - of_platform_bus_probe(NULL, canyonlands_of_bus, NULL); - - return 0; -} -machine_device_initcall(canyonlands, canyonlands_device_probe); - -static int __init canyonlands_probe(void) -{ - unsigned long root = of_get_flat_dt_root(); - - if (!of_flat_dt_is_compatible(root, "amcc,canyonlands")) - return 0; - - ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC; - - return 1; -} - -define_machine(canyonlands) { - .name = "Canyonlands", - .probe = canyonlands_probe, - .progress = udbg_progress, - .init_IRQ = uic_init_tree, - .get_irq = uic_get_irq, - .restart = ppc44x_reset_system, - .calibrate_decr = generic_calibrate_decr, -}; diff --git a/trunk/arch/powerpc/platforms/85xx/Kconfig b/trunk/arch/powerpc/platforms/85xx/Kconfig index 7e76ddbd5821..28bc6e58a970 100644 --- a/trunk/arch/powerpc/platforms/85xx/Kconfig +++ b/trunk/arch/powerpc/platforms/85xx/Kconfig @@ -46,6 +46,13 @@ config MPC85xx_DS help This option enables support for the MPC85xx DS (MPC8544 DS) board +config KSI8560 + bool "Emerson KSI8560" + select PPC_CPM_NEW_BINDING + select DEFAULT_UIMAGE + help + This option enables support for the Emerson KSI8560 board + config STX_GP3 bool "Silicon Turnkey Express GP3" help diff --git a/trunk/arch/powerpc/platforms/85xx/Makefile b/trunk/arch/powerpc/platforms/85xx/Makefile index cb7af4ebd75f..6cea185f62b2 100644 --- a/trunk/arch/powerpc/platforms/85xx/Makefile +++ b/trunk/arch/powerpc/platforms/85xx/Makefile @@ -10,3 +10,4 @@ obj-$(CONFIG_STX_GP3) += stx_gp3.o obj-$(CONFIG_TQM85xx) += tqm85xx.o obj-$(CONFIG_SBC8560) += sbc8560.o obj-$(CONFIG_SBC8548) += sbc8548.o +obj-$(CONFIG_KSI8560) += ksi8560.o diff --git a/trunk/arch/powerpc/platforms/85xx/ksi8560.c b/trunk/arch/powerpc/platforms/85xx/ksi8560.c new file mode 100644 index 000000000000..2145adeb220c --- /dev/null +++ b/trunk/arch/powerpc/platforms/85xx/ksi8560.c @@ -0,0 +1,257 @@ +/* + * Board setup routines for the Emerson KSI8560 + * + * Author: Alexandr Smirnov + * + * Based on mpc85xx_ads.c maintained by Kumar Gala + * + * 2008 (c) MontaVista, Software, 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 + + +#define KSI8560_CPLD_HVR 0x04 /* Hardware Version Register */ +#define KSI8560_CPLD_PVR 0x08 /* PLD Version Register */ +#define KSI8560_CPLD_RCR1 0x30 /* Reset Command Register 1 */ + +#define KSI8560_CPLD_RCR1_CPUHR 0x80 /* CPU Hard Reset */ + +static void __iomem *cpld_base = NULL; + +static void machine_restart(char *cmd) +{ + if (cpld_base) + out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR); + else + printk(KERN_ERR "Can't find CPLD base, hang forever\n"); + + for (;;); +} + +static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) +{ + int cascade_irq; + + while ((cascade_irq = cpm2_get_irq()) >= 0) + generic_handle_irq(cascade_irq); + + desc->chip->eoi(irq); +} + +static void __init ksi8560_pic_init(void) +{ + struct mpic *mpic; + struct resource r; + struct device_node *np; +#ifdef CONFIG_CPM2 + int irq; +#endif + + np = of_find_node_by_type(NULL, "open-pic"); + + if (np == NULL) { + printk(KERN_ERR "Could not find open-pic node\n"); + return; + } + + if (of_address_to_resource(np, 0, &r)) { + printk(KERN_ERR "Could not map mpic register space\n"); + of_node_put(np); + return; + } + + mpic = mpic_alloc(np, r.start, + MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, + 0, 256, " OpenPIC "); + BUG_ON(mpic == NULL); + of_node_put(np); + + mpic_init(mpic); + +#ifdef CONFIG_CPM2 + /* Setup CPM2 PIC */ + np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic"); + if (np == NULL) { + printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n"); + return; + } + irq = irq_of_parse_and_map(np, 0); + + cpm2_pic_init(np); + of_node_put(np); + set_irq_chained_handler(irq, cpm2_cascade); + + setup_irq(0, NULL); +#endif +} + +#ifdef CONFIG_CPM2 +/* + * Setup I/O ports + */ +struct cpm_pin { + int port, pin, flags; +}; + +static struct cpm_pin __initdata ksi8560_pins[] = { + /* SCC1 */ + {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, + {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + + /* SCC2 */ + {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + + /* FCC1 */ + {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, + {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, + {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, + {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, + {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, + {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, + {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, + {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, + {2, 23, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK9 */ + {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK10 */ + +}; + +static void __init init_ioports(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(ksi8560_pins); i++) { + struct cpm_pin *pin = &ksi8560_pins[i]; + cpm2_set_pin(pin->port, pin->pin, pin->flags); + } + + cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); + cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); + cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX); + cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX); + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_RX); + cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX); +} +#endif + +/* + * Setup the architecture + */ +static void __init ksi8560_setup_arch(void) +{ + struct device_node *cpld; + + cpld = of_find_compatible_node(NULL, NULL, "emerson,KSI8560-cpld"); + if (cpld) + cpld_base = of_iomap(cpld, 0); + else + printk(KERN_ERR "Can't find CPLD in device tree\n"); + + if (ppc_md.progress) + ppc_md.progress("ksi8560_setup_arch()", 0); + +#ifdef CONFIG_CPM2 + cpm2_reset(); + init_ioports(); +#endif +} + +static void ksi8560_show_cpuinfo(struct seq_file *m) +{ + uint pvid, svid, phid1; + uint memsize = total_memory; + + pvid = mfspr(SPRN_PVR); + svid = mfspr(SPRN_SVR); + + seq_printf(m, "Vendor\t\t: Emerson Network Power\n"); + seq_printf(m, "Board\t\t: KSI8560\n"); + + if (cpld_base) { + seq_printf(m, "Hardware rev\t: %d\n", + in_8(cpld_base + KSI8560_CPLD_HVR)); + seq_printf(m, "CPLD rev\t: %d\n", + in_8(cpld_base + KSI8560_CPLD_PVR)); + } else + seq_printf(m, "Unknown Hardware and CPLD revs\n"); + + seq_printf(m, "PVR\t\t: 0x%x\n", pvid); + seq_printf(m, "SVR\t\t: 0x%x\n", svid); + + /* Display cpu Pll setting */ + phid1 = mfspr(SPRN_HID1); + seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); + + /* Display the amount of memory */ + seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); +} + +static struct of_device_id __initdata of_bus_ids[] = { + { .type = "soc", }, + { .name = "cpm", }, + { .name = "localbus", }, + {}, +}; + +static int __init declare_of_platform_devices(void) +{ + of_platform_bus_probe(NULL, of_bus_ids, NULL); + + return 0; +} +machine_device_initcall(ksi8560, declare_of_platform_devices); + +/* + * Called very early, device-tree isn't unflattened + */ +static int __init ksi8560_probe(void) +{ + unsigned long root = of_get_flat_dt_root(); + + return of_flat_dt_is_compatible(root, "emerson,KSI8560"); +} + +define_machine(ksi8560) { + .name = "KSI8560", + .probe = ksi8560_probe, + .setup_arch = ksi8560_setup_arch, + .init_IRQ = ksi8560_pic_init, + .show_cpuinfo = ksi8560_show_cpuinfo, + .get_irq = mpic_get_irq, + .restart = machine_restart, + .calibrate_decr = generic_calibrate_decr, +}; diff --git a/trunk/arch/powerpc/sysdev/Makefile b/trunk/arch/powerpc/sysdev/Makefile index 851a0be71947..15f3e8527d77 100644 --- a/trunk/arch/powerpc/sysdev/Makefile +++ b/trunk/arch/powerpc/sysdev/Makefile @@ -27,7 +27,6 @@ obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o obj-$(CONFIG_PPC_I8259) += i8259.o obj-$(CONFIG_IPIC) += ipic.o obj-$(CONFIG_4xx) += uic.o -obj-$(CONFIG_4xx_SOC) += ppc4xx_soc.o obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o obj-$(CONFIG_OF_RTC) += of_rtc.o ifeq ($(CONFIG_PCI),y) diff --git a/trunk/arch/powerpc/sysdev/ppc4xx_pci.c b/trunk/arch/powerpc/sysdev/ppc4xx_pci.c index 6c925b7975f9..5abfcd157483 100644 --- a/trunk/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/trunk/arch/powerpc/sysdev/ppc4xx_pci.c @@ -527,7 +527,6 @@ static void __init ppc4xx_probe_pcix_bridge(struct device_node *np) * * ibm,plb-pciex-440spe * ibm,plb-pciex-405ex - * ibm,plb-pciex-460ex * * Anything else will be rejected for now as they are all subtly * different unfortunately. @@ -646,7 +645,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np) int time_out = 20; /* Set PLL clock receiver to LVPECL */ - dcri_clrset(SDR0, PESDR0_PLLLCT1, 0, 1 << 28); + mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28); /* Shouldn't we do all the calibration stuff etc... here ? */ if (ppc440spe_pciex_check_reset(np)) @@ -660,7 +659,8 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np) } /* De-assert reset of PCIe PLL, wait for lock */ - dcri_clrset(SDR0, PESDR0_PLLLCT1, 1 << 24, 0); + mtdcri(SDR0, PESDR0_PLLLCT1, + mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24)); udelay(3); while (time_out) { @@ -712,8 +712,9 @@ static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port) mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1, 0x35000000); } - dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, - (1 << 24) | (1 << 16), 1 << 12); + val = mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET); + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, + (val & ~(1 << 24 | 1 << 16)) | 1 << 12); return 0; } @@ -774,117 +775,6 @@ static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata = .setup_utl = ppc440speB_pciex_init_utl, }; -static int __init ppc460ex_pciex_core_init(struct device_node *np) -{ - /* Nothing to do, return 2 ports */ - return 2; -} - -static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) -{ - u32 val; - u32 utlset1; - - if (port->endpoint) { - val = PTYPE_LEGACY_ENDPOINT << 20; - utlset1 = 0x20222222; - } else { - val = PTYPE_ROOT_PORT << 20; - utlset1 = 0x21222222; - } - - if (port->index == 0) { - val |= LNKW_X1 << 12; - } else { - val |= LNKW_X4 << 12; - utlset1 |= 0x00101101; - } - - mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val); - mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, utlset1); - mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01210000); - - switch (port->index) { - case 0: - mtdcri(SDR0, PESDR0_460EX_L0CDRCTL, 0x00003230); - mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000136); - mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006); - - mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST,0x10000000); - break; - - case 1: - mtdcri(SDR0, PESDR1_460EX_L0CDRCTL, 0x00003230); - mtdcri(SDR0, PESDR1_460EX_L1CDRCTL, 0x00003230); - mtdcri(SDR0, PESDR1_460EX_L2CDRCTL, 0x00003230); - mtdcri(SDR0, PESDR1_460EX_L3CDRCTL, 0x00003230); - mtdcri(SDR0, PESDR1_460EX_L0DRV, 0x00000136); - mtdcri(SDR0, PESDR1_460EX_L1DRV, 0x00000136); - mtdcri(SDR0, PESDR1_460EX_L2DRV, 0x00000136); - mtdcri(SDR0, PESDR1_460EX_L3DRV, 0x00000136); - mtdcri(SDR0, PESDR1_460EX_L0CLK, 0x00000006); - mtdcri(SDR0, PESDR1_460EX_L1CLK, 0x00000006); - mtdcri(SDR0, PESDR1_460EX_L2CLK, 0x00000006); - mtdcri(SDR0, PESDR1_460EX_L3CLK, 0x00000006); - - mtdcri(SDR0, PESDR1_460EX_PHY_CTL_RST,0x10000000); - break; - } - - mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, - mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | - (PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTPYN)); - - /* Poll for PHY reset */ - /* XXX FIXME add timeout */ - switch (port->index) { - case 0: - while (!(mfdcri(SDR0, PESDR0_460EX_RSTSTA) & 0x1)) - udelay(10); - break; - case 1: - while (!(mfdcri(SDR0, PESDR1_460EX_RSTSTA) & 0x1)) - udelay(10); - break; - } - - mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, - (mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) & - ~(PESDRx_RCSSET_RSTGU | PESDRx_RCSSET_RSTDL)) | - PESDRx_RCSSET_RSTPYN); - - port->has_ibpre = 1; - - return 0; -} - -static int ppc460ex_pciex_init_utl(struct ppc4xx_pciex_port *port) -{ - dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0); - - /* - * Set buffer allocations and then assert VRB and TXE. - */ - out_be32(port->utl_base + PEUTL_PBCTL, 0x0800000c); - out_be32(port->utl_base + PEUTL_OUTTR, 0x08000000); - out_be32(port->utl_base + PEUTL_INTR, 0x02000000); - out_be32(port->utl_base + PEUTL_OPDBSZ, 0x04000000); - out_be32(port->utl_base + PEUTL_PBBSZ, 0x00000000); - out_be32(port->utl_base + PEUTL_IPHBSZ, 0x02000000); - out_be32(port->utl_base + PEUTL_IPDBSZ, 0x04000000); - out_be32(port->utl_base + PEUTL_RCIRQEN,0x00f00000); - out_be32(port->utl_base + PEUTL_PCTL, 0x80800066); - - return 0; -} - -static struct ppc4xx_pciex_hwops ppc460ex_pcie_hwops __initdata = -{ - .core_init = ppc460ex_pciex_core_init, - .port_init_hw = ppc460ex_pciex_init_port_hw, - .setup_utl = ppc460ex_pciex_init_utl, -}; - #endif /* CONFIG_44x */ #ifdef CONFIG_40x @@ -1006,8 +896,6 @@ static int __init ppc4xx_pciex_check_core_init(struct device_node *np) else ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops; } - if (of_device_is_compatible(np, "ibm,plb-pciex-460ex")) - ppc4xx_pciex_hwops = &ppc460ex_pcie_hwops; #endif /* CONFIG_44x */ #ifdef CONFIG_40x if (of_device_is_compatible(np, "ibm,plb-pciex-405ex")) @@ -1154,7 +1042,8 @@ static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port) port->link = 0; } - dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, 0, 1 << 20); + mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, + mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20); msleep(100); return 0; diff --git a/trunk/arch/powerpc/sysdev/ppc4xx_pci.h b/trunk/arch/powerpc/sysdev/ppc4xx_pci.h index d04e40b306fb..1c07908dc6ef 100644 --- a/trunk/arch/powerpc/sysdev/ppc4xx_pci.h +++ b/trunk/arch/powerpc/sysdev/ppc4xx_pci.h @@ -270,59 +270,6 @@ #define PESDR1_405EX_LPB 0x044B #define PESDR1_405EX_PHYSTA 0x044C -/* - * 460EX additional DCRs - */ -#define PESDR0_460EX_L0BIST 0x0308 -#define PESDR0_460EX_L0BISTSTS 0x0309 -#define PESDR0_460EX_L0CDRCTL 0x030A -#define PESDR0_460EX_L0DRV 0x030B -#define PESDR0_460EX_L0REC 0x030C -#define PESDR0_460EX_L0LPB 0x030D -#define PESDR0_460EX_L0CLK 0x030E -#define PESDR0_460EX_PHY_CTL_RST 0x030F -#define PESDR0_460EX_RSTSTA 0x0310 -#define PESDR0_460EX_OBS 0x0311 -#define PESDR0_460EX_L0ERRC 0x0320 - -#define PESDR1_460EX_L0BIST 0x0348 -#define PESDR1_460EX_L1BIST 0x0349 -#define PESDR1_460EX_L2BIST 0x034A -#define PESDR1_460EX_L3BIST 0x034B -#define PESDR1_460EX_L0BISTSTS 0x034C -#define PESDR1_460EX_L1BISTSTS 0x034D -#define PESDR1_460EX_L2BISTSTS 0x034E -#define PESDR1_460EX_L3BISTSTS 0x034F -#define PESDR1_460EX_L0CDRCTL 0x0350 -#define PESDR1_460EX_L1CDRCTL 0x0351 -#define PESDR1_460EX_L2CDRCTL 0x0352 -#define PESDR1_460EX_L3CDRCTL 0x0353 -#define PESDR1_460EX_L0DRV 0x0354 -#define PESDR1_460EX_L1DRV 0x0355 -#define PESDR1_460EX_L2DRV 0x0356 -#define PESDR1_460EX_L3DRV 0x0357 -#define PESDR1_460EX_L0REC 0x0358 -#define PESDR1_460EX_L1REC 0x0359 -#define PESDR1_460EX_L2REC 0x035A -#define PESDR1_460EX_L3REC 0x035B -#define PESDR1_460EX_L0LPB 0x035C -#define PESDR1_460EX_L1LPB 0x035D -#define PESDR1_460EX_L2LPB 0x035E -#define PESDR1_460EX_L3LPB 0x035F -#define PESDR1_460EX_L0CLK 0x0360 -#define PESDR1_460EX_L1CLK 0x0361 -#define PESDR1_460EX_L2CLK 0x0362 -#define PESDR1_460EX_L3CLK 0x0363 -#define PESDR1_460EX_PHY_CTL_RST 0x0364 -#define PESDR1_460EX_RSTSTA 0x0365 -#define PESDR1_460EX_OBS 0x0366 -#define PESDR1_460EX_L0ERRC 0x0368 -#define PESDR1_460EX_L1ERRC 0x0369 -#define PESDR1_460EX_L2ERRC 0x036A -#define PESDR1_460EX_L3ERRC 0x036B -#define PESDR0_460EX_IHS1 0x036C -#define PESDR0_460EX_IHS2 0x036D - /* * Of the above, some are common offsets from the base */ @@ -406,12 +353,6 @@ #define PECFG_POM2LAL 0x390 #define PECFG_POM2LAH 0x394 -/* SDR Bit Mappings */ -#define PESDRx_RCSSET_HLDPLB 0x10000000 -#define PESDRx_RCSSET_RSTGU 0x01000000 -#define PESDRx_RCSSET_RDY 0x00100000 -#define PESDRx_RCSSET_RSTDL 0x00010000 -#define PESDRx_RCSSET_RSTPYN 0x00001000 enum { diff --git a/trunk/arch/powerpc/sysdev/ppc4xx_soc.c b/trunk/arch/powerpc/sysdev/ppc4xx_soc.c deleted file mode 100644 index 4b8617e44314..000000000000 --- a/trunk/arch/powerpc/sysdev/ppc4xx_soc.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * IBM/AMCC PPC4xx SoC setup code - * - * Copyright 2008 DENX Software Engineering, Stefan Roese - * - * L2 cache routines cloned from arch/ppc/syslib/ibm440gx_common.c which is: - * Eugene Surovegin or - * Copyright (c) 2003 - 2006 Zultys Technologies - * - * 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 -#include - -static u32 dcrbase_l2c; - -/* - * L2-cache - */ - -/* Issue L2C diagnostic command */ -static inline u32 l2c_diag(u32 addr) -{ - mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, addr); - mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_DIAG); - while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC)) - ; - - return mfdcr(dcrbase_l2c + DCRN_L2C0_DATA); -} - -static irqreturn_t l2c_error_handler(int irq, void *dev) -{ - u32 sr = mfdcr(dcrbase_l2c + DCRN_L2C0_SR); - - if (sr & L2C_SR_CPE) { - /* Read cache trapped address */ - u32 addr = l2c_diag(0x42000000); - printk(KERN_EMERG "L2C: Cache Parity Error, addr[16:26] = 0x%08x\n", - addr); - } - if (sr & L2C_SR_TPE) { - /* Read tag trapped address */ - u32 addr = l2c_diag(0x82000000) >> 16; - printk(KERN_EMERG "L2C: Tag Parity Error, addr[16:26] = 0x%08x\n", - addr); - } - - /* Clear parity errors */ - if (sr & (L2C_SR_CPE | L2C_SR_TPE)){ - mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, 0); - mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE); - } else { - printk(KERN_EMERG "L2C: LRU error\n"); - } - - return IRQ_HANDLED; -} - -static int __init ppc4xx_l2c_probe(void) -{ - struct device_node *np; - u32 r; - unsigned long flags; - int irq; - const u32 *dcrreg; - u32 dcrbase_isram; - int len; - const u32 *prop; - u32 l2_size; - - np = of_find_compatible_node(NULL, NULL, "ibm,l2-cache"); - if (!np) - return 0; - - /* Get l2 cache size */ - prop = of_get_property(np, "cache-size", NULL); - if (prop == NULL) { - printk(KERN_ERR "%s: Can't get cache-size!\n", np->full_name); - of_node_put(np); - return -ENODEV; - } - l2_size = prop[0]; - - /* Map DCRs */ - dcrreg = of_get_property(np, "dcr-reg", &len); - if (!dcrreg || (len != 4 * sizeof(u32))) { - printk(KERN_ERR "%s: Can't get DCR register base !", - np->full_name); - of_node_put(np); - return -ENODEV; - } - dcrbase_isram = dcrreg[0]; - dcrbase_l2c = dcrreg[2]; - - /* Get and map irq number from device tree */ - irq = irq_of_parse_and_map(np, 0); - if (irq == NO_IRQ) { - printk(KERN_ERR "irq_of_parse_and_map failed\n"); - of_node_put(np); - return -ENODEV; - } - - /* Install error handler */ - if (request_irq(irq, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0) { - printk(KERN_ERR "Cannot install L2C error handler" - ", cache is not enabled\n"); - of_node_put(np); - return -ENODEV; - } - - local_irq_save(flags); - asm volatile ("sync" ::: "memory"); - - /* Disable SRAM */ - mtdcr(dcrbase_isram + DCRN_SRAM0_DPC, - mfdcr(dcrbase_isram + DCRN_SRAM0_DPC) & ~SRAM_DPC_ENABLE); - mtdcr(dcrbase_isram + DCRN_SRAM0_SB0CR, - mfdcr(dcrbase_isram + DCRN_SRAM0_SB0CR) & ~SRAM_SBCR_BU_MASK); - mtdcr(dcrbase_isram + DCRN_SRAM0_SB1CR, - mfdcr(dcrbase_isram + DCRN_SRAM0_SB1CR) & ~SRAM_SBCR_BU_MASK); - mtdcr(dcrbase_isram + DCRN_SRAM0_SB2CR, - mfdcr(dcrbase_isram + DCRN_SRAM0_SB2CR) & ~SRAM_SBCR_BU_MASK); - mtdcr(dcrbase_isram + DCRN_SRAM0_SB3CR, - mfdcr(dcrbase_isram + DCRN_SRAM0_SB3CR) & ~SRAM_SBCR_BU_MASK); - - /* Enable L2_MODE without ICU/DCU */ - r = mfdcr(dcrbase_l2c + DCRN_L2C0_CFG) & - ~(L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_SS_MASK); - r |= L2C_CFG_L2M | L2C_CFG_SS_256; - mtdcr(dcrbase_l2c + DCRN_L2C0_CFG, r); - - mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, 0); - - /* Hardware Clear Command */ - mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_HCC); - while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC)) - ; - - /* Clear Cache Parity and Tag Errors */ - mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_CCP | L2C_CMD_CTE); - - /* Enable 64G snoop region starting at 0 */ - r = mfdcr(dcrbase_l2c + DCRN_L2C0_SNP0) & - ~(L2C_SNP_BA_MASK | L2C_SNP_SSR_MASK); - r |= L2C_SNP_SSR_32G | L2C_SNP_ESR; - mtdcr(dcrbase_l2c + DCRN_L2C0_SNP0, r); - - r = mfdcr(dcrbase_l2c + DCRN_L2C0_SNP1) & - ~(L2C_SNP_BA_MASK | L2C_SNP_SSR_MASK); - r |= 0x80000000 | L2C_SNP_SSR_32G | L2C_SNP_ESR; - mtdcr(dcrbase_l2c + DCRN_L2C0_SNP1, r); - - asm volatile ("sync" ::: "memory"); - - /* Enable ICU/DCU ports */ - r = mfdcr(dcrbase_l2c + DCRN_L2C0_CFG); - r &= ~(L2C_CFG_DCW_MASK | L2C_CFG_PMUX_MASK | L2C_CFG_PMIM - | L2C_CFG_TPEI | L2C_CFG_CPEI | L2C_CFG_NAM | L2C_CFG_NBRM); - r |= L2C_CFG_ICU | L2C_CFG_DCU | L2C_CFG_TPC | L2C_CFG_CPC | L2C_CFG_FRAN - | L2C_CFG_CPIM | L2C_CFG_TPIM | L2C_CFG_LIM | L2C_CFG_SMCM; - - /* Check for 460EX/GT special handling */ - if (of_device_is_compatible(np, "ibm,l2-cache-460ex")) - r |= L2C_CFG_RDBW; - - mtdcr(dcrbase_l2c + DCRN_L2C0_CFG, r); - - asm volatile ("sync; isync" ::: "memory"); - local_irq_restore(flags); - - printk(KERN_INFO "%dk L2-cache enabled\n", l2_size >> 10); - - of_node_put(np); - return 0; -} -arch_initcall(ppc4xx_l2c_probe); diff --git a/trunk/drivers/char/xilinx_hwicap/buffer_icap.c b/trunk/drivers/char/xilinx_hwicap/buffer_icap.c index aa7f7962a9a0..f577daedb630 100644 --- a/trunk/drivers/char/xilinx_hwicap/buffer_icap.c +++ b/trunk/drivers/char/xilinx_hwicap/buffer_icap.c @@ -74,7 +74,7 @@ /** * buffer_icap_get_status - Get the contents of the status register. - * @drvdata: a pointer to the drvdata. + * @base_address: is the base address of the device * * The status register contains the ICAP status and the done bit. * @@ -88,9 +88,9 @@ * D1 - Always 1 * D0 - Done bit **/ -u32 buffer_icap_get_status(struct hwicap_drvdata *drvdata) +static inline u32 buffer_icap_get_status(void __iomem *base_address) { - return in_be32(drvdata->base_address + XHI_STATUS_REG_OFFSET); + return in_be32(base_address + XHI_STATUS_REG_OFFSET); } /** @@ -117,8 +117,20 @@ static inline u32 buffer_icap_get_bram(void __iomem *base_address, **/ static inline bool buffer_icap_busy(void __iomem *base_address) { - u32 status = in_be32(base_address + XHI_STATUS_REG_OFFSET); - return (status & 1) == XHI_NOT_FINISHED; + return (buffer_icap_get_status(base_address) & 1) == XHI_NOT_FINISHED; +} + +/** + * buffer_icap_busy - Return true if the icap device is not busy + * @base_address: is the base address of the device + * + * The queries the low order bit of the status register, which + * indicates whether the current configuration or readback operation + * has completed. + **/ +static inline bool buffer_icap_done(void __iomem *base_address) +{ + return (buffer_icap_get_status(base_address) & 1) == XHI_FINISHED; } /** diff --git a/trunk/drivers/char/xilinx_hwicap/buffer_icap.h b/trunk/drivers/char/xilinx_hwicap/buffer_icap.h index c5b1840906b2..03184959fa00 100644 --- a/trunk/drivers/char/xilinx_hwicap/buffer_icap.h +++ b/trunk/drivers/char/xilinx_hwicap/buffer_icap.h @@ -44,6 +44,8 @@ #include #include "xilinx_hwicap.h" +void buffer_icap_reset(struct hwicap_drvdata *drvdata); + /* Loads a partial bitstream from system memory. */ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, u32 Size); @@ -52,7 +54,4 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data, u32 Size); -u32 buffer_icap_get_status(struct hwicap_drvdata *drvdata); -void buffer_icap_reset(struct hwicap_drvdata *drvdata); - #endif diff --git a/trunk/drivers/char/xilinx_hwicap/fifo_icap.c b/trunk/drivers/char/xilinx_hwicap/fifo_icap.c index 776b50528478..6f45dbd47125 100644 --- a/trunk/drivers/char/xilinx_hwicap/fifo_icap.c +++ b/trunk/drivers/char/xilinx_hwicap/fifo_icap.c @@ -78,6 +78,13 @@ #define XHI_CR_READ_MASK 0x00000002 /* Read from ICAP to FIFO */ #define XHI_CR_WRITE_MASK 0x00000001 /* Write from FIFO to ICAP */ +/* Status Register (SR) */ +#define XHI_SR_CFGERR_N_MASK 0x00000100 /* Config Error Mask */ +#define XHI_SR_DALIGN_MASK 0x00000080 /* Data Alignment Mask */ +#define XHI_SR_RIP_MASK 0x00000040 /* Read back Mask */ +#define XHI_SR_IN_ABORT_N_MASK 0x00000020 /* Select Map Abort Mask */ +#define XHI_SR_DONE_MASK 0x00000001 /* Done bit Mask */ + #define XHI_WFO_MAX_VACANCY 1024 /* Max Write FIFO Vacancy, in words */ #define XHI_RFO_MAX_OCCUPANCY 256 /* Max Read FIFO Occupancy, in words */ @@ -144,29 +151,6 @@ static inline void fifo_icap_start_readback(struct hwicap_drvdata *drvdata) dev_dbg(drvdata->dev, "readback started\n"); } -/** - * fifo_icap_get_status - Get the contents of the status register. - * @drvdata: a pointer to the drvdata. - * - * The status register contains the ICAP status and the done bit. - * - * D8 - cfgerr - * D7 - dalign - * D6 - rip - * D5 - in_abort_l - * D4 - Always 1 - * D3 - Always 1 - * D2 - Always 1 - * D1 - Always 1 - * D0 - Done bit - **/ -u32 fifo_icap_get_status(struct hwicap_drvdata *drvdata) -{ - u32 status = in_be32(drvdata->base_address + XHI_SR_OFFSET); - dev_dbg(drvdata->dev, "Getting status = %x\n", status); - return status; -} - /** * fifo_icap_busy - Return true if the ICAP is still processing a transaction. * @drvdata: a pointer to the drvdata. @@ -174,6 +158,7 @@ u32 fifo_icap_get_status(struct hwicap_drvdata *drvdata) static inline u32 fifo_icap_busy(struct hwicap_drvdata *drvdata) { u32 status = in_be32(drvdata->base_address + XHI_SR_OFFSET); + dev_dbg(drvdata->dev, "Getting status = %x\n", status); return (status & XHI_SR_DONE_MASK) ? 0 : 1; } diff --git a/trunk/drivers/char/xilinx_hwicap/fifo_icap.h b/trunk/drivers/char/xilinx_hwicap/fifo_icap.h index ffabd3ba2bd8..4d3068dd0405 100644 --- a/trunk/drivers/char/xilinx_hwicap/fifo_icap.h +++ b/trunk/drivers/char/xilinx_hwicap/fifo_icap.h @@ -56,7 +56,6 @@ int fifo_icap_set_configuration( u32 *FrameBuffer, u32 NumWords); -u32 fifo_icap_get_status(struct hwicap_drvdata *drvdata); void fifo_icap_reset(struct hwicap_drvdata *drvdata); void fifo_icap_flush_fifo(struct hwicap_drvdata *drvdata); diff --git a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 016f90567a52..2284fa2a5a57 100644 --- a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.c @@ -36,7 +36,7 @@ *****************************************************************************/ /* - * This is the code behind /dev/icap* -- it allows a user-space + * This is the code behind /dev/xilinx_icap -- it allows a user-space * application to use the Xilinx ICAP subsystem. * * The following operations are possible: @@ -67,7 +67,7 @@ * user-space application code that uses this device. The simplest * way to use this interface is simply: * - * cp foo.bit /dev/icap0 + * cp foo.bit /dev/xilinx_icap * * Note that unless foo.bit is an appropriately constructed partial * bitstream, this has a high likelyhood of overwriting the design @@ -105,14 +105,18 @@ #include "buffer_icap.h" #include "fifo_icap.h" -#define DRIVER_NAME "icap" +#define DRIVER_NAME "xilinx_icap" #define HWICAP_REGS (0x10000) -#define XHWICAP_MAJOR 259 -#define XHWICAP_MINOR 0 +/* dynamically allocate device number */ +static int xhwicap_major; +static int xhwicap_minor; #define HWICAP_DEVICES 1 +module_param(xhwicap_major, int, S_IRUGO); +module_param(xhwicap_minor, int, S_IRUGO); + /* An array, which is set to true when the device is registered. */ static bool probed_devices[HWICAP_DEVICES]; static struct mutex icap_sem; @@ -246,26 +250,8 @@ static int hwicap_get_configuration_register(struct hwicap_drvdata *drvdata, * Create the data to be written to the ICAP. */ buffer[index++] = XHI_DUMMY_PACKET; - buffer[index++] = XHI_NOOP_PACKET; buffer[index++] = XHI_SYNC_PACKET; buffer[index++] = XHI_NOOP_PACKET; - buffer[index++] = XHI_NOOP_PACKET; - - /* - * Write the data to the FIFO and initiate the transfer of data present - * in the FIFO to the ICAP device. - */ - status = drvdata->config->set_configuration(drvdata, - &buffer[0], index); - if (status) - return status; - - /* If the syncword was not found, then we need to start over. */ - status = drvdata->config->get_status(drvdata); - if ((status & XHI_SR_DALIGN_MASK) != XHI_SR_DALIGN_MASK) - return -EIO; - - index = 0; buffer[index++] = hwicap_type_1_read(reg) | 1; buffer[index++] = XHI_NOOP_PACKET; buffer[index++] = XHI_NOOP_PACKET; @@ -601,7 +587,7 @@ static int __devinit hwicap_setup(struct device *dev, int id, probed_devices[id] = 1; mutex_unlock(&icap_sem); - devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR + id); + devt = MKDEV(xhwicap_major, xhwicap_minor + id); drvdata = kzalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL); if (!drvdata) { @@ -678,14 +664,12 @@ static int __devinit hwicap_setup(struct device *dev, int id, static struct hwicap_driver_config buffer_icap_config = { .get_configuration = buffer_icap_get_configuration, .set_configuration = buffer_icap_set_configuration, - .get_status = buffer_icap_get_status, .reset = buffer_icap_reset, }; static struct hwicap_driver_config fifo_icap_config = { .get_configuration = fifo_icap_get_configuration, .set_configuration = fifo_icap_set_configuration, - .get_status = fifo_icap_get_status, .reset = fifo_icap_reset, }; @@ -706,7 +690,7 @@ static int __devexit hwicap_remove(struct device *dev) dev_set_drvdata(dev, NULL); mutex_lock(&icap_sem); - probed_devices[MINOR(dev->devt)-XHWICAP_MINOR] = 0; + probed_devices[MINOR(dev->devt)-xhwicap_minor] = 0; mutex_unlock(&icap_sem); return 0; /* success */ } @@ -846,12 +830,23 @@ static int __init hwicap_module_init(void) icap_class = class_create(THIS_MODULE, "xilinx_config"); mutex_init(&icap_sem); - devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR); - retval = register_chrdev_region(devt, - HWICAP_DEVICES, - DRIVER_NAME); - if (retval < 0) - return retval; + if (xhwicap_major) { + devt = MKDEV(xhwicap_major, xhwicap_minor); + retval = register_chrdev_region( + devt, + HWICAP_DEVICES, + DRIVER_NAME); + if (retval < 0) + return retval; + } else { + retval = alloc_chrdev_region(&devt, + xhwicap_minor, + HWICAP_DEVICES, + DRIVER_NAME); + if (retval < 0) + return retval; + xhwicap_major = MAJOR(devt); + } retval = platform_driver_register(&hwicap_platform_driver); @@ -876,7 +871,7 @@ static int __init hwicap_module_init(void) static void __exit hwicap_module_cleanup(void) { - dev_t devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR); + dev_t devt = MKDEV(xhwicap_major, xhwicap_minor); class_destroy(icap_class); diff --git a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h index 1f9c8b082dbe..405fee7e189b 100644 --- a/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h +++ b/trunk/drivers/char/xilinx_hwicap/xilinx_hwicap.h @@ -65,27 +65,10 @@ struct hwicap_drvdata { }; struct hwicap_driver_config { - /* Read configuration data given by size into the data buffer. - Return 0 if successful. */ int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data, u32 size); - /* Write configuration data given by size from the data buffer. - Return 0 if successful. */ int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data, u32 size); - /* Get the status register, bit pattern given by: - * D8 - 0 = configuration error - * D7 - 1 = alignment found - * D6 - 1 = readback in progress - * D5 - 0 = abort in progress - * D4 - Always 1 - * D3 - Always 1 - * D2 - Always 1 - * D1 - Always 1 - * D0 - 1 = operation completed - */ - u32 (*get_status)(struct hwicap_drvdata *drvdata); - /* Reset the hw */ void (*reset)(struct hwicap_drvdata *drvdata); }; @@ -180,13 +163,6 @@ struct config_registers { /* Constant to use for CRC check when CRC has been disabled */ #define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL -/* Meanings of the bits returned by get_status */ -#define XHI_SR_CFGERR_N_MASK 0x00000100 /* Config Error Mask */ -#define XHI_SR_DALIGN_MASK 0x00000080 /* Data Alignment Mask */ -#define XHI_SR_RIP_MASK 0x00000040 /* Read back Mask */ -#define XHI_SR_IN_ABORT_N_MASK 0x00000020 /* Select Map Abort Mask */ -#define XHI_SR_DONE_MASK 0x00000001 /* Done bit Mask */ - /** * hwicap_type_1_read - Generates a Type 1 read packet header. * @reg: is the address of the register to be read back. diff --git a/trunk/include/asm-powerpc/dcr-native.h b/trunk/include/asm-powerpc/dcr-native.h index f8398ce80372..be6c879e8760 100644 --- a/trunk/include/asm-powerpc/dcr-native.h +++ b/trunk/include/asm-powerpc/dcr-native.h @@ -82,19 +82,6 @@ static inline void __mtdcri(int base_addr, int base_data, int reg, spin_unlock_irqrestore(&dcr_ind_lock, flags); } -static inline void __dcri_clrset(int base_addr, int base_data, int reg, - unsigned clr, unsigned set) -{ - unsigned long flags; - unsigned int val; - - spin_lock_irqsave(&dcr_ind_lock, flags); - __mtdcr(base_addr, reg); - val = (__mfdcr(base_data) & ~clr) | set; - __mtdcr(base_data, val); - spin_unlock_irqrestore(&dcr_ind_lock, flags); -} - #define mfdcri(base, reg) __mfdcri(DCRN_ ## base ## _CONFIG_ADDR, \ DCRN_ ## base ## _CONFIG_DATA, \ reg) @@ -103,10 +90,6 @@ static inline void __dcri_clrset(int base_addr, int base_data, int reg, DCRN_ ## base ## _CONFIG_DATA, \ reg, data) -#define dcri_clrset(base, reg, clr, set) __dcri_clrset(DCRN_ ## base ## _CONFIG_ADDR, \ - DCRN_ ## base ## _CONFIG_DATA, \ - reg, clr, set) - #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_DCR_NATIVE_H */ diff --git a/trunk/include/asm-powerpc/dcr-regs.h b/trunk/include/asm-powerpc/dcr-regs.h index 29b0ecef980a..9f1fb98fcdc6 100644 --- a/trunk/include/asm-powerpc/dcr-regs.h +++ b/trunk/include/asm-powerpc/dcr-regs.h @@ -68,82 +68,4 @@ #define SDR0_UART3 0x0123 #define SDR0_CUST0 0x4000 -/* - * All those DCR register addresses are offsets from the base address - * for the SRAM0 controller (e.g. 0x20 on 440GX). The base address is - * excluded here and configured in the device tree. - */ -#define DCRN_SRAM0_SB0CR 0x00 -#define DCRN_SRAM0_SB1CR 0x01 -#define DCRN_SRAM0_SB2CR 0x02 -#define DCRN_SRAM0_SB3CR 0x03 -#define SRAM_SBCR_BU_MASK 0x00000180 -#define SRAM_SBCR_BS_64KB 0x00000800 -#define SRAM_SBCR_BU_RO 0x00000080 -#define SRAM_SBCR_BU_RW 0x00000180 -#define DCRN_SRAM0_BEAR 0x04 -#define DCRN_SRAM0_BESR0 0x05 -#define DCRN_SRAM0_BESR1 0x06 -#define DCRN_SRAM0_PMEG 0x07 -#define DCRN_SRAM0_CID 0x08 -#define DCRN_SRAM0_REVID 0x09 -#define DCRN_SRAM0_DPC 0x0a -#define SRAM_DPC_ENABLE 0x80000000 - -/* - * All those DCR register addresses are offsets from the base address - * for the SRAM0 controller (e.g. 0x30 on 440GX). The base address is - * excluded here and configured in the device tree. - */ -#define DCRN_L2C0_CFG 0x00 -#define L2C_CFG_L2M 0x80000000 -#define L2C_CFG_ICU 0x40000000 -#define L2C_CFG_DCU 0x20000000 -#define L2C_CFG_DCW_MASK 0x1e000000 -#define L2C_CFG_TPC 0x01000000 -#define L2C_CFG_CPC 0x00800000 -#define L2C_CFG_FRAN 0x00200000 -#define L2C_CFG_SS_MASK 0x00180000 -#define L2C_CFG_SS_256 0x00000000 -#define L2C_CFG_CPIM 0x00040000 -#define L2C_CFG_TPIM 0x00020000 -#define L2C_CFG_LIM 0x00010000 -#define L2C_CFG_PMUX_MASK 0x00007000 -#define L2C_CFG_PMUX_SNP 0x00000000 -#define L2C_CFG_PMUX_IF 0x00001000 -#define L2C_CFG_PMUX_DF 0x00002000 -#define L2C_CFG_PMUX_DS 0x00003000 -#define L2C_CFG_PMIM 0x00000800 -#define L2C_CFG_TPEI 0x00000400 -#define L2C_CFG_CPEI 0x00000200 -#define L2C_CFG_NAM 0x00000100 -#define L2C_CFG_SMCM 0x00000080 -#define L2C_CFG_NBRM 0x00000040 -#define L2C_CFG_RDBW 0x00000008 /* only 460EX/GT */ -#define DCRN_L2C0_CMD 0x01 -#define L2C_CMD_CLR 0x80000000 -#define L2C_CMD_DIAG 0x40000000 -#define L2C_CMD_INV 0x20000000 -#define L2C_CMD_CCP 0x10000000 -#define L2C_CMD_CTE 0x08000000 -#define L2C_CMD_STRC 0x04000000 -#define L2C_CMD_STPC 0x02000000 -#define L2C_CMD_RPMC 0x01000000 -#define L2C_CMD_HCC 0x00800000 -#define DCRN_L2C0_ADDR 0x02 -#define DCRN_L2C0_DATA 0x03 -#define DCRN_L2C0_SR 0x04 -#define L2C_SR_CC 0x80000000 -#define L2C_SR_CPE 0x40000000 -#define L2C_SR_TPE 0x20000000 -#define L2C_SR_LRU 0x10000000 -#define L2C_SR_PCS 0x08000000 -#define DCRN_L2C0_REVID 0x05 -#define DCRN_L2C0_SNP0 0x06 -#define DCRN_L2C0_SNP1 0x07 -#define L2C_SNP_BA_MASK 0xffff0000 -#define L2C_SNP_SSR_MASK 0x0000f000 -#define L2C_SNP_SSR_32G 0x0000f000 -#define L2C_SNP_ESR 0x00000800 - #endif /* __DCR_REGS_H__ */