[U-Boot] [PATCH 1/2] ppc: Clean up calling of misc_init_r() during init

Peter Tyser ptyser at xes-inc.com
Thu Sep 17 05:03:07 CEST 2009


Remove board-specific #ifdefs for calling misc_init_r() during
initializtion

Signed-off-by: Peter Tyser <ptyser at xes-inc.com>
---
 include/configs/CCM.h            |    1 +
 include/configs/CPCI405.h        |    1 +
 include/configs/CPCI4052.h       |    1 +
 include/configs/CPCI405AB.h      |    1 +
 include/configs/CPCI405DT.h      |    1 +
 include/configs/W7OLMC.h         |    1 +
 include/configs/W7OLMG.h         |    1 +
 include/configs/cogent_mpc8260.h |    1 +
 include/configs/cogent_mpc8xx.h  |    1 +
 include/configs/lwmon.h          |    5 +++--
 include/configs/pcu_e.h          |    2 ++
 include/configs/sc3.h            |    1 +
 lib_ppc/board.c                  |   12 +-----------
 13 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/include/configs/CCM.h b/include/configs/CCM.h
index d1c293f..8a94420 100644
--- a/include/configs/CCM.h
+++ b/include/configs/CCM.h
@@ -37,6 +37,7 @@
 
 #define CONFIG_MPC860           1   /* This is a MPC860 CPU ... */
 #define CONFIG_CCM              1   /* on a Card Controller Module  */
+#define CONFIG_MISC_INIT_R	    /* Call misc_init_r() */
 
 #define CONFIG_8xx_CONS_SMC1    1   /* Console is on SMC1       */
 #undef  CONFIG_8xx_CONS_SMC2
diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h
index fca6de0..d131aea 100644
--- a/include/configs/CPCI405.h
+++ b/include/configs/CPCI405.h
@@ -38,6 +38,7 @@
 #define CONFIG_CPCI405		1	/* ...on a CPCI405 board	*/
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
+#define CONFIG_MISC_INIT_R	 1	/* call misc_init_r()		*/
 
 #define CONFIG_SYS_CLK_FREQ	33000000 /* external frequency to pll	*/
 
diff --git a/include/configs/CPCI4052.h b/include/configs/CPCI4052.h
index fd04566..07c4e35 100644
--- a/include/configs/CPCI4052.h
+++ b/include/configs/CPCI4052.h
@@ -40,6 +40,7 @@
 #undef  CONFIG_CPCI405_6U               /* enable this for 6U boards    */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
+#define CONFIG_MISC_INIT_R	 1	/* call misc_init_r()		*/
 
 #define CONFIG_SYS_CLK_FREQ	33330000 /* external frequency to pll	*/
 
diff --git a/include/configs/CPCI405AB.h b/include/configs/CPCI405AB.h
index d718ed4..c78552b 100644
--- a/include/configs/CPCI405AB.h
+++ b/include/configs/CPCI405AB.h
@@ -40,6 +40,7 @@
 #define CONFIG_CPCI405AB	1	/* ...and special AB version	*/
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
+#define CONFIG_MISC_INIT_R	 1	/* call misc_init_r()		*/
 
 #define CONFIG_SYS_CLK_FREQ	33330000 /* external frequency to pll	*/
 
diff --git a/include/configs/CPCI405DT.h b/include/configs/CPCI405DT.h
index 09df470..59e0778 100644
--- a/include/configs/CPCI405DT.h
+++ b/include/configs/CPCI405DT.h
@@ -39,6 +39,7 @@
 #define CONFIG_CPCI405_VER2	1	/* ...version 2			*/
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* call board_early_init_f()	*/
+#define CONFIG_MISC_INIT_R	 1	/* call misc_init_r()		*/
 
 #define CONFIG_SYS_CLK_FREQ	33330000 /* external frequency to pll	*/
 
diff --git a/include/configs/W7OLMC.h b/include/configs/W7OLMC.h
index 40e4735..c017915 100644
--- a/include/configs/W7OLMC.h
+++ b/include/configs/W7OLMC.h
@@ -40,6 +40,7 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F 1		/* Call board_early_init_f	*/
 #define	CONFIG_MISC_INIT_F	1		/* and misc_init_f()		*/
+#define	CONFIG_MISC_INIT_R	1		/* and misc_init_r()		*/
 
 #define CONFIG_SYS_CLK_FREQ	33333333	/* external frequency to pll	*/
 
diff --git a/include/configs/W7OLMG.h b/include/configs/W7OLMG.h
index a62f1b4..1d4ad13 100644
--- a/include/configs/W7OLMG.h
+++ b/include/configs/W7OLMG.h
@@ -40,6 +40,7 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F 1		/* Call board_early_init_f	*/
 #define	CONFIG_MISC_INIT_F	1		/* and misc_init_f()		*/
+#define	CONFIG_MISC_INIT_R	1		/* and misc_init_r()		*/
 
 #define CONFIG_SYS_CLK_FREQ	33333333	/* external frequency to pll	*/
 
diff --git a/include/configs/cogent_mpc8260.h b/include/configs/cogent_mpc8260.h
index c580230..566565a 100644
--- a/include/configs/cogent_mpc8260.h
+++ b/include/configs/cogent_mpc8260.h
@@ -38,6 +38,7 @@
 #define CONFIG_CPM2		1	/* Has a CPM2 */
 
 #define	CONFIG_MISC_INIT_F	1	/* Use misc_init_f()		*/
+#define	CONFIG_MISC_INIT_R		/* Use misc_init_r()		*/
 
 /* Cogent Modular Architecture options */
 #define CONFIG_CMA282		1	/* ...on a CMA282 CPU module	*/
diff --git a/include/configs/cogent_mpc8xx.h b/include/configs/cogent_mpc8xx.h
index 17bd9a0..750c0df 100644
--- a/include/configs/cogent_mpc8xx.h
+++ b/include/configs/cogent_mpc8xx.h
@@ -37,6 +37,7 @@
 #define CONFIG_COGENT		1	/* using Cogent Modular Architecture */
 
 #define	CONFIG_MISC_INIT_F	1	/* Use misc_init_f()		*/
+#define	CONFIG_MISC_INIT_R		/* Use misc_init_r()		*/
 
 /* Cogent Modular Architecture options */
 #define CONFIG_CMA286_60_OLD	1	/* ...on an old CMA286-60 CPU module */
diff --git a/include/configs/lwmon.h b/include/configs/lwmon.h
index 8f00773..be20d72 100644
--- a/include/configs/lwmon.h
+++ b/include/configs/lwmon.h
@@ -47,8 +47,9 @@
 #define CONFIG_OVERWRITE_ETHADDR_ONCE   1
 #endif
 
-#define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/
-#define CONFIG_BOARD_POSTCLK_INIT 1	/* Call board_postclk_init	*/
+#define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f()	*/
+#define CONFIG_BOARD_POSTCLK_INIT 1	/* Call board_postclk_init()	*/
+#define CONFIG_MISC_INIT_R	1	/* Call misc_init_r()		*/
 
 #define CONFIG_LCD		1	/* use LCD controller ...	*/
 #define CONFIG_HLD1045		1	/* ... with a HLD1045 display	*/
diff --git a/include/configs/pcu_e.h b/include/configs/pcu_e.h
index 6517381..11ad9ca 100644
--- a/include/configs/pcu_e.h
+++ b/include/configs/pcu_e.h
@@ -42,6 +42,8 @@
 #define CONFIG_MPC860T		1
 #define CONFIG_PCU_E		1	/* ...on a PCU E board		*/
 
+#define CONFIG_MISC_INIT_R	1	/* Call misc_init_r()		*/
+
 #define	CONFIG_8xx_CONS_SMC1	1	/* Console is on SMC1		*/
 
 #define CONFIG_BAUDRATE		9600
diff --git a/include/configs/sc3.h b/include/configs/sc3.h
index 7e00ab8..5763760 100644
--- a/include/configs/sc3.h
+++ b/include/configs/sc3.h
@@ -63,6 +63,7 @@
 #define CONFIG_405GP	1
 
 #define CONFIG_BOARD_EARLY_INIT_F	1
+#define CONFIG_MISC_INIT_R		1	/* Call misc_init_r() */
 
 /*
  * Define IDE_USES_ISA_EMULATION for slower IDE access in the ISA-IO address range
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index e8509ee..c6fb6fe 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -921,17 +921,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	/* Initialize the console (after the relocation and devices init) */
 	console_init_r ();
 
-#if defined(CONFIG_CCM)		|| \
-    defined(CONFIG_COGENT)	|| \
-    defined(CONFIG_CPCI405)	|| \
-    defined(CONFIG_EVB64260)	|| \
-    defined(CONFIG_KUP4K)	|| \
-    defined(CONFIG_KUP4X)	|| \
-    defined(CONFIG_LWMON)	|| \
-    defined(CONFIG_PCU_E)	|| \
-    defined(CONFIG_SC3)		|| \
-    defined(CONFIG_W7O)		|| \
-    defined(CONFIG_MISC_INIT_R)
+#if defined(CONFIG_MISC_INIT_R)
 	/* miscellaneous platform dependent initialisations */
 	misc_init_r ();
 #endif
-- 
1.6.2.1



More information about the U-Boot mailing list