[U-Boot-Users] CPM2 Config Patches

Jon Loeliger jdl at freescale.com
Tue Feb 8 18:58:50 CET 2005


Wolfgang,

This patch corrects problems with a previously
posted patch for some CPM2 configuration changes
that I made on 2004-Dec-6.  It was incomplete.


Obsolete patch:
   CPM2 Config Patch by Jon Loelier dated 2004-12-06 14:54

New changelog:

* 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.



diff -Nur --exclude=CVS u-boot/board/cds/mpc8541cds/config.mk u-boot-pq3/board/cds/mpc8541cds/config.mk
--- u-boot/board/cds/mpc8541cds/config.mk	2004-11-01 15:53:02.000000000 -0600
+++ u-boot-pq3/board/cds/mpc8541cds/config.mk	2004-12-03 15:20:42.000000000 -0600
@@ -27,4 +27,5 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
+PLATFORM_CPPFLAGS += -DCONFIG_CPM2=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC8541=1
diff -Nur --exclude=CVS u-boot/board/cds/mpc8555cds/config.mk u-boot-pq3/board/cds/mpc8555cds/config.mk
--- u-boot/board/cds/mpc8555cds/config.mk	2004-11-01 15:53:03.000000000 -0600
+++ u-boot-pq3/board/cds/mpc8555cds/config.mk	2004-12-03 15:20:42.000000000 -0600
@@ -27,4 +27,5 @@
 
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
+PLATFORM_CPPFLAGS += -DCONFIG_CPM2=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC8555=1
diff -Nur --exclude=CVS u-boot/board/mpc8560ads/config.mk u-boot-pq3/board/mpc8560ads/config.mk
--- u-boot/board/mpc8560ads/config.mk	2004-06-08 19:34:47.000000000 -0500
+++ u-boot-pq3/board/mpc8560ads/config.mk	2004-12-03 15:20:43.000000000 -0600
@@ -29,5 +29,5 @@
 TEXT_BASE = 0xfff80000
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8560=1
+PLATFORM_CPPFLAGS += -DCONFIG_CPM2=1
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff -Nur --exclude=CVS u-boot/board/sbc8560/config.mk u-boot-pq3/board/sbc8560/config.mk
--- u-boot/board/sbc8560/config.mk	2004-11-01 15:53:04.000000000 -0600
+++ u-boot-pq3/board/sbc8560/config.mk	2004-12-03 15:20:44.000000000 -0600
@@ -30,5 +30,5 @@
 TEXT_BASE = 0xfffc0000
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8560=1
+PLATFORM_CPPFLAGS += -DCONFIG_CPM2=1
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff -Nur --exclude=CVS u-boot/board/stxgp3/config.mk u-boot-pq3/board/stxgp3/config.mk
--- u-boot/board/stxgp3/config.mk	2004-04-18 16:45:44.000000000 -0500
+++ u-boot-pq3/board/stxgp3/config.mk	2004-12-03 15:20:44.000000000 -0600
@@ -29,5 +29,5 @@
 TEXT_BASE = 0xfff80000
 
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8560=1
+PLATFORM_CPPFLAGS += -DCONFIG_CPM2=1
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff -Nur --exclude=CVS u-boot/common/cmd_bdinfo.c u-boot-pq3/common/cmd_bdinfo.c
--- u-boot/common/cmd_bdinfo.c	2004-12-31 03:32:50.000000000 -0600
+++ u-boot-pq3/common/cmd_bdinfo.c	2005-02-01 13:16:44.000000000 -0600
@@ -68,13 +68,13 @@
 	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 -Nur --exclude=CVS u-boot/common/cmd_bootm.c u-boot-pq3/common/cmd_bootm.c
--- u-boot/common/cmd_bootm.c	2004-11-20 18:06:34.000000000 -0600
+++ u-boot-pq3/common/cmd_bootm.c	2005-02-01 13:16:44.000000000 -0600
@@ -580,12 +580,12 @@
 	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 -Nur --exclude=CVS u-boot/cpu/mpc8260/config.mk u-boot-pq3/cpu/mpc8260/config.mk
--- u-boot/cpu/mpc8260/config.mk	2003-11-17 15:14:39.000000000 -0600
+++ u-boot-pq3/cpu/mpc8260/config.mk	2004-12-03 15:20:46.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/cpu/mpc85xx/commproc.c u-boot-pq3/cpu/mpc85xx/commproc.c
--- u-boot/cpu/mpc85xx/commproc.c	2003-10-15 18:53:51.000000000 -0500
+++ u-boot-pq3/cpu/mpc85xx/commproc.c	2004-12-03 15:20:46.000000000 -0600
@@ -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 @@
 
 #endif	/* CONFIG_POST */
 
-#endif /* CONFIG_MPC8560 */
+#endif /* CONFIG_CPM2 */
diff -Nur --exclude=CVS u-boot/cpu/mpc85xx/cpu_init.c u-boot-pq3/cpu/mpc85xx/cpu_init.c
--- u-boot/cpu/mpc85xx/cpu_init.c	2003-10-15 18:53:51.000000000 -0500
+++ u-boot-pq3/cpu/mpc85xx/cpu_init.c	2004-12-03 15:20:46.000000000 -0600
@@ -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 @@
 	memset ((void *) gd, 0, sizeof (gd_t));
 
 
-#ifdef CONFIG_MPC8560
+#ifdef CONFIG_CPM2
 	config_8560_ioports(immap);
 #endif
 
@@ -173,7 +173,7 @@
 	memctl->br7 = CFG_BR7_PRELIM;
 #endif
 
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
 	m8560_cpm_reset();
 #endif
 }
@@ -189,6 +189,21 @@
 	volatile uint temp;
 
 	asm("msync;isync");
+	temp = l2cache->l2ctl;
+	temp &= 0x30000000;
+	switch ( temp ) {
+	case 0x20000000:
+		printf ("L2 cache 256KB:");
+		break;
+	case 0x00000000:
+	case 0x10000000:
+	case 0x30000000:
+	default:
+		printf ("L2 cache unknown size. Check the silicon!\n");
+		return -1;
+	}
+
+	asm("msync;isync");
 	l2cache->l2ctl = 0x68000000; /* invalidate */
 	temp = l2cache->l2ctl;
 	asm("msync;isync");
@@ -196,7 +211,7 @@
 	temp = l2cache->l2ctl;
 	asm("msync;isync");
 
-	printf("L2 cache enabled: 256KB\n");
+	printf("enabled\n");
 #else
 	printf("L2 cache disabled.\n");
 #endif
diff -Nur --exclude=CVS u-boot/cpu/mpc85xx/ether_fcc.c u-boot-pq3/cpu/mpc85xx/ether_fcc.c
--- u-boot/cpu/mpc85xx/ether_fcc.c	2003-10-15 18:53:51.000000000 -0500
+++ u-boot-pq3/cpu/mpc85xx/ether_fcc.c	2004-12-03 15:20:46.000000000 -0600
@@ -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 @@
 
 #endif	/* CONFIG_ETHER_ON_FCC && CFG_CMD_NET && CONFIG_NET_MULTI */
 
-#endif /* CONFIG_MPC8560 */
+#endif /* CONFIG_CPM2 */
diff -Nur --exclude=CVS u-boot/cpu/mpc85xx/serial_scc.c u-boot-pq3/cpu/mpc85xx/serial_scc.c
--- u-boot/cpu/mpc85xx/serial_scc.c	2003-10-15 18:53:51.000000000 -0500
+++ u-boot-pq3/cpu/mpc85xx/serial_scc.c	2004-12-03 15:20:46.000000000 -0600
@@ -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 @@
 
 #endif	/* CONFIG_CONS_ON_SCC */
 
-#endif /* CONFIG_MPC8560 */
+#endif /* CONFIG_CPM2 */
diff -Nur --exclude=CVS u-boot/cpu/mpc85xx/speed.c u-boot-pq3/cpu/mpc85xx/speed.c
--- u-boot/cpu/mpc85xx/speed.c	2004-08-01 17:48:20.000000000 -0500
+++ u-boot-pq3/cpu/mpc85xx/speed.c	2004-12-03 15:20:46.000000000 -0600
@@ -82,7 +82,7 @@
 {
 	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 @@
 	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 -Nur --exclude=CVS u-boot/doc/README.mpc85xxads u-boot-pq3/doc/README.mpc85xxads
--- u-boot/doc/README.mpc85xxads	2004-10-10 16:21:57.000000000 -0500
+++ u-boot-pq3/doc/README.mpc85xxads	2004-12-03 16:31:35.000000000 -0600
@@ -134,7 +134,6 @@
     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 -Nur --exclude=CVS u-boot/include/asm-ppc/global_data.h u-boot-pq3/include/asm-ppc/global_data.h
--- u-boot/include/asm-ppc/global_data.h	2004-10-27 19:09:39.000000000 -0500
+++ u-boot-pq3/include/asm-ppc/global_data.h	2005-02-01 13:17:13.000000000 -0600
@@ -39,7 +39,7 @@
 	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 @@
 	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 -Nur --exclude=CVS u-boot/include/asm-ppc/immap_85xx.h u-boot-pq3/include/asm-ppc/immap_85xx.h
--- u-boot/include/asm-ppc/immap_85xx.h	2004-10-10 16:21:57.000000000 -0500
+++ u-boot-pq3/include/asm-ppc/immap_85xx.h	2004-12-03 15:20:48.000000000 -0600
@@ -1023,9 +1023,7 @@
 } 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 -Nur --exclude=CVS u-boot/include/asm-ppc/u-boot.h u-boot-pq3/include/asm-ppc/u-boot.h
--- u-boot/include/asm-ppc/u-boot.h	2004-12-31 03:32:53.000000000 -0600
+++ u-boot-pq3/include/asm-ppc/u-boot.h	2005-02-01 13:17:13.000000000 -0600
@@ -59,7 +59,7 @@
 	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 -Nur --exclude=CVS u-boot/include/configs/MPC8541CDS.h u-boot-pq3/include/configs/MPC8541CDS.h
--- u-boot/include/configs/MPC8541CDS.h	2005-02-02 15:58:50.000000000 -0600
+++ u-boot-pq3/include/configs/MPC8541CDS.h	2005-02-01 13:17:15.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/configs/MPC8555CDS.h u-boot-pq3/include/configs/MPC8555CDS.h
--- u-boot/include/configs/MPC8555CDS.h	2005-02-02 15:58:50.000000000 -0600
+++ u-boot-pq3/include/configs/MPC8555CDS.h	2005-02-01 13:17:15.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/configs/MPC8560ADS.h u-boot-pq3/include/configs/MPC8560ADS.h
--- u-boot/include/configs/MPC8560ADS.h	2005-01-09 11:12:34.000000000 -0600
+++ u-boot-pq3/include/configs/MPC8560ADS.h	2005-02-01 13:17:15.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/configs/SBC8540.h u-boot-pq3/include/configs/SBC8540.h
--- u-boot/include/configs/SBC8540.h	2005-02-02 15:58:50.000000000 -0600
+++ u-boot-pq3/include/configs/SBC8540.h	2005-02-01 13:17:15.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/configs/sbc8560.h u-boot-pq3/include/configs/sbc8560.h
--- u-boot/include/configs/sbc8560.h	2005-02-02 15:58:51.000000000 -0600
+++ u-boot-pq3/include/configs/sbc8560.h	2005-02-01 13:17:16.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/configs/SBC8560.h u-boot-pq3/include/configs/SBC8560.h
--- u-boot/include/configs/SBC8560.h	2005-02-02 15:58:51.000000000 -0600
+++ u-boot-pq3/include/configs/SBC8560.h	2005-02-01 13:17:15.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/configs/stxgp3.h u-boot-pq3/include/configs/stxgp3.h
--- u-boot/include/configs/stxgp3.h	2005-02-02 15:58:51.000000000 -0600
+++ u-boot-pq3/include/configs/stxgp3.h	2005-02-01 13:17:16.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/include/ioports.h u-boot-pq3/include/ioports.h
--- u-boot/include/ioports.h	2003-10-15 18:53:55.000000000 -0500
+++ u-boot-pq3/include/ioports.h	2004-12-03 15:20:47.000000000 -0600
@@ -25,7 +25,7 @@
  * 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 -Nur --exclude=CVS u-boot/include/net.h u-boot-pq3/include/net.h
--- u-boot/include/net.h	2004-10-09 16:56:21.000000000 -0500
+++ u-boot-pq3/include/net.h	2004-12-03 15:20:47.000000000 -0600
@@ -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 -Nur --exclude=CVS u-boot/lib_ppc/board.c u-boot-pq3/lib_ppc/board.c
--- u-boot/lib_ppc/board.c	2004-12-31 03:32:54.000000000 -0600
+++ u-boot-pq3/lib_ppc/board.c	2005-02-01 13:17:25.000000000 -0600
@@ -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_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 @@
 	/* 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 @@
 	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;






More information about the U-Boot mailing list