<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hello all</DIV>
<DIV>  my company use ARM,amcc CPU for different prouduct. i support to add  [PATCH v1] APM821xx: Add support for new SoC APM821xx , now we do anythings for Linux develop and make easier for  ordinary user . </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>                                   leowang</DIV>
<DIV>                                   2010:09:11</DIV>
<DIV>  </DIV>
<DIV>Message: 3<BR>Date: Fri, 10 Sep 2010 11:27:37 -0700<BR>From: <A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=tmarri@apm.com" ymailto="mailto:tmarri@apm.com">tmarri@apm.com</A><BR>To: <A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=linuxppc-dev@lists.ozlabs.org" ymailto="mailto:linuxppc-dev@lists.ozlabs.org">linuxppc-dev@lists.ozlabs.org</A><BR>Cc: <A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=tmarri@apm.com" ymailto="mailto:tmarri@apm.com">tmarri@apm.com</A><BR>Subject: [PATCH v1] APM821xx: Add support for new SoC APM821xx<BR>Message-ID: <<A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=1284143257-15993-1-git-send-email-tmarri@apm.com" ymailto="mailto:1284143257-15993-1-git-send-email-tmarri@apm.com">1284143257-15993-1-git-send-email-tmarri@apm.com</A>><BR><BR>From: Tirumala Marri <<A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=tmarri@apm.com" ymailto="mailto:tmarri@apm.com">tmarri@apm.com</A>><BR><BR>This
 patch adds CPU, device tree, defconfig and bluestone board<BR>support for APM821xx SoC.<BR><BR>Signed-off-by: Tirumala R Marri <<A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=tmarri@apm.com" ymailto="mailto:tmarri@apm.com">tmarri@apm.com</A>><BR>---<BR>V1:<BR>  * CPU name changed to 464.<BR>  * defconfig is created using "make savedefconfig".<BR>---<BR>arch/powerpc/boot/dts/bluestone.dts          |  254 ++++++++++++++++++++++++++<BR>arch/powerpc/configs/44x/bluestone_defconfig |   68 +++++++<BR>arch/powerpc/kernel/cpu_setup_44x.S          |    1 +<BR>arch/powerpc/kernel/cputable.c               |   15 ++<BR>arch/powerpc/platforms/44x/Kconfig           |   16 ++<BR>arch/powerpc/platforms/44x/ppc44x_simple.c   |    1
 +<BR>6 files changed, 355 insertions(+), 0 deletions(-)<BR>create mode 100644 arch/powerpc/boot/dts/bluestone.dts<BR>create mode 100644 arch/powerpc/configs/44x/bluestone_defconfig<BR><BR>diff --git a/arch/powerpc/boot/dts/bluestone.dts b/arch/powerpc/boot/dts/bluestone.dts<BR>new file mode 100644<BR>index 0000000..bedcb8b<BR>--- /dev/null<BR>+++ b/arch/powerpc/boot/dts/bluestone.dts<BR>@@ -0,0 +1,254 @@<BR>+/*<BR>+ * Device Tree for Bluestone (APM821xx) board.<BR>+ *<BR>+ * Copyright (c) 2010, Applied Micro Circuits Corporation<BR>+ * All rights reserved. Tirumala R Marri <<A href="http://cn.mc153.mail.yahoo.com/mc/compose?to=tmarri@apm.com" ymailto="mailto:tmarri@apm.com">tmarri@apm.com</A>><BR>+ *<BR>+ * This program is free software; you can redistribute it and/or<BR>+ * modify it under the terms of the GNU General Public License as<BR>+ * published by the Free Software Foundation; either version 2 of<BR>+ * the License, or (at your option)
 any later version.<BR>+ *<BR>+ * This program is distributed in the hope that it will be useful,<BR>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<BR>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<BR>+ * GNU General Public License for more details.<BR>+ *<BR>+ * You should have received a copy of the GNU General Public License<BR>+ * along with this program; if not, write to the Free Software<BR>+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,<BR>+ * MA 02111-1307 USA<BR>+ *<BR>+ */<BR>+<BR>+/dts-v1/;<BR>+<BR>+/ {<BR>+    #address-cells = <2>;<BR>+    #size-cells = <1>;<BR>+    model = "apm,bluestone";<BR>+    compatible = "apm,bluestone";<BR>+    dcr-parent = <&{/cpus/cpu@0}>;<BR>+<BR>+    aliases {<BR>+        ethernet0 = &EMAC0;<BR>+   
     serial0 = &UART0;<BR>+        serial1 = &UART1;<BR>+    };<BR>+<BR>+    cpus {<BR>+        #address-cells = <1>;<BR>+        #size-cells = <0>;<BR>+<BR>+        cpu@0 {<BR>+            device_type = "cpu";<BR>+        model = "PowerPC,464";<BR>+            reg = <0x00000000>;<BR>+            clock-frequency = <0>; /* Filled in by U-Boot */<BR>+            timebase-frequency = <0>; /* Filled in by U-Boot */<BR>+            i-cache-line-size = <32>;<BR>+       
     d-cache-line-size = <32>;<BR>+            i-cache-size = <32768>;<BR>+            d-cache-size = <32768>;<BR>+            dcr-controller;<BR>+            dcr-access-method = "native";<BR>+            next-level-cache = <&L2C0>;<BR>+        };<BR>+    };<BR>+<BR>+    memory {<BR>+        device_type = "memory";<BR>+        reg = <0x00000000 0x00000000 0x00000000>; /* Filled in by U-Boot */<BR>+    };<BR>+<BR>+    UIC0: interrupt-controller0 {<BR>+        compatible = "ibm,uic";<BR>+   
     interrupt-controller;<BR>+        cell-index = <0>;<BR>+        dcr-reg = <0x0c0 0x009>;<BR>+        #address-cells = <0>;<BR>+        #size-cells = <0>;<BR>+        #interrupt-cells = <2>;<BR>+    };<BR>+<BR>+    UIC1: interrupt-controller1 {<BR>+        compatible = "ibm,uic";<BR>+        interrupt-controller;<BR>+        cell-index = <1>;<BR>+        dcr-reg = <0x0d0 0x009>;<BR>+        #address-cells = <0>;<BR>+        #size-cells = <0>;<BR>+        #interrupt-cells =
 <2>;<BR>+        interrupts = <0x1e 0x4 0x1f 0x4>; /* cascade */<BR>+        interrupt-parent = <&UIC0>;<BR>+    };<BR>+<BR>+    UIC2: interrupt-controller2 {<BR>+        compatible = "ibm,uic";<BR>+        interrupt-controller;<BR>+        cell-index = <2>;<BR>+        dcr-reg = <0x0e0 0x009>;<BR>+        #address-cells = <0>;<BR>+        #size-cells = <0>;<BR>+        #interrupt-cells = <2>;<BR>+        interrupts = <0xa 0x4 0xb 0x4>; /* cascade */<BR>+        interrupt-parent = <&UIC0>;<BR>+   
 };<BR>+<BR>+    UIC3: interrupt-controller3 {<BR>+        compatible = "ibm,uic";<BR>+        interrupt-controller;<BR>+        cell-index = <3>;<BR>+        dcr-reg = <0x0f0 0x009>;<BR>+        #address-cells = <0>;<BR>+        #size-cells = <0>;<BR>+        #interrupt-cells = <2>;<BR>+        interrupts = <0x10 0x4 0x11 0x4>; /* cascade */<BR>+        interrupt-parent = <&UIC0>;<BR>+    };<BR>+<BR>+    SDR0: sdr {<BR>+        compatible = "ibm,sdr-apm821xx";<BR>+        dcr-reg = <0x00e 0x002>;<BR>+   
 };<BR>+<BR>+    CPR0: cpr {<BR>+        compatible = "ibm,cpr-apm821xx";<BR>+        dcr-reg = <0x00c 0x002>;<BR>+    };<BR>+<BR>+    plb {<BR>+        compatible = "ibm,plb4";<BR>+        #address-cells = <2>;<BR>+        #size-cells = <1>;<BR>+        ranges;<BR>+        clock-frequency = <0>; /* Filled in by U-Boot */<BR>+<BR>+        SDRAM0: sdram {<BR>+            compatible = "ibm,sdram-apm821xx";<BR>+            dcr-reg = <0x010 0x002>;<BR>+        };<BR>+<BR>+        MAL0: mcmal
 {<BR>+            compatible = "ibm,mcmal2";<BR>+            descriptor-memory = "ocm";<BR>+            dcr-reg = <0x180 0x062>;<BR>+            num-tx-chans = <1>;<BR>+            num-rx-chans = <1>;<BR>+            #address-cells = <0>;<BR>+            #size-cells = <0>;<BR>+            interrupt-parent = <&UIC2>;<BR>+            interrupts = <    /*TXEOB*/ 0x6 0x4<BR>+                    /*RXEOB*/ 0x7
 0x4<BR>+                    /*SERR*/  0x3 0x4<BR>+                    /*TXDE*/  0x4 0x4<BR>+                    /*RXDE*/  0x5 0x4<BR>+        };<BR>+<BR>+        POB0: opb {<BR>+            compatible = "ibm,opb";<BR>+            #address-cells = <1>;<BR>+            #size-cells = <1>;<BR>+            ranges = <0xb0000000 0x00000004 0xb0000000 0x50000000>;<BR>+            clock-frequency = <0>; /* Filled in by
 U-Boot */<BR>+<BR>+            EBC0: ebc {<BR>+                compatible = "ibm,ebc";<BR>+                dcr-reg = <0x012 0x002>;<BR>+                #address-cells = <2>;<BR>+                #size-cells = <1>;<BR>+                clock-frequency = <0>; /* Filled in by U-Boot */<BR>+                /* ranges property is supplied by U-Boot */<BR>+                ranges = < 0x00000003 0x00000000 0xe0000000 0x8000000>;<BR>+       
         interrupts = <0x6 0x4>;<BR>+                interrupt-parent = <&UIC1>;<BR>+<BR>+                nor_flash@0,0 {<BR>+                    compatible = "amd,s29gl512n", "cfi-flash";<BR>+                    bank-width = <2>;<BR>+                    reg = <0x00000000 0x00000000 0x00400000>;<BR>+                    #address-cells = <1>;<BR>+                    #size-cells =
 <1>;<BR>+                    partition@0 {<BR>+                        label = "kernel";<BR>+                        reg = <0x00000000 0x00180000>;<BR>+                    };<BR>+                    partition@180000 {<BR>+                        label = "env";<BR>+                        reg = <0x00180000 0x00020000>;<BR>+       
             };<BR>+                    partition@1a0000 {<BR>+                        label = "u-boot";<BR>+                        reg = <0x001a0000 0x00060000>;<BR>+                    };<BR>+                };<BR>+            }<BR>+<BR>+            UART0: serial@ef600300 {<BR>+                device_type = "serial";<BR>+       
         compatible = "ns16550";<BR>+                reg = <0xef600300 0x00000008>;<BR>+                virtual-reg = <0xef600300>;<BR>+                clock-frequency = <0>; /* Filled in by U-Boot */<BR>+                current-speed = <0>; /* Filled in by U-Boot */<BR>+                interrupt-parent = <&UIC1>;<BR>+                interrupts = <0x1 0x4>;<BR>+            };<BR>+<BR>+            IIC0: i2c@ef600700 {<BR>+   
             compatible = "ibm,iic";<BR>+                reg = <0xef600700 0x00000014>;<BR>+                interrupt-parent = <&UIC0>;<BR>+                interrupts = <0x2 0x4>;<BR>+            };<BR>+<BR>+            IIC1: i2c@ef600800 {<BR>+                compatible = "ibm,iic";<BR>+                reg = <0xef600800 0x00000014>;<BR>+                interrupt-parent = <&UIC0>;<BR>+       
         interrupts = <0x3 0x4>;<BR>+            };<BR>+<BR>+            RGMII0: emac-rgmii@ef601500 {<BR>+                compatible = "ibm,rgmii";<BR>+                reg = <0xef601500 0x00000008>;<BR>+                has-mdio;<BR>+            };<BR>+<BR>+            TAH0: emac-tah@ef601350 {<BR>+                compatible = "ibm,tah";<BR>+                reg = <0xef601350 0x00000030>;<BR>+       
     };<BR>+<BR>+            EMAC0: ethernet@ef600c00 {<BR>+                device_type = "network";<BR>+                compatible = "ibm,emac4sync";<BR>+                interrupt-parent = <&EMAC0>;<BR>+                interrupts = <0x0 0x1>;<BR>+                #interrupt-cells = <1>;<BR>+                #address-cells = <0>;<BR>+                #size-cells = <0>;<BR>+               
 interrupt-map = </*Status*/ 0x0 &UIC2 0x10 0x4<BR>+                         /*Wake*/   0x1 &UIC2 0x14 0x4>;<BR>+                reg = <0xef600c00 0x000000c4>;<BR>+                local-mac-address = [000000000000]; /* Filled in by U-Boot */<BR>+                mal-device = <&MAL0>;<BR>+                mal-tx-channel = <0>;<BR>+                mal-rx-channel = <0>;<BR>+                cell-index = <0>;<BR>+   
             max-frame-size = <9000>;<BR>+                rx-fifo-size = <16384>;<BR>+                tx-fifo-size = <2048>;<BR>+                phy-mode = "rgmii";<BR>+                phy-map = <0x00000000>;<BR>+                rgmii-device = <&RGMII0>;<BR>+                rgmii-channel = <0>;<BR>+                tah-device = <&TAH0>;<BR>+                tah-channel =
 <0>;<BR>+                has-inverted-stacr-oc;<BR>+                has-new-stacr-staopc;<BR>+            };<BR>+        };<BR>+<BR>+    };<BR>+};<BR>diff --git a/arch/powerpc/configs/44x/bluestone_defconfig b/arch/powerpc/configs/44x/bluestone_defconfig<BR>new file mode 100644<BR>index 0000000..ac65b48<BR>--- /dev/null<BR>+++ b/arch/powerpc/configs/44x/bluestone_defconfig<BR>@@ -0,0 +1,68 @@<BR>+CONFIG_44x=y<BR>+CONFIG_EXPERIMENTAL=y<BR>+CONFIG_SYSVIPC=y<BR>+CONFIG_POSIX_MQUEUE=y<BR>+CONFIG_LOG_BUF_SHIFT=14<BR>+CONFIG_BLK_DEV_INITRD=y<BR>+CONFIG_EMBEDDED=y<BR>+# CONFIG_VM_EVENT_COUNTERS is not set<BR>+# CONFIG_PCI_QUIRKS is not set<BR>+# CONFIG_COMPAT_BRK is not set<BR>+CONFIG_BLUESTONE=y<BR>+# CONFIG_EBONY is not set<BR>+# CONFIG_KVM_GUEST
 is not
 set<BR>+CONFIG_NO_HZ=y<BR>+CONFIG_HIGH_RES_TIMERS=y<BR>+CONFIG_SPARSE_IRQ=y<BR>+CONFIG_CMDLINE_BOOL=y<BR>+CONFIG_CMDLINE=""<BR>+CONFIG_NET=y<BR>+CONFIG_PACKET=y<BR>+CONFIG_UNIX=y<BR>+CONFIG_INET=y<BR>+CONFIG_IP_PNP=y<BR>+CONFIG_IP_PNP_DHCP=y<BR>+CONFIG_IP_PNP_BOOTP=y<BR>+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"<BR>+CONFIG_CONNECTOR=y<BR>+CONFIG_MTD=y<BR>+CONFIG_MTD_PARTITIONS=y<BR>+CONFIG_MTD_CMDLINE_PARTS=y<BR>+CONFIG_MTD_OF_PARTS=y<BR>+CONFIG_MTD_CHAR=y<BR>+CONFIG_MTD_BLOCK=y<BR>+CONFIG_MTD_CFI=y<BR>+CONFIG_MTD_CFI_AMDSTD=y<BR>+CONFIG_MTD_PHYSMAP_OF=y<BR>+CONFIG_PROC_DEVICETREE=y<BR>+CONFIG_BLK_DEV_RAM=y<BR>+CONFIG_BLK_DEV_RAM_SIZE=35000<BR>+CONFIG_NETDEVICES=y<BR>+CONFIG_NET_ETHERNET=y<BR>+CONFIG_IBM_NEW_EMAC=y<BR>+CONFIG_IBM_NEW_EMAC_RXB=256<BR>+CONFIG_IBM_NEW_EMAC_TXB=256<BR>+CONFIG_SERIAL_8250=y<BR>+CONFIG_SERIAL_8250_CONSOLE=y<BR>+CONFIG_SERIAL_8250_NR_UARTS=2<BR>+CONFIG_SERIAL_8250_RUNTIME_UARTS=2<BR>+CONFIG_SERIAL_8250_EXTENDED=y<BR>+CONFIG_S
ERIAL_8250_SHARE_IRQ=y<BR>+CONFIG_SERIAL_OF_PLATFORM=y<BR>+CONFIG_I2C=y<BR>+CONFIG_I2C_CHARDEV=y<BR>+CONFIG_I2C_IBM_IIC=y<BR>+CONFIG_SENSORS_AD7414=y<BR>+# CONFIG_HID_SUPPORT is not set<BR>+# CONFIG_USB_SUPPORT is not set<BR>+CONFIG_RTC_CLASS=y<BR>+CONFIG_RTC_DRV_M41T80=y<BR>+CONFIG_EXT2_FS=y<BR>+CONFIG_EXT3_FS=y<BR>+CONFIG_PROC_KCORE=y<BR>+CONFIG_TMPFS=y<BR>+CONFIG_CRAMFS=y<BR>+CONFIG_NFS_FS=y<BR>+CONFIG_NFS_V3=y<BR>+CONFIG_ROOT_NFS=y<BR>+CONFIG_NLS=y<BR>diff --git a/arch/powerpc/kernel/cpu_setup_44x.S b/arch/powerpc/kernel/cpu_setup_44x.S<BR>index 7d606f8..549f482 100644<BR>--- a/arch/powerpc/kernel/cpu_setup_44x.S<BR>+++ b/arch/powerpc/kernel/cpu_setup_44x.S<BR>@@ -35,6 +35,7 @@ _GLOBAL(__setup_cpu_440grx)<BR>_GLOBAL(__setup_cpu_460ex)<BR>_GLOBAL(__setup_cpu_460gt)<BR>_GLOBAL(__setup_cpu_460sx)<BR>+_GLOBAL(__setup_cpu_464)<BR>    mflr    r4<BR>    bl    __init_fpu_44x<BR>   
 bl    __fixup_440A_mcheck<BR>diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c<BR>index 1f9123f..89e55b1 100644<BR>--- a/arch/powerpc/kernel/cputable.c<BR>+++ b/arch/powerpc/kernel/cputable.c<BR>@@ -48,6 +48,7 @@ extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);<BR>extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);<BR>extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);<BR>extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);<BR>+extern void __setup_cpu_464(unsigned long offset, struct cpu_spec *spec);<BR>extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);<BR>extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);<BR>extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);<BR>@@ -1805,6 +1806,20 @@ static struct cpu_spec __initdata cpu_specs[] =
 {<BR>        .machine_check        = machine_check_440A,<BR>        .platform        = "ppc440",<BR>    },<BR>+    { /* 464 in APM821xx */<BR>+        .pvr_mask        = 0xffffff00,<BR>+        .pvr_value        = 0x12C41C80,<BR>+        .cpu_name        = "464 in APM821xx",<BR>+        .cpu_features        = CPU_FTRS_44X,<BR>+        .cpu_user_features    = COMMON_USER_BOOKE |<BR>+            PPC_FEATURE_HAS_FPU,<BR>+       
 .mmu_features        = MMU_FTR_TYPE_44x,<BR>+        .icache_bsize        = 32,<BR>+        .dcache_bsize        = 32,<BR>+        .cpu_setup        = __setup_cpu_464,<BR>+        .machine_check        = machine_check_440A,<BR>+        .platform        = "ppc440",<BR>+    },<BR>    { /* 476 core */<BR>        .pvr_mask        = 0xffff0000,<BR>        .pvr_value        = 0x11a50000,<BR>diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig<BR>index
 69d668c..0f979c5 100644<BR>--- a/arch/powerpc/platforms/44x/Kconfig<BR>+++ b/arch/powerpc/platforms/44x/Kconfig<BR>@@ -17,6 +17,16 @@ config BAMBOO<BR>    help<BR>      This option enables support for the IBM PPC440EP evaluation board.<BR><BR>+config BLUESTONE<BR>+    bool "Bluestone"<BR>+    depends on 44x<BR>+    default n<BR>+    select PPC44x_SIMPLE<BR>+    select APM821xx<BR>+    select IBM_NEW_EMAC_RGMII<BR>+    help<BR>+      This option enables support for the APM APM821xx Evaluation board.<BR>+<BR>config EBONY<BR>    bool "Ebony"<BR>    depends on 44x<BR>@@ -293,6 +303,12 @@ config 460SX<BR>    select IBM_NEW_EMAC_ZMII<BR>    select IBM_NEW_EMAC_TAH<BR><BR>+config APM821xx<BR>+    bool<BR>+   
 select PPC_FPU<BR>+    select IBM_NEW_EMAC_EMAC4<BR>+    select IBM_NEW_EMAC_TAH<BR>+<BR># 44x errata/workaround config symbols, selected by the CPU models above<BR>config IBM440EP_ERR42<BR>    bool<BR>diff --git a/arch/powerpc/platforms/44x/ppc44x_simple.c b/arch/powerpc/platforms/44x/ppc44x_simple.c<BR>index 5f7a29d..7ddcba3 100644<BR>--- a/arch/powerpc/platforms/44x/ppc44x_simple.c<BR>+++ b/arch/powerpc/platforms/44x/ppc44x_simple.c<BR>@@ -52,6 +52,7 @@ machine_device_initcall(ppc44x_simple, ppc44x_device_probe);<BR>static char *board[] __initdata = {<BR>    "amcc,arches",<BR>    "amcc,bamboo",<BR>+    "amcc,bluestone",<BR>    "amcc,canyonlands",<BR>    "amcc,glacier",<BR>    "ibm,ebony",<BR>-- <BR>1.6.1.rc3<BR><BR><BR><BR><BR><BR><EM><STRONG><FONT face="verdana, helvetica,
 sans-serif">leowang</FONT></STRONG></EM></DIV></td></tr></table><br>