]> www.infradead.org Git - users/rw/ppcboot.git/commitdiff
The Big Rename: renamed 8240 ==> 824x to allow for easier integration
authorwdenk <wdenk>
Wed, 28 Nov 2001 17:49:52 +0000 (17:49 +0000)
committerwdenk <wdenk>
Wed, 28 Nov 2001 17:49:52 +0000 (17:49 +0000)
of 8245 and other 824x CPU's
Patch by Greg Allen <gallen@arlut.utexas.edu>, 26 Nov 2001

69 files changed:
CHANGELOG
MAKEALL
Makefile
README
board/cu824/cu824.c
board/cu824/dc2114x.c
board/cu824/flash.c
board/cu824/ppcboot.lds
board/cu824/speed.c
board/mousse/dc2114x.c
board/mousse/mousse.c
board/mousse/pci.c
board/mousse/pci.h
board/mousse/ppcboot.lds
board/mousse/ppcboot.lds.ram
board/mousse/ppcboot.lds.rom
board/mousse/speed.c
board/sandpoint/early_init.S
board/sandpoint/flash.c
board/sandpoint/interrupts.c
board/sandpoint/ns87308.c
board/sandpoint/ppcboot.lds
board/sandpoint/ppcboot.lds.mw.debug
board/sandpoint/sandpoint.c
board/sandpoint/speed.c
common/board.c
common/cmd_bedbug.c
cpu/mpc824x/Makefile [moved from cpu/mpc8240/Makefile with 100% similarity]
cpu/mpc824x/config.mk [moved from cpu/mpc8240/config.mk with 93% similarity]
cpu/mpc824x/cpu.c [moved from cpu/mpc8240/cpu.c with 90% similarity]
cpu/mpc824x/cpu_init.c [moved from cpu/mpc8240/cpu_init.c with 75% similarity]
cpu/mpc824x/drivers/dma/Makefile [moved from cpu/mpc8240/drivers/dma/Makefile with 100% similarity]
cpu/mpc824x/drivers/dma/Makefile_pc [moved from cpu/mpc8240/drivers/dma/Makefile_pc with 100% similarity]
cpu/mpc824x/drivers/dma/README [moved from cpu/mpc8240/drivers/dma/README with 100% similarity]
cpu/mpc824x/drivers/dma/dma.h [moved from cpu/mpc8240/drivers/dma/dma.h with 100% similarity]
cpu/mpc824x/drivers/dma/dma1.c [moved from cpu/mpc8240/drivers/dma/dma1.c with 100% similarity]
cpu/mpc824x/drivers/dma/dma2.S [moved from cpu/mpc8240/drivers/dma/dma2.S with 100% similarity]
cpu/mpc824x/drivers/dma/dma_export.h [moved from cpu/mpc8240/drivers/dma/dma_export.h with 100% similarity]
cpu/mpc824x/drivers/dma_export.h [moved from cpu/mpc8240/drivers/dma_export.h with 100% similarity]
cpu/mpc824x/drivers/epic.h [moved from cpu/mpc8240/drivers/epic.h with 100% similarity]
cpu/mpc824x/drivers/epic/README [moved from cpu/mpc8240/drivers/epic/README with 100% similarity]
cpu/mpc824x/drivers/epic/epic.h [moved from cpu/mpc8240/drivers/epic/epic.h with 100% similarity]
cpu/mpc824x/drivers/epic/epic1.c [moved from cpu/mpc8240/drivers/epic/epic1.c with 99% similarity]
cpu/mpc824x/drivers/epic/epic2.S [moved from cpu/mpc8240/drivers/epic/epic2.S with 100% similarity]
cpu/mpc824x/drivers/epic/epicutil.S [moved from cpu/mpc8240/drivers/epic/epicutil.S with 100% similarity]
cpu/mpc824x/drivers/errors.h [moved from cpu/mpc8240/drivers/errors.h with 100% similarity]
cpu/mpc824x/drivers/i2c/Makefile [moved from cpu/mpc8240/drivers/i2c/Makefile with 100% similarity]
cpu/mpc824x/drivers/i2c/Makefile_pc [moved from cpu/mpc8240/drivers/i2c/Makefile_pc with 100% similarity]
cpu/mpc824x/drivers/i2c/README [moved from cpu/mpc8240/drivers/i2c/README with 100% similarity]
cpu/mpc824x/drivers/i2c/i2c.h [moved from cpu/mpc8240/drivers/i2c/i2c.h with 100% similarity]
cpu/mpc824x/drivers/i2c/i2c1.c [moved from cpu/mpc8240/drivers/i2c/i2c1.c with 100% similarity]
cpu/mpc824x/drivers/i2c/i2c2.S [moved from cpu/mpc8240/drivers/i2c/i2c2.S with 100% similarity]
cpu/mpc824x/drivers/i2c/i2c_export.h [moved from cpu/mpc8240/drivers/i2c/i2c_export.h with 100% similarity]
cpu/mpc824x/drivers/i2c_export.h [moved from cpu/mpc8240/drivers/i2c_export.h with 100% similarity]
cpu/mpc824x/drivers/i2o.h [moved from cpu/mpc8240/drivers/i2o.h with 100% similarity]
cpu/mpc824x/drivers/i2o/Makefile [moved from cpu/mpc8240/drivers/i2o/Makefile with 100% similarity]
cpu/mpc824x/drivers/i2o/Makefile_pc [moved from cpu/mpc8240/drivers/i2o/Makefile_pc with 100% similarity]
cpu/mpc824x/drivers/i2o/i2o.h [moved from cpu/mpc8240/drivers/i2o/i2o.h with 100% similarity]
cpu/mpc824x/drivers/i2o/i2o1.c [moved from cpu/mpc8240/drivers/i2o/i2o1.c with 100% similarity]
cpu/mpc824x/drivers/i2o/i2o2.S [moved from cpu/mpc8240/drivers/i2o/i2o2.S with 100% similarity]
cpu/mpc824x/interrupts.c [moved from cpu/mpc8240/interrupts.c with 99% similarity]
cpu/mpc824x/start.S [moved from cpu/mpc8240/start.S with 99% similarity]
cpu/mpc824x/traps.c [moved from cpu/mpc8240/traps.c with 100% similarity]
cpu/mpc8260/bedbug_603e.c
include/config_CU824.h
include/config_MOUSSE.h
include/config_Sandpoint8240.h
include/mpc824x.h [moved from include/mpc8240.h with 91% similarity, mode: 0644]
include/ppc_asm.tmpl

index 4ffa757d131415a823c5b6bb3e2ac21e9f0822a1..4472a4861746058c13b911d79f5273eb604d1ffc 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -56,6 +56,10 @@ To do:
 Modifications for 1.1.2:
 ======================================================================
 
+* The Big Rename: renamed 8240 ==> 824x to allow for easier
+  integration of 8245 and other 824x CPU's
+  Patch by Greg Allen <gallen@arlut.utexas.edu>, 26 Nov 2001
+
 * Add "sleep" command
 
 * Add loop constructs (for, while, until) to hush command interpreter
diff --git a/MAKEALL b/MAKEALL
index 6ce091154ff9af9f436c0845491861e1fe721d4e..d138404a565a1bb08aa772fbe211537d8f422d37 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -41,10 +41,10 @@ LIST_4xx="  \
 "
 
 #########################################################################
-## MPC8240 Systems
+## MPC824x Systems
 #########################################################################
 
-LIST_8240="    \
+LIST_824x="    \
        CU824           \
        MOUSSE          \
        Sandpoint8240   \
@@ -81,7 +81,7 @@ LIST_7xx="    \
        BAB750          \
 "
 
-LIST_all="${LIST_8xx} ${LIST_8240} ${LIST_8260} \
+LIST_all="${LIST_8xx} ${LIST_824x} ${LIST_8260} \
          ${LIST_4xx} ${LIST_74xx} ${LIST_7xx}"
 
 [ $# = 0 ] && set $LIST_all
@@ -103,7 +103,7 @@ build_target() {
 for arg in $@
 do
        case "$arg" in
-       8xx|8240|8260|4xx|74xx) for target in `eval echo '$LIST_'${arg}`
+       8xx|824x|8260|4xx|74xx) for target in `eval echo '$LIST_'${arg}`
                                do
                                        build_target ${target}
                                done
index 47571985103cfe4d517cccf7e1c768c254329446..5e19616d5988a113617090a85643180cc728844d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -486,7 +486,7 @@ WALNUT405_config:unconfig
        echo "#include <config_$(@:_config=).h>" >config.h
 
 #########################################################################
-## MPC8240 Systems
+## MPC824x Systems
 #########################################################################
 
 CU824_config: unconfig
@@ -494,7 +494,7 @@ CU824_config: unconfig
        cd ./include ;                          \
        echo "ARCH  = ppc"      > config.mk ;   \
        echo "BOARD = cu824"    >>config.mk ;   \
-       echo "CPU   = mpc8240"  >>config.mk ;   \
+       echo "CPU   = mpc824x"  >>config.mk ;   \
        echo "#include <config_$(@:_config=).h>" >config.h
 
 MOUSSE_config: unconfig
@@ -502,7 +502,7 @@ MOUSSE_config: unconfig
        cd ./include ;                          \
        echo "ARCH  = ppc"      > config.mk ;   \
        echo "BOARD = mousse"   >>config.mk ;   \
-       echo "CPU   = mpc8240"  >>config.mk ;   \
+       echo "CPU   = mpc824x"  >>config.mk ;   \
        echo "#include <config_$(@:_config=).h>" >config.h
 
 Sandpoint8240_config: unconfig
@@ -510,7 +510,7 @@ Sandpoint8240_config: unconfig
        cd ./include ;                          \
        echo "ARCH  = ppc"      > config.mk ;   \
        echo "BOARD = sandpoint"        >>config.mk ;   \
-       echo "CPU   = mpc8240"  >>config.mk ;   \
+       echo "CPU   = mpc824x"  >>config.mk ;   \
        echo "#include <config_$(@:_config=).h>" >config.h
 
 #########################################################################
diff --git a/README b/README
index c28db45d4c27a27c6cba20385a13c3cf6f59c654..8c951f86f256592c4d5dc01f70141b93a36279cd 100644 (file)
--- a/README
+++ b/README
@@ -95,7 +95,7 @@ Directory Hierarchy:
 - tools                Tools to build S-Record or PPCBoot images, etc.
 
 - cpu/mpc8xx   Files specific to Motorola MPC8xx  CPUs
-- cpu/mpc8240  Files specific to Motorola MPC8240 CPU
+- cpu/mpc824x  Files specific to Motorola MPC824x CPUs
 - cpu/mpc8260  Files specific to Motorola MPC8260 CPU
 - cpu/mpc74xx  Files specific to Motorola MPC74xx CPUs
 - cpu/ppc4xx   Files specific to IBM      4xx     CPUs
@@ -204,7 +204,7 @@ The following options need to be configured:
 
 - CPU Type:    Define exactly one of
                CONFIG_MPC823,  CONFIG_MPC850,  CONFIG_MPC855,  CONFIG_MPC860
-       or      CONFIG_MPC8240, CONFIG_MPC8260
+       or      CONFIG_MPC824X, CONFIG_MPC8260
        or      CONFIG_IOP480
        or      CONFIG_405GP
        or      CONFIG_MPC74xx
@@ -245,6 +245,10 @@ The following options need to be configured:
                                          the lcd display every second with
                                          a "rotator" |\-/|\-/
 
+- MPC824X Family Member (if CONFIG_MPC824X is defined)
+        Define exactly one of
+        CONFIG_MPC8240, CONFIG_MPC8245
+
 - 8xx CPU Options: (if using an 8xx cpu)
                Define one or more of
                CONFIG_8xx_GCLK_FREQ    - if get_gclk_freq() can not work e.g.
@@ -966,7 +970,7 @@ Low Level (hardware related) configuration options:
 
                PPCBoot uses the following memory types:
                 - MPC8xx and MPC8260: IMMR (internal memory of the CPU)
-               - MPC8240: data cache
+                - MPC824X: data cache
 
 - CFG_INIT_DATA_OFFSET:
 
@@ -980,7 +984,7 @@ Low Level (hardware related) configuration options:
                 CFG_INIT_DATA_OFFSET) downward.
 
        Note:
-                On the MPC8240 (or other systems that use the data
+                On the MPC824X (or other systems that use the data
                 cache for initial memory) the address chosen for
                 CFG_INIT_RAM_ADDR is basically arbitrary - it must
                 point to an otherwise UNUSED address space between
@@ -1071,7 +1075,7 @@ configurations; the following names are supported:
     FADS850SAR_config     SPD823TS_config       pcu_e_config
     FADS860T_config       SXNI855T_config       rsdproto_config
     FPS850L_config        Sandpoint8240_config  sbc8260_config
-    GENIETV_config        TQM823L_config       PIP405_config
+    GENIETV_config        TQM823L_config        PIP405_config
 
 Note: for some board special configuration names may exist; check  if
       additional  information is available from the board vendor; for
index df18de9eb6f4c2d74bd4cb4b0b6c928532ab7954..6cdac49678f06b7dd4092a2872dd34dcb19f2b9c 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 
 #define BOARD_REV_REG 0xFE80002B
@@ -81,14 +81,14 @@ long int initdram(int board_type)
                *addr = save[--i];
                if (val != ~cnt) {
                        ulong new_bank0_end = cnt * sizeof(long) - 1;
-                       ulong mear1  = mpc8240_mpc107_getreg(MEAR1);
-                       ulong emear1 = mpc8240_mpc107_getreg(EMEAR1);
+                       ulong mear1  = mpc824x_mpc107_getreg(MEAR1);
+                       ulong emear1 = mpc824x_mpc107_getreg(EMEAR1);
                        mear1 =  (mear1  & 0xFFFFFF00) |
                          ((new_bank0_end & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT);
                        emear1 = (emear1 & 0xFFFFFF00) |
                          ((new_bank0_end & MICR_ADDR_MASK) >> MICR_EADDR_SHIFT);
-                       mpc8240_mpc107_setreg(MEAR1,  mear1);
-                       mpc8240_mpc107_setreg(EMEAR1, emear1);
+                       mpc824x_mpc107_setreg(MEAR1,  mear1);
+                       mpc824x_mpc107_setreg(EMEAR1, emear1);
 
                        ret = cnt * sizeof(long);
                        goto Done;
index 043af82030c6eb28643f7e04b6e4ce4c2dbf8677..8f8277c2766ddafeb8e2ac87cfeb8c6d8864a206 100644 (file)
@@ -1,5 +1,5 @@
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <net.h>
 
        /* PCI Registers.
index 4c71a05988dac4d2873de75671e568a3aa934d73..6b8769ef2fe8d4992fc0d50e9ef4fbbaa6590504 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 
 #if defined(CFG_ENV_IS_IN_FLASH)
index 2d654a4f9ecb79f042455adda942fe6cdbcd3500..3241bed12adcf7002744aaad9259fb6bd31ee2d7 100644 (file)
@@ -53,7 +53,7 @@ SECTIONS
   .plt : { *(.plt) }
   .text      :
   {
-    cpu/mpc8240/start.o        (.text)
+    cpu/mpc824x/start.o        (.text)
                common/board.o (.text)
     ppc/ppcstring.o    (.text)
     ppc/vsprintf.o     (.text)
index c122687954d9666d0fbbe1d20512236bf1c6115f..313462ff91d66d1f0bb00089a68e80af2ee983e9 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 
 static char pll_to_bus_factor[] =
@@ -58,7 +58,7 @@ ulong get_bus_freq(ulong ignore)
 
 /* Table to convert pllratio to actual processor clock scaling factor (*10)
  */
-#ifdef CONFIG_MPC8240
+#ifdef CONFIG_MPC824X
 short pllratio_to_factor[] = {
     00, 00, 00, 10, 20, 20, 25, 00, 00, 00, 00, 00, 00, 00, 00, 00,
     00, 00, 00, 10, 00, 00, 00, 45, 30, 00, 40, 00, 00, 00, 35, 00,
@@ -69,9 +69,9 @@ ulong get_gclk_freq(void)
 {
        uint hid1 = mfspr(HID1);
 
-#ifdef CONFIG_MPC8240
+#ifdef CONFIG_MPC824X
 
-               /* 5 bits for PLL ration on 8240
+               /* 5 bits for PLL ration on 824X
                 */
        hid1 = (hid1 >> (32-5)) & 0x1f;
 #else
index 2a63c3eb7d9e618ffa24b5840e1ea630681dc5da..bbf383d0c9ead481a397b294021724c81f59c9fd 100644 (file)
@@ -29,7 +29,7 @@
  * DEC 21143 Ethernet driver.
  */
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <net.h>
 #include "pci.h"
 #include "mousse.h"
index 9ef22fc47262048755ead5e2dcf536a73adda32e..303e96c89cc9dc92ebb324ca2a2bf7a3d7bd8698 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 
 #include "mousse.h"
index 7b3af19381560e36f281df3381c4406eebfb7da7..adae1a801ccaf327866577ab8c34652fea8b925e 100644 (file)
  */
 
 /*
- * PCI Configuration space access support for MPC8240/MPC107 PCI Bridge
+ * PCI Configuration space access support for MPC824x/MPC107 PCI Bridge
  */
 #include <ppcboot.h>
-#include "mpc8240.h"
+#include "mpc824x.h"
 #include "pci.h"
 #include "mousse.h"
 
@@ -283,10 +283,10 @@ int pci_config_inb(int busNo,    /* bus number */
   uint8 retval = 0;
   int retStat = ERROR;
   
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR, 
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR, 
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          (offset & 0xfc) | 0x80000000);
-  retval = mpc8240_mpc107_read8 (CHRP_REG_DATA + (offset & 0x3));
+  retval = mpc824x_mpc107_read8 (CHRP_REG_DATA + (offset & 0x3));
   retStat = OK;
   
   *pData = retval;
@@ -314,10 +314,10 @@ int pci_config_inw(int busNo,      /* bus number */
     return (retStat);
   }
   
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR, 
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR, 
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          (offset & 0xfc) | 0x80000000);
-  retval = mpc8240_mpc107_read16 (CHRP_REG_DATA + (offset & 0x2));
+  retval = mpc824x_mpc107_read16 (CHRP_REG_DATA + (offset & 0x2));
   retStat = OK;
   *pData = retval;
   
@@ -343,10 +343,10 @@ int pci_config_inl(int    busNo,     /* bus number */
   if (((offset & (int)0x3) > 0) ) {
     return (retStat);
   }
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR, 
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR, 
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          (offset & 0xfc) | 0x80000000);
-  retval = mpc8240_mpc107_read32 (CHRP_REG_DATA);
+  retval = mpc824x_mpc107_read32 (CHRP_REG_DATA);
   asm volatile ("eieio");
   retStat = OK;
   *pData = retval;
@@ -366,10 +366,10 @@ int pci_config_outb(int busNo,    /* bus number */
                    uint8 data)    /* data written to the offset */
 {
   
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR, 
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR, 
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          (offset & 0xfc) | 0x80000000);
-  mpc8240_mpc107_write8 ((CHRP_REG_DATA + (offset & 0x3)), data);
+  mpc824x_mpc107_write8 ((CHRP_REG_DATA + (offset & 0x3)), data);
   return OK;
 }
 
@@ -390,10 +390,10 @@ int pci_config_outw(int busNo,    /* bus number */
     return (ERROR);
   }
 
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR,
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR,
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          (offset & 0xfc) | 0x80000000);
-  mpc8240_mpc107_write16 ((CHRP_REG_DATA + (offset & 0x2)), data);
+  mpc824x_mpc107_write16 ((CHRP_REG_DATA + (offset & 0x2)), data);
   return OK;
 }
 
@@ -414,10 +414,10 @@ int pci_config_outl(int busNo,    /* bus number */
   if (((offset & (int)0x3) > 0) ){
     return (ERROR);
   }
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR,
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR,
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          (offset & 0xfc) | 0x80000000);
-  mpc8240_mpc107_write32 (CHRP_REG_DATA, data);
+  mpc824x_mpc107_write32 (CHRP_REG_DATA, data);
   asm volatile ("eieio");
   return OK;
 }
@@ -520,10 +520,10 @@ pci_special_cycle(int busNo,       /* bus number */
   int deviceNo = 0x0000001f;   
   int funcNo   = 0x00000007;
   
-  mpc8240_mpc107_write32 (CHRP_REG_ADDR, 
+  mpc824x_mpc107_write32 (CHRP_REG_ADDR, 
                          pci_config_bdf_pack (busNo, deviceNo, funcNo) |
                          0x80000000);
-  mpc8240_mpc107_write32 (CHRP_REG_DATA, message);
+  mpc824x_mpc107_write32 (CHRP_REG_DATA, message);
   return OK;
 }
 
index 60f770ec4497c6940b9b2d9177ad862b80329466..1490729142d9aa227ca30aef16f4a91b899824d8 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
-#ifndef __MPC8240_PCI
-#define __MPC8240_PCI
+#ifndef __MPC824X_PCI
+#define __MPC824X_PCI
 
 /*
- * PCI Configuration space Library and constants for MPC8240 based
+ * PCI Configuration space Library and constants for MPC824x based
  * systems.
  */
 
@@ -299,4 +299,4 @@ int pci_config_modb(int b, int d, int f, int offset,
 unsigned int pci_size_bar(unsigned int, unsigned long mask);
 #endif /* _ASMLANGUAGE */
 
-#endif /* __MPC8240_PCI */
+#endif /* __MPC824X_PCI */
index 3ab75dd558bafddf921ea7a9be7c73a6c835af6a..163e5fded9be0769e605a78b8b8b5430d97a3efb 100644 (file)
@@ -53,8 +53,8 @@ SECTIONS
   .plt : { *(.plt) }
   .text      :
   {
-    cpu/mpc8240/start.o        (.text)
-        common/board.o (.text)
+    cpu/mpc824x/start.o        (.text)
+    common/board.o (.text)
     ppc/ppcstring.o    (.text)
     ppc/vsprintf.o     (.text)
     ppc/crc32.o                (.text)
index 1e4b41755ab88417dc33aebd89f1be7e026c6d5f..9166c9cd78234fabfa4975fe363ff0d856d85873 100644 (file)
@@ -38,7 +38,7 @@ SECTIONS
   PROVIDE(_f_init_rom = .);
 
   .init : {
-      cpu/mpc8240/start.o      (.text)
+      cpu/mpc824x/start.o      (.text)
       *(.init)
   } > ram
   _init_size = SIZEOF(.init);
index 763a5d32f648268df77214b8b8a970880f0d25b5..9d8187ea45914f2820d983c943c28680d2a97872 100644 (file)
@@ -53,7 +53,7 @@ SECTIONS
   .plt : { *(.plt) }
   .text      :
   {
-    cpu/mpc8240/start.o        (.text)
+    cpu/mpc824x/start.o        (.text)
         common/board.o (.text)
     ppc/ppcstring.o    (.text)
     ppc/vsprintf.o     (.text)
index d482122abcbdf53c3d683515f7225f4c6015d291..7cbd6605774c82ffbdf2129489d2fa69be03289c 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 
 
@@ -39,7 +39,7 @@ ulong get_bus_freq(ulong ignore)
 
 /* Table to convert pllratio to actual processor clock scaling factor (*10)
  */
-#ifdef CONFIG_MPC8240
+#ifdef CONFIG_MPC824X
 short pllratio_to_factor[] = {
     00, 00, 00, 10, 20, 20, 25, 00, 00, 00, 00, 00, 00, 00, 00, 00,
     00, 00, 00, 10, 00, 00, 00, 45, 60, 00, 40, 00, 00, 00, 35, 00,
@@ -50,9 +50,9 @@ ulong get_gclk_freq(void)
 {
        uint hid1 = mfspr(HID1);
 
-#ifdef CONFIG_MPC8240
+#ifdef CONFIG_MPC824X
 
-               /* 5 bits for PLL ration on 8240
+               /* 5 bits for PLL ration on 824x
                 */
        hid1 = (hid1 >> (32-5)) & 0x1f;
 #else
index 1e31a54ca83f94f867e7e230e3fa6103044d7322..127bd37fa518ed0aff1e66f8ad86357a16e2f6fb 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <config.h>
 #include <asm/processor.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <ppc_asm.tmpl>
 
 #if defined(USE_DINK32)
index fca01831254b8a58c93eb4574c99b9a03a398164..a1272a3e391086fe0c7f7ef622f7c1c41347cfc3 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 #include <asm/pci_io.h>
 #include "w83c553f.h"
index 8a3e8b1f5ed76752094c4e358f3cf69bb27837d5..b35bb9adaafd3017d8703f95864f5effd72509ab 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 
 
index c822307cb22370d4fedf4168df4dd3ee45f93c99..1da0f543a2663918d8d71221a5cdea4e544a682c 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <config.h>
 
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include "ns87308.h"
 #include "ns16550.h"           /* to configure the 87308's internal 16550's */
 #include <asm/mc146818rtc.h>   /* to configure 87308's RTC */
index 2d654a4f9ecb79f042455adda942fe6cdbcd3500..3241bed12adcf7002744aaad9259fb6bd31ee2d7 100644 (file)
@@ -53,7 +53,7 @@ SECTIONS
   .plt : { *(.plt) }
   .text      :
   {
-    cpu/mpc8240/start.o        (.text)
+    cpu/mpc824x/start.o        (.text)
                common/board.o (.text)
     ppc/ppcstring.o    (.text)
     ppc/vsprintf.o     (.text)
index 59fc9a227459cf7f7494108335d3328e1d3042f6..a0378cb4a1f515af27eb36d8c3ee14df26ea9b3c 100644 (file)
@@ -38,7 +38,7 @@ SECTIONS
   PROVIDE(_f_init_rom = .);
 
   .init : {
-      cpu/mpc8240/start.o      (.text)
+      cpu/mpc824x/start.o      (.text)
       *(.init)
   } > ram
   _init_size = SIZEOF(.init);
index 9d5e57c53a4c3b38b374585e6f9ba371341ba65f..c20f7a481edf0d2039311571af64169acc4b8381 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 
 int checkboard (void)
 {
index 5549eb91937b150f229b09b88266f0ff3a8b88bb..3a8aa8feb7379a23eabe7fea026470674a25fab2 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 #include "speed.h"
 
@@ -64,7 +64,7 @@ ulong get_bus_freq (ulong ignore)
  * figure it out from the hardware book
  */
 
-#ifdef CONFIG_MPC8240
+#ifdef CONFIG_MPC824X
 const unsigned char pllratio_to_factor[32] = {
     0, 0, 0, 2, 4, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 2, 0, 0, 0, 9, 6, 0, 8, 0, 0, 0, 7, 0
@@ -77,8 +77,8 @@ ulong get_gclk_freq (void)
 {
    uint hid1;
    hid1 = mfspr(HID1);
-   #ifdef CONFIG_MPC8240
-   hid1 = (hid1 >> (32-5)) & 0x1f; /* 5 bits for PLL ration on 8240*/
+   #ifdef CONFIG_MPC824X
+   hid1 = (hid1 >> (32-5)) & 0x1f; /* 5 bits for PLL ration on 824*/
    #else
    hid1 = (hid1 >> (32-4)) & 0xf; /* 4 bits on everythings else*/
    #endif
index 270f034c9cb33c5f1380da5540023d0f627b63b9..9b8f70e1243b8bce1a70fdbab63b043a7f25fb1a 100644 (file)
@@ -579,7 +579,7 @@ void    board_init_r  (bd_t *bd, ulong dest_addr)
 
     WATCHDOG_RESET();
 
-#if defined(CONFIG_IP860) || defined(CONFIG_PCU_E) || defined (CONFIG_FLAGADM))
+#if defined(CONFIG_IP860) || defined(CONFIG_PCU_E) || defined (CONFIG_FLAGADM)
     icache_enable();   /* it's time to enable the instruction cache */
 #endif
 
index 26124537b35a067b8c325a6b162360e66def3349..19e98eec6f4c1c92100975e6a20a6ec119e222d3 100644 (file)
@@ -61,7 +61,7 @@ void bedbug_init( void )
   bedbug860_init();
 #endif
 
-#if defined(CONFIG_MPC8240) || defined(CONFIG_MPC8260)
+#if defined(CONFIG_MPC824X) || defined(CONFIG_MPC8260)
   /* Processors that are 603e core based */
   void bedbug603e_init( void );
   
similarity index 100%
rename from cpu/mpc8240/Makefile
rename to cpu/mpc824x/Makefile
similarity index 93%
rename from cpu/mpc8240/config.mk
rename to cpu/mpc824x/config.mk
index a4b18cdc494e882fee8165286b2225df97055bfd..f3087ec5ea269b4a0ec185eb9f0697b9cc8f2806 100644 (file)
@@ -23,4 +23,4 @@
 
 PLATFORM_RELFLAGS += -mrelocatable -ffixed-r14 -meabi
 
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8240 -ffixed-r2 -mstring -mcpu=603e -msoft-float
+PLATFORM_CPPFLAGS += -DCONFIG_MPC824X -ffixed-r2 -mstring -mcpu=603e -msoft-float
similarity index 90%
rename from cpu/mpc8240/cpu.c
rename to cpu/mpc824x/cpu.c
index 035ad824e1953a8080cf27c4505d5e9b05a08836..5d59b3271e8699cc2eeccfd88cea542bf9d33825 100644 (file)
@@ -21,7 +21,8 @@
  * MA 02111-1307 USA
  */
 
-#include <mpc8240.h>
+#include <config.h>
+#include <mpc824x.h>
 #include <ppcboot.h>
 #include <command.h>
 
@@ -38,6 +39,10 @@ int checkcpu(long clock)
       printf("MPC8240");
       break;
 
+    case CPU_TYPE_8245:
+      printf("MPC8245");
+      break;
+
     default:
       return -1; /*not valid for this source*/
   }
@@ -135,7 +140,7 @@ unsigned long get_tbclk (void)
 /* ------------------------------------------------------------------------- */
 
 /*
- * The MPC8240 has an integrated PCI controller known as the MPC107.
+ * The MPC824x has an integrated PCI controller known as the MPC107.
  * The following are MPC107 Bridge Controller and PCI Support functions
  *
  */
@@ -147,7 +152,7 @@ unsigned long get_tbclk (void)
  *  before returning to the caller.     
  */
 unsigned int
-mpc8240_mpc107_getreg(unsigned int regNum)
+mpc824x_mpc107_getreg(unsigned int regNum)
 {
   unsigned int temp;
   /* swap the addr. to little endian */
@@ -162,7 +167,7 @@ mpc8240_mpc107_getreg(unsigned int regNum)
  */
 
 void
-mpc8240_mpc107_setreg(unsigned int regNum, unsigned int regVal)
+mpc824x_mpc107_setreg(unsigned int regNum, unsigned int regVal)
 {
     /* swap the addr. to little endian */
     *(volatile unsigned int *)CHRP_REG_ADDR = PCISWAP(regNum);
@@ -175,7 +180,7 @@ mpc8240_mpc107_setreg(unsigned int regNum, unsigned int regVal)
  *  Write a byte (8 bits) to a memory location.
  */
 void
-mpc8240_mpc107_write8(unsigned int addr, unsigned char data)
+mpc824x_mpc107_write8(unsigned int addr, unsigned char data)
 {
   *(unsigned char*)addr = data;
   __asm__("sync");
@@ -186,7 +191,7 @@ mpc8240_mpc107_write8(unsigned int addr, unsigned char data)
  */
 
 void
-mpc8240_mpc107_write16(unsigned int address, unsigned short data)
+mpc824x_mpc107_write16(unsigned int address, unsigned short data)
 {
   *(volatile unsigned short *)address = BYTE_SWAP_16_BIT(data);  
   __asm__("sync");
@@ -198,7 +203,7 @@ mpc8240_mpc107_write16(unsigned int address, unsigned short data)
  */
 
 void
-mpc8240_mpc107_write32(unsigned int address, unsigned int data)
+mpc824x_mpc107_write32(unsigned int address, unsigned int data)
 {
   *(volatile unsigned int *)address = LONGSWAP(data); 
   __asm__("sync");
@@ -208,7 +213,7 @@ mpc8240_mpc107_write32(unsigned int address, unsigned int data)
  *  Read a byte (8 bits) from a memory location.
  */
 unsigned char
-mpc8240_mpc107_read8(unsigned int addr)
+mpc824x_mpc107_read8(unsigned int addr)
 {
   return *(volatile unsigned char*)addr;
 }
@@ -219,7 +224,7 @@ mpc8240_mpc107_read8(unsigned int addr)
  *  value before returning to the caller.
  */
 unsigned short
-mpc8240_mpc107_read16(unsigned int address)
+mpc824x_mpc107_read16(unsigned int address)
 {
   unsigned short retVal;
   retVal = BYTE_SWAP_16_BIT(*(unsigned short*)address);
@@ -232,7 +237,7 @@ mpc8240_mpc107_read16(unsigned int address)
  *  swap the value before returning to the caller.     
  */
 unsigned int
-mpc8240_mpc107_read32(unsigned int address)
+mpc824x_mpc107_read32(unsigned int address)
 {
     unsigned int retVal;
     retVal = LONGSWAP(*(unsigned int *)address);
@@ -251,7 +256,7 @@ mpc8240_mpc107_read32(unsigned int address)
  */
 
 unsigned int
-mpc8240_eummbar_read(unsigned int regNum)
+mpc824x_eummbar_read(unsigned int regNum)
 {
     unsigned int temp;
     temp = *(volatile unsigned int *) (EUMBBAR_VAL + regNum) ;
@@ -271,7 +276,7 @@ mpc8240_eummbar_read(unsigned int regNum)
  */
 
 void
-mpc8240_eummbar_write(unsigned int regNum, unsigned int regVal)
+mpc824x_eummbar_write(unsigned int regNum, unsigned int regVal)
 {
     *(volatile unsigned int *) (EUMBBAR_VAL + regNum) = PCISWAP(regVal);
     return;
similarity index 75%
rename from cpu/mpc8240/cpu_init.c
rename to cpu/mpc824x/cpu_init.c
index ac6d6fcd8a3ade667a830c658df5ba2c31511dad..26b314b56fa2c56687705f27f8e45557e4ebb45a 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <ppcboot.h>
 #include <asm/processor.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 
 /*
  * Breath some life into the CPU...
@@ -40,13 +40,34 @@ cpu_init_f (void)
     CONFIG_WRITE_HALFWORD(PCICR, 0x06); /* Bus Master, respond to PCI memory space acesses*/
 /*    CONFIG_WRITE_HALFWORD(PCISR, 0xffff); */ /*reset PCISR*/
 
+#if defined(CONFIG_MPC8245)
+    CONFIG_WRITE_BYTE(PCLSR, 0x8);     /* set cache line size */
+    /* clear then set then clear the memory DLL */
+    CONFIG_READ_BYTE (AMBOR, val);
+    CONFIG_WRITE_BYTE(AMBOR, val & 0xDF);
+    CONFIG_WRITE_BYTE(AMBOR, val | 0x20);
+    CONFIG_WRITE_BYTE(AMBOR, val & 0xDF);
+#endif
+
     CONFIG_READ_WORD(PICR1, val);
+#if defined(CONFIG_MPC8240)
     CONFIG_WRITE_WORD( PICR1,
        (val & (PICR1_ADDRESS_MAP | PICR1_RCS0)) |
               PIRC1_MSK | PICR1_PROC_TYPE_603E |
               PICR1_FLASH_WR_EN | PICR1_MCP_EN |
               PICR1_CF_DPARK | PICR1_EN_PCS |
               PICR1_CF_APARK );
+#elif defined(CONFIG_MPC8245)
+    CONFIG_WRITE_WORD( PICR1,
+       (val & (PICR1_RCS0)) |
+              PICR1_PROC_TYPE_603E |
+              PICR1_FLASH_WR_EN | PICR1_MCP_EN |
+              PICR1_CF_DPARK | PICR1_NO_BUSW_CK |
+              PICR1_DEC| PICR1_CF_APARK );
+#else
+#error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
+#endif
+
     CONFIG_READ_WORD(PICR2, val);
     val= val & ~ (PICR2_CF_SNOOP_WS_MASK | PICR2_CF_APHASE_WS_MASK); /*mask off waitstate bits*/
     CONFIG_WRITE_WORD(PICR2, val | PICR2_CF_SNOOP_WS_1WS | PICR2_CF_APHASE_WS_1WS); /*1 wait state*/
@@ -57,33 +78,57 @@ cpu_init_f (void)
 #endif
 
     CONFIG_WRITE_WORD(MCCR2, CFG_REFINT << MCCR2_REFINT_SHIFT);
-
+#if defined(CONFIG_MPC8240)
     CONFIG_WRITE_WORD(MCCR3,
        (((CFG_BSTOPRE & 0x003c) >> 2) << MCCR3_BSTOPRE2TO5_SHIFT) |
        (CFG_REFREC << MCCR3_REFREC_SHIFT) |
        (CFG_RDLAT  << MCCR3_RDLAT_SHIFT));
+#elif defined(CONFIG_MPC8245)
+    CONFIG_WRITE_WORD(MCCR3,
+       (((CFG_BSTOPRE & 0x003c) >> 2) << MCCR3_BSTOPRE2TO5_SHIFT) |
+       (CFG_REFREC << MCCR3_REFREC_SHIFT));
+#else
+#error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
+#endif
 
-#ifdef CONFIG_CU824
-    CONFIG_WRITE_WORD(MCCR4,
+/* this is gross.  We think these should all be the same, and various boards
+ *  should define CFG_ACTORW to 0 if they don't want to set it, or even, if
+ *  its not set, we define it to zero in this file
+ */
+#if defined(CONFIG_CU824)
+       CONFIG_WRITE_WORD(MCCR4,
        (CFG_PRETOACT << MCCR4_PRETOACT_SHIFT) |
        (CFG_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) |
        MCCR4_BIT21 |
        (CFG_REGISTERD_TYPE_BUFFER ? MCCR4_REGISTERED: 0) |
        ((CFG_BSTOPRE & 0x0003) <<MCCR4_BSTOPRE0TO1_SHIFT ) |
        (((CFG_SDMODE_CAS_LAT <<4) | (CFG_SDMODE_WRAP <<3) |
-             CFG_SDMODE_BURSTLEN) << MCCR4_SDMODE_SHIFT) |
+                 CFG_SDMODE_BURSTLEN) << MCCR4_SDMODE_SHIFT) |
        (CFG_ACTORW << MCCR4_ACTTORW_SHIFT) |
        (((CFG_BSTOPRE & 0x03c0) >> 6) << MCCR4_BSTOPRE6TO9_SHIFT));
-#else
-    CONFIG_WRITE_WORD(MCCR4,
+#elif defined(CONFIG_MPC8240)
+       CONFIG_WRITE_WORD(MCCR4,
        (CFG_PRETOACT << MCCR4_PRETOACT_SHIFT) |
        (CFG_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) |
        MCCR4_BIT21 |
        (CFG_REGISTERD_TYPE_BUFFER ? MCCR4_REGISTERED: 0) |
        ((CFG_BSTOPRE & 0x0003) <<MCCR4_BSTOPRE0TO1_SHIFT ) |
-       (((CFG_SDMODE_CAS_LAT <<4) | (CFG_SDMODE_WRAP <<3) | (CFG_SDMODE_BURSTLEN))
-               <<MCCR4_SDMODE_SHIFT) |
-       ((CFG_BSTOPRE & 0x03c0) <<MCCR4_BSTOPRE6TO9_SHIFT ));
+       (((CFG_SDMODE_CAS_LAT <<4) | (CFG_SDMODE_WRAP <<3) | 
+                 (CFG_SDMODE_BURSTLEN)) <<MCCR4_SDMODE_SHIFT) |
+       (((CFG_BSTOPRE & 0x03c0) >> 6) <<MCCR4_BSTOPRE6TO9_SHIFT ));
+#elif defined(CONFIG_MPC8245)
+    CONFIG_WRITE_WORD(MCCR4,
+       (CFG_PRETOACT << MCCR4_PRETOACT_SHIFT) |
+       (CFG_ACTTOPRE << MCCR4_ACTTOPRE_SHIFT) |
+       MCCR4_EXTROM | MCCR4_REGDIMM |
+       (CFG_REGISTERD_TYPE_BUFFER ? MCCR4_REGISTERED: 0) |
+       ((CFG_BSTOPRE & 0x0003) <<MCCR4_BSTOPRE0TO1_SHIFT ) |
+       (((CFG_SDMODE_CAS_LAT <<4) | (CFG_SDMODE_WRAP <<3) | 
+             (CFG_SDMODE_BURSTLEN)) <<MCCR4_SDMODE_SHIFT) |
+       (CFG_ACTORW << MCCR4_ACTTORW_SHIFT) |
+       (((CFG_BSTOPRE & 0x03c0) >> 6) <<MCCR4_BSTOPRE6TO9_SHIFT ));
+#else
+#error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
 #endif
 
     CONFIG_WRITE_WORD(MSAR1,
@@ -138,6 +183,10 @@ cpu_init_f (void)
        (CFG_BANK6_ENABLE << 6) |
        (CFG_BANK7_ENABLE << 7));
 
+#ifdef CONFIG_MPC8245
+    CONFIG_WRITE_BYTE(MPMR, CFG_PGMAX)
+#endif
+
     /* ! Wait 200us before initialize other registers */
     /*FIXME: write a decent udelay wait */
     __asm__ __volatile__(
@@ -165,13 +214,13 @@ struct MPC107_s{
     {BMC_BASE+0x8,  "MPC107 Revision"},
     {BMC_BASE+0xC,  "MPC107 Cache Line Size"},
     {BMC_BASE+0x10, "MPC107 LMBAR"},
-    {BMC_BASE+0x14, "MPC8240 PCSR"},
-    {BMC_BASE+0xA8, "MPC8240 PICR1"},
-    {BMC_BASE+0xAC, "MPC8240 PICR2"},
-    {BMC_BASE+0x46, "MPC8240 PACR"},
-    {BMC_BASE+0x310, "MPC8240 ITWR"},
-    {BMC_BASE+0x300, "MPC8240 OMBAR"},
-    {BMC_BASE+0x308, "MPC8240 OTWR"},
+    {BMC_BASE+0x14, "MPC824x PCSR"},
+    {BMC_BASE+0xA8, "MPC824x PICR1"},
+    {BMC_BASE+0xAC, "MPC824x PICR2"},
+    {BMC_BASE+0x46, "MPC824x PACR"},
+    {BMC_BASE+0x310, "MPC824x ITWR"},
+    {BMC_BASE+0x300, "MPC824x OMBAR"},
+    {BMC_BASE+0x308, "MPC824x OTWR"},
     {BMC_BASE+0x14, "MPC107 Peripheral Control and Status Register"},
     {BMC_BASE+0x78, "MPC107 EUMBAR"},
     {BMC_BASE+0xC0, "MPC107 Processor Bus Error Status"},
@@ -202,21 +251,23 @@ cpu_init_r  (bd_t *bd)
    * This is necessary before the EPIC, DMA ctlr, I2C ctlr, etc. can
    * be accessed.
    */
-  mpc8240_mpc107_setreg(EUMBBAR, EUMBBAR_VAL);
 
+#ifdef CONFIG_MPC8240  /* only on MPC8240 */
+  mpc824x_mpc107_setreg(EUMBBAR, EUMBBAR_VAL);
   /* MOT/SPS: Issue #10002, PCI (FD Alias enable)*/
-  mpc8240_mpc107_setreg(AMBOR, 0x000000C0);
+  mpc824x_mpc107_setreg(AMBOR, 0x000000C0);
+#endif
 
 
 #ifdef INCLUDE_MPC107_REPORT
-  /* Check MPC8240 PCI Device and Vendor ID */
-  while((tmp = mpc8240_mpc107_getreg(BMC_BASE)) != 0x31057){
+  /* Check MPC824x PCI Device and Vendor ID */
+  while((tmp = mpc824x_mpc107_getreg(BMC_BASE)) != 0x31057){
       printf(" MPC107: offset=0x%x, val = 0x%x\n", BMC_BASE, tmp);
   }
 
   for( i = 0; i < N_MPC107_Regs; i++){
       printf(" 0x%x/%s = 0x%x\n", MPC107Regs[i].iobase,
-            MPC107Regs[i].desc, mpc8240_mpc107_getreg(MPC107Regs[i].iobase));
+            MPC107Regs[i].desc, mpc824x_mpc107_getreg(MPC107Regs[i].iobase));
   }
 
   printf("IBAT0L = 0x%08X\n", mfspr(IBAT0L));
similarity index 99%
rename from cpu/mpc8240/drivers/epic/epic1.c
rename to cpu/mpc824x/drivers/epic/epic1.c
index c5333d56209166de7d58e9caa11144a64b0496f2..2050bb822c8c0c8ddf36a8cc0c66e29021309d43 100644 (file)
@@ -3,7 +3,7 @@
  * copyright @ motorola, 1999
  *
  *************************************************/
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <ppcboot.h>
 #include "epic.h"
 
similarity index 99%
rename from cpu/mpc8240/interrupts.c
rename to cpu/mpc824x/interrupts.c
index f40546190cb4d94685f785bb5b06ba7babcd02b8..b78c0c3c893a236ec26a3ff9afa0fdc3654df5ed 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include <ppcboot.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include <asm/processor.h>
 #include <asm/pci_io.h>
 #include <commproc.h>
similarity index 99%
rename from cpu/mpc8240/start.S
rename to cpu/mpc824x/start.S
index 9c0ed095bb9ab3919c74c44c50d3a767442b3ccf..4fdca6800acc205c09e4344a23aab17396f27167 100644 (file)
@@ -38,7 +38,7 @@
  * address and (s)dram will be positioned at address 0
  */
 #include <config.h>
-#include <mpc8240.h>
+#include <mpc824x.h>
 #include "version.h"
 
 #define _LINUX_CONFIG_H 1      /* avoid reading Linux autoconf.h file  */
similarity index 100%
rename from cpu/mpc8240/traps.c
rename to cpu/mpc824x/traps.c
index 20be21015554522785c508824daabb2580b25607..2c026b985a51b0a18e6aff30f23ff4dc943495f4 100644 (file)
@@ -11,7 +11,7 @@
 #include <bedbug/regs.h>
 #include <bedbug/ppc.h>
 
-#if (CONFIG_COMMANDS & CFG_CMD_BEDBUG) && (defined(CONFIG_MPC8240) || defined(CONFIG_MPC8260))
+#if (CONFIG_COMMANDS & CFG_CMD_BEDBUG) && (defined(CONFIG_MPC824X) || defined(CONFIG_MPC8260))
 
 #define MAX_BREAK_POINTS 1
 
index 7f02619136f705ce10cfa79e6e984645463abb8e..2b9782f7185e0fdde6ba4ec102966541b01051ac 100644 (file)
@@ -41,6 +41,7 @@
  * (easy to change)
  */
 
+#define CONFIG_MPC824X         1
 #define CONFIG_MPC8240         1
 #define CONFIG_CU824           1
 
index 0c2619cef7af3c787a70a208d1b1bb447a588e1b..8ffccd89917f05ee50b7f747cbc56702de4e89da 100644 (file)
@@ -45,6 +45,7 @@
  * (easy to change)
  */
 
+#define CONFIG_MPC824X      1
 #define CONFIG_MPC8240      1
 #define CONFIG_MOUSSE       1
 #define CFG_ADDR_MAP_B      1
index 44a79c03dc2ef483c3515a0084481869e148d563..f49c46807c8f39b356ba5289676c79e668162348 100644 (file)
@@ -35,6 +35,7 @@
  * (easy to change)
  */
 
+#define CONFIG_MPC824X         1
 #define CONFIG_MPC8240         1
 #define CONFIG_SANDPOINT       1
 #define USE_DINK32             1
old mode 100755 (executable)
new mode 100644 (file)
similarity index 91%
rename from include/mpc8240.h
rename to include/mpc824x.h
index 2500617..dc52bef
  * MA 02111-1307 USA
  */
 
-#ifndef __MPC8240_H__
-#define __MPC8240_H__
+#ifndef __MPC824X_H__
+#define __MPC824X_H__
 
+#include <config.h>
 
 /* CPU Types */
 #define CPU_TYPE_601           0x01            /* PPC 601 CPU */
@@ -36,7 +37,8 @@
 #define CPU_TYPE_604R          0x0a            /* PPC 604r CPU */
 #define CPU_TYPE_750           0x08            /* PPC 750  CPU */
 #define CPU_TYPE_8240          0x81            /* PPC 8240 CPU */
-#define _CACHE_ALIGN_SIZE      32      /* cache line size */
+#define CPU_TYPE_8245          0x8081          /* PPC 8245 CPU */
+#define _CACHE_ALIGN_SIZE      32                      /* cache line size */
 
 /* spr976 - DMISS data tlb miss address register 
  * spr977 - DCMP data tlb miss compare register 
 #define PMCR2          0x80000072  /* Power management config. 2 */
 #define ODCR           0x80000073  /* Output Driver Control Register */
 #define CLKDCR         0x80000074  /* CLK Driver Control Register */
+#ifdef CONFIG_MPC8245
+#define MIOCR1         0x80000076  /* Miscellaneous I/O Control Register 1 */
+#define MIOCR2         0x80000077  /* Miscellaneous I/O Control Register 2 */
+#endif
 #define EUMBBAR                0x80000078  /* Embedded Utilities Memory Block Base Address Register */
 #define EUMBBAR_VAL    0x80500000  /* PCI Relocation offset for EUMB region */
 #define EUMBSIZE       0x00100000  /* Size of EUMB region */
 #define PICR1_CF_APARK         0x00000008
 #define PICR1_LE_MODE          0x00000020
 #define PICR1_ST_GATH_EN       0x00000040
+#if defined(CONFIG_MPC8240)
 #define PICR1_EN_PCS           0x00000080 /* according to dink code, sets the 8240 to handle pci config space */
+#elif defined(CONFIG_MPC8241) || defined(CONFIG_MPC8245)
+#define PICR1_NO_BUSW_CK       0x00000080 /* no bus width check for flash writes */
+#define PICR1_DEC                      0x00000100 /* Time Base enable on 8245/8241 */
+#else
+#error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
+#endif
 #define PICR1_CF_DPARK         0x00000200
 #define PICR1_MCP_EN           0x00000800
 #define PICR1_FLASH_WR_EN      0x00001000
+#ifdef CONFIG_MPC8240
 #define PICR1_ADDRESS_MAP      0x00010000
+#define PIRC1_MSK              0xff000000
+#endif
 #define PICR1_PROC_TYPE_MSK    0x00060000
 #define PICR1_PROC_TYPE_603E   0x00040000
 #define PICR1_RCS0             0x00100000
-#define PIRC1_MSK              0xff000000
 
 #define PICR2_CF_SNOOP_WS_MASK 0x000c0000
 #define PICR2_CF_SNOOP_WS_0WS  0x00000000
 #define MCCR1_ROMNAL_MSK       0xf0000000
 #define MCCR1_ROMFAL_SHIFT     23
 #define MCCR1_ROMFAL_MSK       0x0f800000
+#define MCCR1_DBUS_SIZE0TO1_SHIFT  21
 #define MCCR1_BURST            0x00100000
 #define MCCR1_MEMGO            0x00080000
 #define MCCR1_SREN             0x00040000
+#if defined(CONFIG_MPC8240)
 #define MCCR1_RAM_TYPE         0x00020000
+#elif defined(CONFIG_MPC8245)
+#define MCCR1_SDRAM_EN         0x00020000
+#else
+#error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
+#endif
 #define MCCR1_PCKEN            0x00010000
 
 #define MCCR2_TS_WAIT_TIMER_MSK 0xe0000000
 #define MCCR2_INLINE_PAR_NOT_ECC    0x00100000
 #define MCCR2_WRITE_PARITY_CHK 0x00080000
 #define MCCR2_INLFRD_PARECC_CHK_EN  0x00040000
+#ifdef CONFIG_MPC8240
 #define MCCR2_ECC_EN           0x00020000
 #define MCCR2_EDO              0x00010000
+#endif
 #define MCCR2_REFINT_MSK       0x0000fffc
 #define MCCR2_REFINT_SHIFT     2
 #define MCCR2_RSV_PG           0x00000002
 #define MCCR3_BSTOPRE2TO5_SHIFT 28
 #define MCCR3_REFREC_MSK       0x0f000000
 #define MCCR3_REFREC_SHIFT     24
+#ifdef CONFIG_MPC8240
 #define MCCR3_RDLAT_MSK                0x00f00000
 #define MCCR3_RDLAT_SHIFT      20
 #define MCCR3_CPX              0x00010000
 #define MCCR3_RCD2_SHIFT       3
 #define MCCR3_RP1_MSK          0x00000007
 #define MCCR3_RP1_SHIFT                0
+#endif 
 
 #define MCCR4_PRETOACT_MSK     0xf0000000
 #define MCCR4_PRETOACT_SHIFT   28
 #define MCCR4_ACTTOPRE_SHIFT   24
 #define MCCR4_WMODE            0x00800000
 #define MCCR4_INLINE           0x00400000
+#if defined(CONFIG_MPC8240)
 #define MCCR4_BIT21            0x00200000 /* this include cos DINK code sets it- unknown function*/
+#elif defined(CONFIG_MPC8245)
+#define MCCR4_EXTROM           0x00200000 /* enables Extended ROM space */
+#else
+#error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
+#endif
 #define MCCR4_REGISTERED       0x00100000
 #define MCCR4_BSTOPRE0TO1_MSK  0x000c0000 /*BSTOPRE[0-1]*/
 #define MCCR4_BSTOPRE0TO1_SHIFT 18
 #define MCCR4_ACTTORW_SHIFT    4
 #define MCCR4_BSTOPRE6TO9_MSK  0x0000000f /*BSTOPRE[6-9]*/
 #define MCCR4_BSTOPRE6TO9_SHIFT 0
+#define MCCR4_DBUS_SIZE2_SHIFT 17
 
 #define MICR_ADDR_MASK         0x0ff00000
 #define MICR_ADDR_SHIFT                20
  * MPC107 Support
  *
  */
-unsigned int mpc8240_mpc107_getreg(unsigned int regNum);
-void mpc8240_mpc107_setreg(unsigned int regNum, unsigned int regVal);
-void mpc8240_mpc107_write8(unsigned int address, unsigned char data);
-void mpc8240_mpc107_write16(unsigned int address, unsigned short data);
-void mpc8240_mpc107_write32(unsigned int address, unsigned int data);
-unsigned char mpc8240_mpc107_read8(unsigned int address);
-unsigned short mpc8240_mpc107_read16(unsigned int address);
-unsigned int mpc8240_mpc107_read32(unsigned int address);
-unsigned int mpc8240_eummbar_read(unsigned int regNum);
-void mpc8240_eummbar_write(unsigned int regNum, unsigned int regVal);
+unsigned int mpc824x_mpc107_getreg(unsigned int regNum);
+void mpc824x_mpc107_setreg(unsigned int regNum, unsigned int regVal);
+void mpc824x_mpc107_write8(unsigned int address, unsigned char data);
+void mpc824x_mpc107_write16(unsigned int address, unsigned short data);
+void mpc824x_mpc107_write32(unsigned int address, unsigned int data);
+unsigned char mpc824x_mpc107_read8(unsigned int address);
+unsigned short mpc824x_mpc107_read16(unsigned int address);
+unsigned int mpc824x_mpc107_read32(unsigned int address);
+unsigned int mpc824x_eummbar_read(unsigned int regNum);
+void mpc824x_eummbar_write(unsigned int regNum, unsigned int regVal);
 unsigned long get_gclk_freq(void);
 
 #endif /* __ASSEMBLY__ */
 
-#endif /* __MPC8240_H__ */
+#endif /* __MPC824X_H__ */
index 29b1cda0d8e77e405f9af9240102da71f7895801..0d9be0ae6bd4b6ffef6153367870ddd93c9339ef 100644 (file)
@@ -96,7 +96,7 @@
 #define        r31     31
 
 
-#if defined(CONFIG_8xx) || defined(CONFIG_MPC8240)
+#if defined(CONFIG_8xx) || defined(CONFIG_MPC824X)
 
 /* Some special registers */
 
 #define LCTRL2 157     /* Load/Store Support       (37-41) */
 #define ICTRL  158
 
-#endif /* CONFIG_8xx, CONFIG_MPC8240 */
+#endif /* CONFIG_8xx, CONFIG_MPC824X */
 
 #if defined(CONFIG_8xx)