[U-Boot-Users] [PATCH 1/6] General modification to support mpc8360epb

Jiang Bo-r61859 tanya.jiang at freescale.com
Thu Aug 17 08:30:03 CEST 2006


Subject: [PATCH] General modification to support mpc8360epb

---

 CHANGELOG                     |    2 ++
 MAKEALL                       |    2 +-
 Makefile                      |   31 ++++++++++++++++++++++++++++
 README                        |   45
++++++++++++++++++++++-------------------
 include/asm-ppc/e300.h        |    2 ++
 include/asm-ppc/global_data.h |   14 +++++++++++--
 include/asm-ppc/i2c.h         |    8 ++++---
 include/asm-ppc/u-boot.h      |    4 ++++
 include/common.h              |    5 +++++
 lib_ppc/board.c               |    4 ++++
 10 files changed, 89 insertions(+), 28 deletions(-)

d1bd8dc6d94dcb6e70992467a2e74de4f321ef56
diff --git a/CHANGELOG b/CHANGELOG
index 24499c5..d2a9643 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 ======================================================================
 Changes since U-Boot 1.1.4:
 ======================================================================
+* Add support for Freescale MPC8360EPB board.
+  Patch by Dave Liu and Tanya Jiang, Aug 17 2006
 
 * Fix control-c handing in CONFIG_CMDLINE_EDITING
   Properly pass break code back from readline.
diff --git a/MAKEALL b/MAKEALL
index 467a9be..25e0399 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -119,7 +119,7 @@ ## MPC83xx Systems (includes 8349, etc.)
 
########################################################################
#
 
 LIST_83xx="	\
-	TQM834x		MPC8349EMDS
\
+	TQM834x		MPC8349EMDS	MPC8360EPB
\
 "
 
 
diff --git a/Makefile b/Makefile
index 128ae59..c65bb4b 100644
--- a/Makefile
+++ b/Makefile
@@ -139,6 +139,10 @@ LIBS += drivers/sk98lin/libsk98lin.a
 LIBS += post/libpost.a post/cpu/libcpu.a
 LIBS += common/libcommon.a
 LIBS += $(BOARDLIBS)
+ifeq ($(BOARD),mpc8360epb)
+LIBS += drivers/sysdev/qe_lib/ucc/libucc.a
+LIBS += drivers/sysdev/qe_lib/libqe.a
+endif
 .PHONY : $(LIBS)
 
 # Add GCC lib
@@ -1377,6 +1381,33 @@ TQM834x_config:	unconfig
 MPC8349EMDS_config:	unconfig
 	@./mkconfig $(@:_config=) ppc mpc83xx mpc8349emds
 
+#######################################################################
#
+## MPC8360 Systems
+#######################################################################
##
+MPC8360EPB_config \
+MPC8360EPB_HOST_33_config \
+MPC8360EPB_HOST_66_config \
+MPC8360EPB_SLAVE_config:	unconfig
+	@echo "" >include/config.h ; \
+	if [ "$(findstring _HOST_,$@)" ] ; then \
+		echo -n "... PCI HOST " ; \
+		echo "#define CONFIG_PCI" >>include/config.h ; \
+	fi ; \
+	if [ "$(findstring _SLAVE_,$@)" ] ; then \
+		echo "...PCI SLAVE 66M"  ; \
+		echo "#define CONFIG_PCI" >>include/config.h ; \
+		echo "#define CONFIG_PCISLAVE" >>include/config.h ; \
+	fi ; \
+	if [ "$(findstring _33_,$@)" ] ; then \
+		echo -n "...33M ..." ; \
+		echo "#define PCI_33M" >>include/config.h ; \
+	fi ; \
+	if [ "$(findstring _66_,$@)" ] ; then \
+		echo -n "...66M..." ; \
+		echo "#define PCI_66M" >>include/config.h ; \
+	fi ;
+	@./mkconfig -a MPC8360EPB ppc mpc83xx mpc8360epb
+
 
########################################################################
#
 ## MPC85xx Systems
 
########################################################################
#
diff --git a/README b/README
index e772c1a..dff3f31 100644
--- a/README
+++ b/README
@@ -142,6 +142,7 @@ Directory Hierarchy:
   - mpc8220	Files specific to Freescale MPC8220 CPUs
   - mpc824x	Files specific to Freescale MPC824x CPUs
   - mpc8260	Files specific to Freescale MPC8260 CPUs
+  - mpc83xx	Files specific to Freescale MPC83xx CPUs
   - mpc85xx	Files specific to Freescale MPC85xx CPUs
   - nios	Files specific to Altera NIOS CPUs
   - nios2	Files specific to Altera Nios-II CPUs
@@ -233,6 +234,7 @@ The following options need to be configu
 	or	CONFIG_MPC5xx
 	or	CONFIG_MPC8220
 	or	CONFIG_MPC824X, CONFIG_MPC8260
+	or	CONFIG_MPC83XX
 	or	CONFIG_MPC85xx
 	or	CONFIG_IOP480
 	or	CONFIG_405GP
@@ -289,17 +291,18 @@ The following options need to be configu
 		CONFIG_DUET_ADS		CONFIG_MIP405
CONFIG_SXNI855T
 		CONFIG_EBONY		CONFIG_MOUSSE
CONFIG_TQM823L
 		CONFIG_ELPPC		CONFIG_MPC8260ADS
CONFIG_TQM8260
-		CONFIG_ELPT860		CONFIG_MPC8540ADS
CONFIG_TQM850L
-		CONFIG_ep8260		CONFIG_MPC8540EVAL
CONFIG_TQM855L
-		CONFIG_ERIC		CONFIG_MPC8560ADS
CONFIG_TQM860L
-		CONFIG_ESTEEM192E	CONFIG_MUSENKI
CONFIG_TTTech
-		CONFIG_ETX094		CONFIG_MVS1
CONFIG_UTX8245
-		CONFIG_EVB64260		CONFIG_NETPHONE
CONFIG_V37
-		CONFIG_FADS823		CONFIG_NETTA
CONFIG_W7OLMC
-		CONFIG_FADS850SAR	CONFIG_NETVIA
CONFIG_W7OLMG
-		CONFIG_FADS860T		CONFIG_NX823
CONFIG_WALNUT
-		CONFIG_FLAGADM		CONFIG_OCRTC
CONFIG_ZPC1900
-		CONFIG_FPS850L		CONFIG_ORSG
CONFIG_ZUMA
+		CONFIG_ELPT860		CONFIG_MPC8360EPB
CONFIG_TQM850L
+		CONFIG_ep8260		CONFIG_MPC8540ADS
CONFIG_TQM855L
+		CONFIG_ERIC		CONFIG_MPC8540EVAL
CONFIG_TQM860L
+		CONFIG_ESTEEM192E	CONFIG_MPC8560ADS
CONFIG_TTTech
+		CONFIG_ETX094		CONFIG_MUSENKI
CONFIG_UTX8245
+		CONFIG_EVB64260		CONFIG_MVS1
CONFIG_V37
+		CONFIG_FADS823		CONFIG_NETPHONE
CONFIG_W7OLMC
+		CONFIG_FADS850SAR	CONFIG_NETTA
CONFIG_W7OLMG
+		CONFIG_FADS860T		CONFIG_NETVIA
CONFIG_WALNUT
+		CONFIG_FLAGADM		CONFIG_NX823
CONFIG_ZPC1900
+		CONFIG_FPS850L		CONFIG_OCRTC
CONFIG_ZUMA
+					CONFIG_ORSG
 
 		ARM based boards:
 		-----------------
@@ -2290,16 +2293,16 @@ configurations; the following names are 
 	CU824_config		MBX860T_config
sbc8560_33_config
 	DUET_ADS_config		MBX_config
sbc8560_66_config
 	EBONY_config		MPC8260ADS_config	SM850_config
-	ELPT860_config		MPC8540ADS_config	SPD823TS_config
-	ESTEEM192E_config	MPC8540EVAL_config	stxgp3_config
-	ETX094_config		MPC8560ADS_config	SXNI855T_config
-	FADS823_config		NETVIA_config		TQM823L_config
-	FADS850SAR_config	omap1510inn_config	TQM850L_config
-	FADS860T_config		omap1610h2_config	TQM855L_config
-	FPS850L_config		omap1610inn_config	TQM860L_config
-				omap5912osk_config	walnut_config
-				omap2420h4_config	Yukon8220_config
-							ZPC1900_config
+	ELPT860_config		MPC8360EPB_config	SPD823TS_config
+	ESTEEM192E_config	MPC8540ADS_config	stxgp3_config
+	ETX094_config		MPC8540EVAL_config	SXNI855T_config
+	FADS823_config		MPC8560ADS_config	TQM823L_config
+	FADS850SAR_config	NETVIA_config		TQM850L_config
+	FADS860T_config		omap1510inn_config	TQM855L_config
+	FPS850L_config		omap1610h2_config	TQM860L_config
+				omap1610inn_config	walnut_config
+				omap5912osk_config	Yukon8220_config
+				omap2420h4_config	ZPC1900_config
 
 Note: for some board special configuration names may exist; check if
       additional information is available from the board vendor; for
diff --git a/include/asm-ppc/e300.h b/include/asm-ppc/e300.h
index 908007c..79dcae4 100644
--- a/include/asm-ppc/e300.h
+++ b/include/asm-ppc/e300.h
@@ -12,6 +12,8 @@ #define __E300_H__
 #define PVR_83xx 0x80830000
 #define PVR_8349_REV10 (PVR_83xx | 0x0010)
 #define PVR_8349_REV11 (PVR_83xx | 0x0011)
+#define PVR_8360_REV10 (PVR_83xx | 0x0020)
+#define PVR_8360_REV11 (PVR_83xx | 0x0020)
 
 /*
  * Hardware Implementation-Dependent Register 0 (HID0)
diff --git a/include/asm-ppc/global_data.h
b/include/asm-ppc/global_data.h
index b73af96..418315b 100644
--- a/include/asm-ppc/global_data.h
+++ b/include/asm-ppc/global_data.h
@@ -52,17 +52,27 @@ #endif
 #if defined(CONFIG_MPC83XX)
 	/* There are other clocks in the MPC83XX */
 	u32 csb_clk;
+#if defined (CONFIG_MPC8349)
 	u32 tsec1_clk;
 	u32 tsec2_clk;
-	u32 core_clk;
 	u32 usbmph_clk;
 	u32 usbdr_clk;
-	u32 i2c_clk;
+#endif /* CONFIG_MPC8349 */
+	u32 core_clk;
+	u32 i2c1_clk;
+	u32 i2c2_clk;
 	u32 enc_clk;
 	u32 lbiu_clk;
 	u32 lclk_clk;
 	u32 ddr_clk;
 	u32 pci_clk;
+#if defined(CONFIG_QE)
+	u32 qe_clk;
+	u32 brg_clk;
+#endif /* CONFIG_QE */
+#if defined (CONFIG_MPC8360)
+	u32  ddr_sec_clk;
+#endif /* CONFIG_MPC8360 */
 #endif
 #if defined(CONFIG_MPC5xxx)
 	unsigned long	ipb_clk;
diff --git a/include/asm-ppc/i2c.h b/include/asm-ppc/i2c.h
index 1680d3a..1c2e7e5 100644
--- a/include/asm-ppc/i2c.h
+++ b/include/asm-ppc/i2c.h
@@ -87,12 +87,12 @@ #ifndef CFG_I2C_OFFSET
 #error CFG_I2C_OFFSET is not defined in /include/configs/${BOARD}.h
 #endif
 
-#if defined(CONFIG_MPC8349EMDS) || defined(CONFIG_TQM834X)
+#if defined(CONFIG_MPC8349EMDS) || defined(CONFIG_TQM834X) ||
defined(CONFIG_MPC8360EPB)
 /*
- * MPC8349 have two i2c bus
+ * MPC8349 and MPC8360 have two i2c bus
  */
-extern i2c_t * mpc8349_i2c;
-#define I2C mpc8349_i2c
+extern i2c_t * mpc83xx_i2c;
+#define I2C mpc83xx_i2c
 #else
 #define I2C ((i2c_t*)(CFG_IMMRBAR + CFG_I2C_OFFSET))
 #endif
diff --git a/include/asm-ppc/u-boot.h b/include/asm-ppc/u-boot.h
index f7aa55f..6c5481b 100644
--- a/include/asm-ppc/u-boot.h
+++ b/include/asm-ppc/u-boot.h
@@ -74,6 +74,10 @@ #if defined(CONFIG_CPM2)
 	unsigned long	bi_sccfreq;	/* SCC_CLK Freq, in MHz */
 	unsigned long	bi_vco;		/* VCO Out from PLL, in MHz */
 #endif
+#if defined(CONFIG_QE)
+	unsigned long   bi_qefreq;      /* QE_CLK Freq, in MHz */
+	unsigned long   bi_brgfreq;     /* BRG_CLK Freq, in MHz */
+#endif
 #if defined(CONFIG_MPC5xxx)
 	unsigned long	bi_ipbfreq;	/* IPB Bus Freq, in MHz */
 	unsigned long	bi_pcifreq;	/* PCI Bus Freq, in MHz */
diff --git a/include/common.h b/include/common.h
index bd41ae1..794f065 100644
--- a/include/common.h
+++ b/include/common.h
@@ -386,6 +386,11 @@ void		ppcDcbi(unsigned long value);
 void		ppcSync(void);
 void		ppcDcbz(unsigned long value);
 #endif
+#if defined (CONFIG_MPC83XX)
+void		ppcDcbst(unsigned long value);
+void		ppcDWstore(unsigned int *address, unsigned int *value);
+void		ppcDWload(unsigned int *address, unsigned int *ret);
+#endif
 
 /* $(CPU)/cpu.c */
 int	checkcpu      (void);
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index db80f77..87e48b3 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -545,6 +545,10 @@ #if defined(CONFIG_CPM2)
 	bd->bi_sccfreq = gd->scc_clk;
 	bd->bi_vco     = gd->vco_out;
 #endif /* CONFIG_CPM2 */
+#if defined(CONFIG_QE)
+	bd->bi_qefreq = gd->qe_clk;
+	bd->bi_brgfreq = gd->brg_clk;
+#endif /* CONFIG_QE */
 #if defined(CONFIG_MPC5xxx)
 	bd->bi_ipbfreq = gd->ipb_clk;
 	bd->bi_pcifreq = gd->pci_clk;
-- 
1.3.GIT




More information about the U-Boot mailing list