summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2005-07-23 10:37:35 -0500
committerJon Loeliger <jdl@freescale.com>2005-07-23 10:37:35 -0500
commit9c4c5ae3e10e4f2ca799aacbb74e1f5adb86e0b5 (patch)
treece06516d3935e9f3e2dac253a78742c7d3c211df
parent2d5df63e4f596fe439405048fd85157cdff079dc (diff)
* Patch by Jon Loeliger, Kumar Gala 2005-02-08
- Convert the CPM2 based functionality to use new CONFIG_CPM2 option rather than a myriad of CONFIG_MPC8560-like variants. Applies to MPC85xx and MPC8260 boards, includes stxgp3 and sbc8560. Eliminates the CONFIG_MPC8560 option entirely. Distributes the new CONFIG_CPM2 option to each 8260 board.
-rw-r--r--CHANGELOG6
-rw-r--r--board/mpc8560ads/config.mk1
-rw-r--r--board/sbc8560/config.mk1
-rw-r--r--board/stxgp3/config.mk1
-rw-r--r--common/cmd_bdinfo.c4
-rw-r--r--common/cmd_bootm.c4
-rw-r--r--cpu/mpc8260/config.mk2
-rw-r--r--cpu/mpc85xx/commproc.c4
-rw-r--r--cpu/mpc85xx/cpu_init.c6
-rw-r--r--cpu/mpc85xx/ether_fcc.c4
-rw-r--r--cpu/mpc85xx/serial_scc.c4
-rw-r--r--cpu/mpc85xx/speed.c4
-rw-r--r--doc/README.mpc85xxads1
-rw-r--r--include/asm-ppc/global_data.h4
-rw-r--r--include/asm-ppc/immap_85xx.h4
-rw-r--r--include/asm-ppc/u-boot.h2
-rw-r--r--include/configs/CPU86.h1
-rw-r--r--include/configs/CPU87.h1
-rw-r--r--include/configs/IDS8247.h1
-rw-r--r--include/configs/IPHASE4539.h2
-rw-r--r--include/configs/ISPAN.h1
-rw-r--r--include/configs/MPC8260ADS.h2
-rw-r--r--include/configs/MPC8266ADS.h1
-rw-r--r--include/configs/MPC8541CDS.h1
-rw-r--r--include/configs/MPC8555CDS.h1
-rw-r--r--include/configs/MPC8560ADS.h2
-rw-r--r--include/configs/PM826.h1
-rw-r--r--include/configs/PM828.h1
-rw-r--r--include/configs/RPXsuper.h1
-rw-r--r--include/configs/Rattler.h2
-rw-r--r--include/configs/SBC8540.h2
-rw-r--r--include/configs/SBC8560.h2
-rw-r--r--include/configs/SCM.h1
-rw-r--r--include/configs/TQM8260.h2
-rw-r--r--include/configs/ZPC1900.h1
-rw-r--r--include/configs/atc.h1
-rw-r--r--include/configs/cogent_mpc8260.h1
-rw-r--r--include/configs/ep8260.h2
-rw-r--r--include/configs/gw8260.h1
-rw-r--r--include/configs/hymod.h1
-rw-r--r--include/configs/ppmc8260.h1
-rw-r--r--include/configs/rsdproto.h1
-rw-r--r--include/configs/sacsng.h1
-rw-r--r--include/configs/sbc8260.h1
-rw-r--r--include/configs/sbc8560.h2
-rw-r--r--include/configs/stxgp3.h2
-rw-r--r--include/ioports.h2
-rw-r--r--include/net.h2
-rw-r--r--lib_ppc/board.c10
49 files changed, 68 insertions, 38 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e89c98f5ca2..ac9471d45f8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,12 @@
======================================================================
Changes for U-Boot 1.1.3:
======================================================================
+* Patch by Jon Loeliger, Kumar Gala 2005-02-08
+ - Convert the CPM2 based functionality to use new CONFIG_CPM2
+ option rather than a myriad of CONFIG_MPC8560-like variants.
+ Applies to MPC85xx and MPC8260 boards, includes stxgp3 and sbc8560.
+ Eliminates the CONFIG_MPC8560 option entirely. Distributes the
+ new CONFIG_CPM2 option to each 8260 board.
* Patch by Jon Loeliger, 20 Jul 2005:
Add missing PCI IO port definitions.
diff --git a/board/mpc8560ads/config.mk b/board/mpc8560ads/config.mk
index 53e3edb264e..9aef2bb163e 100644
--- a/board/mpc8560ads/config.mk
+++ b/board/mpc8560ads/config.mk
@@ -29,5 +29,4 @@
TEXT_BASE = 0xfff80000
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8560=1
PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff --git a/board/sbc8560/config.mk b/board/sbc8560/config.mk
index 3c8cfbe6f5a..6d9ae45126a 100644
--- a/board/sbc8560/config.mk
+++ b/board/sbc8560/config.mk
@@ -30,5 +30,4 @@
TEXT_BASE = 0xfffc0000
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8560=1
PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff --git a/board/stxgp3/config.mk b/board/stxgp3/config.mk
index 14c1f0116bf..2427818e0a9 100644
--- a/board/stxgp3/config.mk
+++ b/board/stxgp3/config.mk
@@ -29,5 +29,4 @@
TEXT_BASE = 0xfff80000
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8560=1
PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index ca834732b82..c118f06de94 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -68,13 +68,13 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
print_str ("pci_busfreq", strmhz(buf, bd->bi_pci_busfreq));
#endif
#else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300 */
-#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
print_str ("vco", strmhz(buf, bd->bi_vco));
print_str ("sccfreq", strmhz(buf, bd->bi_sccfreq));
print_str ("brgfreq", strmhz(buf, bd->bi_brgfreq));
#endif
print_str ("intfreq", strmhz(buf, bd->bi_intfreq));
-#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
print_str ("cpmfreq", strmhz(buf, bd->bi_cpmfreq));
#endif
print_str ("busfreq", strmhz(buf, bd->bi_busfreq));
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index a90735f3f2c..c200fd8b86b 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -580,12 +580,12 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
kbd->bi_flbfreq /= 1000000L;
kbd->bi_vcofreq /= 1000000L;
#endif
-#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
kbd->bi_cpmfreq /= 1000000L;
kbd->bi_brgfreq /= 1000000L;
kbd->bi_sccfreq /= 1000000L;
kbd->bi_vco /= 1000000L;
-#endif /* CONFIG_8260 */
+#endif
#if defined(CONFIG_MPC5xxx)
kbd->bi_ipbfreq /= 1000000L;
kbd->bi_pcifreq /= 1000000L;
diff --git a/cpu/mpc8260/config.mk b/cpu/mpc8260/config.mk
index 3b2892481db..dd7a71fdf36 100644
--- a/cpu/mpc8260/config.mk
+++ b/cpu/mpc8260/config.mk
@@ -23,5 +23,5 @@
PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
-PLATFORM_CPPFLAGS += -DCONFIG_8260 -ffixed-r2 -ffixed-r29 \
+PLATFORM_CPPFLAGS += -DCONFIG_8260 -DCONFIG_CPM2 -ffixed-r2 -ffixed-r29 \
-mstring -mcpu=603e -mmultiple
diff --git a/cpu/mpc85xx/commproc.c b/cpu/mpc85xx/commproc.c
index df11052f2a7..aa8a5a57ba8 100644
--- a/cpu/mpc85xx/commproc.c
+++ b/cpu/mpc85xx/commproc.c
@@ -24,7 +24,7 @@
#include <common.h>
#include <asm/cpm_85xx.h>
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
/*
* because we have stack and init data in dual port ram
* we must reduce the size
@@ -211,4 +211,4 @@ ulong post_word_load (void)
#endif /* CONFIG_POST */
-#endif /* CONFIG_MPC8560 */
+#endif /* CONFIG_CPM2 */
diff --git a/cpu/mpc85xx/cpu_init.c b/cpu/mpc85xx/cpu_init.c
index ee2f79feef8..4d6438fd4d6 100644
--- a/cpu/mpc85xx/cpu_init.c
+++ b/cpu/mpc85xx/cpu_init.c
@@ -30,7 +30,7 @@
#include <ioports.h>
#include <asm/io.h>
-#ifdef CONFIG_MPC8560
+#ifdef CONFIG_CPM2
static void config_8560_ioports (volatile immap_t * immr)
{
int portnum;
@@ -115,7 +115,7 @@ void cpu_init_f (void)
memset ((void *) gd, 0, sizeof (gd_t));
-#ifdef CONFIG_MPC8560
+#ifdef CONFIG_CPM2
config_8560_ioports(immap);
#endif
@@ -173,7 +173,7 @@ void cpu_init_f (void)
memctl->br7 = CFG_BR7_PRELIM;
#endif
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
m8560_cpm_reset();
#endif
}
diff --git a/cpu/mpc85xx/ether_fcc.c b/cpu/mpc85xx/ether_fcc.c
index 122ca870c82..cbbb3a40203 100644
--- a/cpu/mpc85xx/ether_fcc.c
+++ b/cpu/mpc85xx/ether_fcc.c
@@ -48,7 +48,7 @@
#include <config.h>
#include <net.h>
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
#if defined(CONFIG_ETHER_ON_FCC) && (CONFIG_COMMANDS & CFG_CMD_NET) && \
defined(CONFIG_NET_MULTI)
@@ -458,4 +458,4 @@ int fec_initialize(bd_t *bis)
#endif /* CONFIG_ETHER_ON_FCC && CFG_CMD_NET && CONFIG_NET_MULTI */
-#endif /* CONFIG_MPC8560 */
+#endif /* CONFIG_CPM2 */
diff --git a/cpu/mpc85xx/serial_scc.c b/cpu/mpc85xx/serial_scc.c
index ea82761465b..cf060d68901 100644
--- a/cpu/mpc85xx/serial_scc.c
+++ b/cpu/mpc85xx/serial_scc.c
@@ -35,7 +35,7 @@
#include <common.h>
#include <asm/cpm_85xx.h>
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
#if defined(CONFIG_CONS_ON_SCC)
#if CONFIG_CONS_INDEX == 1 /* Console on SCC1 */
@@ -271,4 +271,4 @@ serial_tstc()
#endif /* CONFIG_CONS_ON_SCC */
-#endif /* CONFIG_MPC8560 */
+#endif /* CONFIG_CPM2 */
diff --git a/cpu/mpc85xx/speed.c b/cpu/mpc85xx/speed.c
index 787f7fadc98..d736742f622 100644
--- a/cpu/mpc85xx/speed.c
+++ b/cpu/mpc85xx/speed.c
@@ -82,7 +82,7 @@ int get_clocks (void)
{
DECLARE_GLOBAL_DATA_PTR;
sys_info_t sys_info;
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
volatile immap_t *immap = (immap_t *) CFG_IMMR;
uint sccr, dfbrg;
@@ -94,7 +94,7 @@ int get_clocks (void)
get_sys_info (&sys_info);
gd->cpu_clk = sys_info.freqProcessor;
gd->bus_clk = sys_info.freqSystemBus;
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
gd->vco_out = 2*sys_info.freqSystemBus;
gd->cpm_clk = gd->vco_out / 2;
gd->scc_clk = gd->vco_out / 4;
diff --git a/doc/README.mpc85xxads b/doc/README.mpc85xxads
index 939de20e8f6..c488f2a56bf 100644
--- a/doc/README.mpc85xxads
+++ b/doc/README.mpc85xxads
@@ -134,7 +134,6 @@ Updated 13-July-2004 Jon Loeliger
CONFIG_E500 BOOKE e500 family(Motorola)
CONFIG_MPC85xx MPC8540,MPC8560 and their derivatives
CONFIG_MPC8540 MPC8540 specific
- CONFIG_MPC8560 MPC8560 specific
CONFIG_MPC8540ADS MPC8540ADS board specific
CONFIG_MPC8560ADS MPC8560ADS board specific
CONFIG_TSEC_ENET Use on-chip 10/100/1000 ethernet for networking
diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h
index c800f63cc0a..2b57a8bf143 100644
--- a/include/asm-ppc/global_data.h
+++ b/include/asm-ppc/global_data.h
@@ -39,7 +39,7 @@ typedef struct global_data {
unsigned long baudrate;
unsigned long cpu_clk; /* CPU clock in Hz! */
unsigned long bus_clk;
-#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
/* There are many clocks on the MPC8260 - see page 9-5 */
unsigned long vco_out;
unsigned long cpm_clk;
@@ -64,7 +64,7 @@ typedef struct global_data {
unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid? */
unsigned long have_console; /* serial_init() was called */
-#if defined(CFG_ALLOC_DPRAM) || defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CFG_ALLOC_DPRAM) || defined(CONFIG_CPM2)
unsigned int dp_alloc_base;
unsigned int dp_alloc_top;
#endif
diff --git a/include/asm-ppc/immap_85xx.h b/include/asm-ppc/immap_85xx.h
index 1b73defaa46..e9bb989021d 100644
--- a/include/asm-ppc/immap_85xx.h
+++ b/include/asm-ppc/immap_85xx.h
@@ -1025,9 +1025,7 @@ typedef struct ccsr_pic {
} ccsr_pic_t;
/* CPM Block(0x8_0000-0xc_0000) */
-#if defined(CONFIG_MPC8540) \
- || defined(CONFIG_MPC8541) \
- || defined(CONFIG_MPC8555)
+#ifndef CONFIG_CPM2
typedef struct ccsr_cpm {
char res[262144];
} ccsr_cpm_t;
diff --git a/include/asm-ppc/u-boot.h b/include/asm-ppc/u-boot.h
index f8282d40c92..5da0e68ba82 100644
--- a/include/asm-ppc/u-boot.h
+++ b/include/asm-ppc/u-boot.h
@@ -59,7 +59,7 @@ typedef struct bd_info {
unsigned short bi_ethspeed; /* Ethernet speed in Mbps */
unsigned long bi_intfreq; /* Internal Freq, in MHz */
unsigned long bi_busfreq; /* Bus Freq, in MHz */
-#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
unsigned long bi_cpmfreq; /* CPM_CLK Freq, in MHz */
unsigned long bi_brgfreq; /* BRG_CLK Freq, in MHz */
unsigned long bi_sccfreq; /* SCC_CLK Freq, in MHz */
diff --git a/include/configs/CPU86.h b/include/configs/CPU86.h
index ce7ccc2789d..09185b1dbbc 100644
--- a/include/configs/CPU86.h
+++ b/include/configs/CPU86.h
@@ -35,6 +35,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_CPU86 1 /* ...on a CPU86 board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/*
* select serial console configuration
diff --git a/include/configs/CPU87.h b/include/configs/CPU87.h
index 0e0876f807d..c50870fedca 100644
--- a/include/configs/CPU87.h
+++ b/include/configs/CPU87.h
@@ -36,6 +36,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_CPU87 1 /* ...on a CPU87 board */
#define CONFIG_PCI
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/*
* select serial console configuration
diff --git a/include/configs/IDS8247.h b/include/configs/IDS8247.h
index c4fb01d8a91..729b0486917 100644
--- a/include/configs/IDS8247.h
+++ b/include/configs/IDS8247.h
@@ -37,6 +37,7 @@
#define CONFIG_MPC8272_FAMILY 1
#define CONFIG_IDS8247 1
#define CPU_ID_STR "MPC8247"
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
diff --git a/include/configs/IPHASE4539.h b/include/configs/IPHASE4539.h
index 6b7079edf6a..c1565fc037c 100644
--- a/include/configs/IPHASE4539.h
+++ b/include/configs/IPHASE4539.h
@@ -40,6 +40,8 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_IPHASE4539 1 /* ...on a Interphase 4539 PMC */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
+
/*-----------------------------------------------------------------------
* select serial console configuration
*
diff --git a/include/configs/ISPAN.h b/include/configs/ISPAN.h
index 8aa18caa7e9..65056a21eee 100644
--- a/include/configs/ISPAN.h
+++ b/include/configs/ISPAN.h
@@ -31,6 +31,7 @@
#define CONFIG_MPC8260 /* This is an MPC8260 CPU */
#define CONFIG_ISPAN /* ...on one of Interphase iSPAN boards */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/*-----------------------------------------------------------------------
* Select serial console configuration
diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
index ed8fe6b075d..bba476a6a07 100644
--- a/include/configs/MPC8260ADS.h
+++ b/include/configs/MPC8260ADS.h
@@ -42,6 +42,8 @@
#define CONFIG_MPC8260ADS 1 /* Motorola PQ2 ADS family board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
+
/*
* Figure out if we are booting low via flash HRCW or high via the BCSR.
*/
diff --git a/include/configs/MPC8266ADS.h b/include/configs/MPC8266ADS.h
index 89f2d096fd3..d8e91a53060 100644
--- a/include/configs/MPC8266ADS.h
+++ b/include/configs/MPC8266ADS.h
@@ -51,6 +51,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_MPC8266ADS 1 /* ...on motorola ADS board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index 3dd4957bc70..cf15b88390b 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -33,6 +33,7 @@
#define CONFIG_BOOKE 1 /* BOOKE */
#define CONFIG_E500 1 /* BOOKE e500 family */
#define CONFIG_MPC85xx 1 /* MPC8540/60/55/41 */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_MPC8541 1 /* MPC8541 specific */
#define CONFIG_MPC8541CDS 1 /* MPC8541CDS board specific */
diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h
index 379a12cc693..78b622fdde5 100644
--- a/include/configs/MPC8555CDS.h
+++ b/include/configs/MPC8555CDS.h
@@ -33,6 +33,7 @@
#define CONFIG_BOOKE 1 /* BOOKE */
#define CONFIG_E500 1 /* BOOKE e500 family */
#define CONFIG_MPC85xx 1 /* MPC8540/60/55/41 */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_MPC8555 1 /* MPC8555 specific */
#define CONFIG_MPC8555CDS 1 /* MPC8555CDS board specific */
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 72717373817..e1a2bba8a0b 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -38,7 +38,7 @@
#define CONFIG_BOOKE 1 /* BOOKE */
#define CONFIG_E500 1 /* BOOKE e500 family */
#define CONFIG_MPC85xx 1 /* MPC8540/MPC8560 */
-#define CONFIG_MPC8560 1 /* MPC8560 specific */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_MPC8560ADS 1 /* MPC8560ADS board specific */
#define CONFIG_PCI
diff --git a/include/configs/PM826.h b/include/configs/PM826.h
index a4c4fc973dc..9ca1e52299d 100644
--- a/include/configs/PM826.h
+++ b/include/configs/PM826.h
@@ -37,6 +37,7 @@
#define CONFIG_MPC8260 1 /* This is a MPC8260 CPU */
#define CONFIG_PM826 1 /* ...on a PM8260 module */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#undef CONFIG_DB_CR826_J30x_ON /* J30x jumpers on D.B. carrier */
diff --git a/include/configs/PM828.h b/include/configs/PM828.h
index 5b71c960fa2..7d98df5cac4 100644
--- a/include/configs/PM828.h
+++ b/include/configs/PM828.h
@@ -37,6 +37,7 @@
#define CONFIG_MPC8260 1 /* This is a MPC8260 CPU */
#define CONFIG_PM828 1 /* ...on a PM828 module */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#undef CONFIG_DB_CR826_J30x_ON /* J30x jumpers on D.B. carrier */
diff --git a/include/configs/RPXsuper.h b/include/configs/RPXsuper.h
index cdf716cb240..6ae9403c469 100644
--- a/include/configs/RPXsuper.h
+++ b/include/configs/RPXsuper.h
@@ -173,6 +173,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_RPXSUPER 1 /* on an Embedded Planet RPX Super Board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
diff --git a/include/configs/Rattler.h b/include/configs/Rattler.h
index f98a6c60b08..a55297096fa 100644
--- a/include/configs/Rattler.h
+++ b/include/configs/Rattler.h
@@ -33,6 +33,8 @@
#define CPU_ID_STR "MPC8250"
#endif /* CONFIG_MPC8248 */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
+
#define CONFIG_RATTLER /* Analogue&Micro Rattler board */
#undef DEBUG
diff --git a/include/configs/SBC8540.h b/include/configs/SBC8540.h
index 60561eb22b9..5bdabfee9a8 100644
--- a/include/configs/SBC8540.h
+++ b/include/configs/SBC8540.h
@@ -46,7 +46,7 @@
#define CONFIG_MPC85xx_REV1 1 /* MPC85xx Rev 1.0 chip */
-#define CONFIG_MPC8560 1 /* MPC8560 (CPU) specific */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_SBC8540 1 /* configuration for SBC8560 board */
diff --git a/include/configs/SBC8560.h b/include/configs/SBC8560.h
index 6bd0abe7634..ca7e5dd9d91 100644
--- a/include/configs/SBC8560.h
+++ b/include/configs/SBC8560.h
@@ -46,7 +46,7 @@
#define CONFIG_MPC85xx_REV1 1 /* MPC85xx Rev 1.0 chip */
-#define CONFIG_MPC8560 1 /* MPC8560 (CPU) specific */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_SBC8560 1 /* configuration for SBC8560 board */
#define CONFIG_MPC8560ADS 1 /* MPC8560ADS board specific (supplement) */
diff --git a/include/configs/SCM.h b/include/configs/SCM.h
index e4533b465b1..91914e80def 100644
--- a/include/configs/SCM.h
+++ b/include/configs/SCM.h
@@ -36,6 +36,7 @@
#define CONFIG_MPC8260 1 /* This is a MPC8260 CPU */
#define CONFIG_TQM8260 200 /* ...on a TQM8260 module Rev.200 */
#define CONFIG_SCM 1 /* ...on a System Controller Module */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#if (CONFIG_TQM8260 <= 100)
# error "TQM8260 module revison not supported"
diff --git a/include/configs/TQM8260.h b/include/configs/TQM8260.h
index eaf138acbf0..e6266b58d15 100644
--- a/include/configs/TQM8260.h
+++ b/include/configs/TQM8260.h
@@ -52,6 +52,8 @@
#define CONFIG_TQM8260 200 /* ...on a TQM8260 module Rev.200 */
#endif
+#define CONFIG_CPM2 1 /* Has a CPM2 */
+
#define CONFIG_82xx_CONS_SMC1 1 /* console on SMC1 */
#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
diff --git a/include/configs/ZPC1900.h b/include/configs/ZPC1900.h
index 685797327ea..f71e691b262 100644
--- a/include/configs/ZPC1900.h
+++ b/include/configs/ZPC1900.h
@@ -30,6 +30,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_ZPC1900 1 /* ...on Zephyr ZPC.1900 board */
#define CPU_ID_STR "MPC8265"
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#undef DEBUG
diff --git a/include/configs/atc.h b/include/configs/atc.h
index 275124830f5..881a4caee6e 100644
--- a/include/configs/atc.h
+++ b/include/configs/atc.h
@@ -35,6 +35,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_ATC 1 /* ...on a ATC board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/*
* select serial console configuration
diff --git a/include/configs/cogent_mpc8260.h b/include/configs/cogent_mpc8260.h
index b3ec89b05b0..aea2e64365a 100644
--- a/include/configs/cogent_mpc8260.h
+++ b/include/configs/cogent_mpc8260.h
@@ -35,6 +35,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_COGENT 1 /* using Cogent Modular Architecture */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */
diff --git a/include/configs/ep8260.h b/include/configs/ep8260.h
index fb335db8049..98e1716bf15 100644
--- a/include/configs/ep8260.h
+++ b/include/configs/ep8260.h
@@ -48,6 +48,8 @@
#define CFG_EP8260_H2 1
/* #undef CFG_EP8260_H2 */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
+
/* What is the oscillator's (UX2) frequency in Hz? */
#define CONFIG_8260_CLKIN (66 * 1000 * 1000)
diff --git a/include/configs/gw8260.h b/include/configs/gw8260.h
index 3666bdbb7e9..6c080437ffa 100644
--- a/include/configs/gw8260.h
+++ b/include/configs/gw8260.h
@@ -330,6 +330,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_GW8260 1 /* on an GW8260 Board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
diff --git a/include/configs/hymod.h b/include/configs/hymod.h
index 90d6b25bdb8..0d62b9efde5 100644
--- a/include/configs/hymod.h
+++ b/include/configs/hymod.h
@@ -35,6 +35,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_HYMOD 1 /* ...on a Hymod board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */
diff --git a/include/configs/ppmc8260.h b/include/configs/ppmc8260.h
index 2ad28673514..60b0b3713b7 100644
--- a/include/configs/ppmc8260.h
+++ b/include/configs/ppmc8260.h
@@ -297,6 +297,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_PPMC8260 1 /* on an Wind River PPMC8260 Board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
diff --git a/include/configs/rsdproto.h b/include/configs/rsdproto.h
index b1f6cb20eab..6c9e392c36b 100644
--- a/include/configs/rsdproto.h
+++ b/include/configs/rsdproto.h
@@ -37,6 +37,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_RSD_PROTO 1 /* on a R&S Protocol Board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
#define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */
diff --git a/include/configs/sacsng.h b/include/configs/sacsng.h
index cc9774c6a47..031eba597de 100644
--- a/include/configs/sacsng.h
+++ b/include/configs/sacsng.h
@@ -544,6 +544,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */
#define CONFIG_SACSng 1 /* munged for the SACSng */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
diff --git a/include/configs/sbc8260.h b/include/configs/sbc8260.h
index dc9cec360cb..45e4494ec61 100644
--- a/include/configs/sbc8260.h
+++ b/include/configs/sbc8260.h
@@ -481,6 +481,7 @@
#define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */
#define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */
+#define CONFIG_CPM2 1 /* Has a CPM2 */
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
diff --git a/include/configs/sbc8560.h b/include/configs/sbc8560.h
index 8cf9eeb3d4d..72a3091d5f6 100644
--- a/include/configs/sbc8560.h
+++ b/include/configs/sbc8560.h
@@ -40,7 +40,7 @@
#define CONFIG_MPC85xx_REV1 1 /* MPC85xx Rev 1.0 chip */
-#define CONFIG_MPC8560 1 /* MPC8560 specific */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_SBC8560 1 /* configuration for SBC8560 board */
/* XXX flagging this as something I might want to delete */
diff --git a/include/configs/stxgp3.h b/include/configs/stxgp3.h
index e9261db30a4..b5684d334b3 100644
--- a/include/configs/stxgp3.h
+++ b/include/configs/stxgp3.h
@@ -39,7 +39,7 @@
#define CONFIG_BOOKE 1 /* BOOKE */
#define CONFIG_E500 1 /* BOOKE e500 family */
#define CONFIG_MPC85xx 1 /* MPC8540/MPC8560 */
-#define CONFIG_MPC8560 1 /* MPC8560 specific */
+#define CONFIG_CPM2 1 /* has CPM2 */
#define CONFIG_STXGP3 1 /* Silicon Tx GPPP board specific*/
#undef CONFIG_PCI /* pci ethernet support */
diff --git a/include/ioports.h b/include/ioports.h
index eba9aee0dd6..d7e19e195bb 100644
--- a/include/ioports.h
+++ b/include/ioports.h
@@ -25,7 +25,7 @@ typedef struct {
* the internal memory map aligns the above structure on
* a 0x20 byte boundary
*/
-#ifdef CONFIG_MPC8560
+#ifdef CONFIG_MPC85xx
#define ioport_addr(im, idx) (ioport_t *)((uint)&((im)->im_cpm.im_cpm_iop) + ((idx)*0x20))
#else
#define ioport_addr(im, idx) (ioport_t *)((uint)&(im)->im_ioport + ((idx)*0x20))
diff --git a/include/net.h b/include/net.h
index e50c3819bd9..623d2250823 100644
--- a/include/net.h
+++ b/include/net.h
@@ -29,7 +29,7 @@
# endif
#endif /* CONFIG_MPC5xxx */
-#if !defined(CONFIG_NET_MULTI) && (defined(CONFIG_8260) || defined(CONFIG_MPC8560))
+#if !defined(CONFIG_NET_MULTI) && defined(CONFIG_CPM2)
#include <config.h>
#if defined(CONFIG_ETHER_ON_FCC)
#if defined(CONFIG_ETHER_ON_SCC)
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index e46b8a9e6b6..69f1c45568f 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -50,7 +50,7 @@
#include <net.h>
#include <serial.h>
#ifdef CFG_ALLOC_DPRAM
-#if !(defined(CONFIG_8260)||defined(CONFIG_MPC8560))
+#if !defined(CONFIG_CPM2)
#include <commproc.h>
#endif
#endif
@@ -272,7 +272,7 @@ init_fnc_t *init_sequence[] = {
init_timebase,
#endif
#ifdef CFG_ALLOC_DPRAM
-#if !(defined(CONFIG_8260) || defined(CONFIG_MPC8560))
+#if !defined(CONFIG_CPM2)
dpram_init,
#endif
#endif
@@ -360,7 +360,7 @@ void board_init_f (ulong bootflag)
/* compiler optimization barrier needed for GCC >= 3.4 */
__asm__ __volatile__("": : :"memory");
-#if !(defined(CONFIG_8260) || defined(CONFIG_MPC8560))
+#if !defined(CONFIG_CPM2)
/* Clear initial global data */
memset ((void *) gd, 0, sizeof (gd_t));
#endif
@@ -521,12 +521,12 @@ void board_init_f (ulong bootflag)
WATCHDOG_RESET ();
bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */
-#if defined(CONFIG_8260) || defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
bd->bi_cpmfreq = gd->cpm_clk;
bd->bi_brgfreq = gd->brg_clk;
bd->bi_sccfreq = gd->scc_clk;
bd->bi_vco = gd->vco_out;
-#endif /* CONFIG_8260 */
+#endif /* CONFIG_CPM2 */
#if defined(CONFIG_MPC5xxx)
bd->bi_ipbfreq = gd->ipb_clk;
bd->bi_pcifreq = gd->pci_clk;