Skip to contentSkip to conversation

ppc: Clean up calling of misc_init_r() during init

PATCH New Peter Tyser 3 participants 5 messages Sep 17, 2009 – Sep 22, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ppc: Clean up calling of misc_init_r() during init

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

---
 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(-)
include/configs/CCM.h +1 -0
index d1c293f..8a94420 100644
@@ -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
include/configs/CPCI405.h +1 -0
index fca6de0..d131aea 100644
@@ -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	*/
 
include/configs/CPCI4052.h +1 -0
index fd04566..07c4e35 100644
@@ -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	*/
 
include/configs/CPCI405AB.h +1 -0
index d718ed4..c78552b 100644
@@ -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	*/
 
include/configs/CPCI405DT.h +1 -0
index 09df470..59e0778 100644
@@ -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	*/
 
include/configs/W7OLMC.h +1 -0
index 40e4735..c017915 100644
@@ -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	*/
 
include/configs/W7OLMG.h +1 -0
index a62f1b4..1d4ad13 100644
@@ -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	*/
 
include/configs/cogent_mpc8260.h +1 -0
index c580230..566565a 100644
@@ -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	*/
include/configs/cogent_mpc8xx.h +1 -0
index 17bd9a0..750c0df 100644
@@ -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 */
include/configs/lwmon.h +3 -2
index 8f00773..be20d72 100644
@@ -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	*/
include/configs/pcu_e.h +2 -0
index 6517381..11ad9ca 100644
@@ -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
include/configs/sc3.h +1 -0
index 7e00ab8..5763760 100644
@@ -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
lib_ppc/board.c +1 -11
index e8509ee..c6fb6fe 100644
@@ -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
Signature · 1 line
1.6.2.1
#1 lore raw

PATCH 2/2 ppc: Clean up calling of phy_reset() during init

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

---
 include/configs/CCM.h        |    1 +
 include/configs/ELPT860.h    |    1 +
 include/configs/IP860.h      |    1 +
 include/configs/IVML24.h     |    2 ++
 include/configs/IVMS8.h      |    2 ++
 include/configs/MPC8260ADS.h |    1 +
 include/configs/MPC8266ADS.h |    1 +
 include/configs/MPC8560ADS.h |    1 +
 include/configs/RPXsuper.h   |    1 +
 include/configs/SBC8540.h    |    1 +
 include/configs/SPD823TS.h   |    2 ++
 include/configs/pcu_e.h      |    1 +
 include/configs/sbc8560.h    |    1 +
 include/configs/stxgp3.h     |    1 +
 lib_ppc/board.c              |   17 +----------------
 15 files changed, 18 insertions(+), 16 deletions(-)
include/configs/CCM.h +1 -0
index 8a94420..3f4a2c1 100644
@@ -38,6 +38,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_RESET_PHY_R	1   /* Call reset_phy() */
 
 #define CONFIG_8xx_CONS_SMC1    1   /* Console is on SMC1       */
 #undef  CONFIG_8xx_CONS_SMC2
include/configs/ELPT860.h +1 -0
index ff58ea9..0f56302 100644
@@ -57,6 +57,7 @@
 #define CONFIG_BOOTDELAY	5	/* autoboot after 5 seconds	*/
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 /* BOOT arguments */
 #define CONFIG_PREBOOT							   \
include/configs/IP860.h +1 -0
index 125aa6c..be63ea5 100644
@@ -36,6 +36,7 @@
 #define CONFIG_MPC860		1	/* This is a MPC860 CPU		*/
 #define CONFIG_IP860		1	/* ...on a IP860 board		*/
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 #define	CONFIG_8xx_CONS_SMC1	1	/* Console is on SMC1		*/
 #define CONFIG_BAUDRATE		9600
include/configs/IVML24.h +2 -0
index cd100df..1a4924e 100644
@@ -52,6 +52,8 @@
 #define	CONFIG_CLOCKS_IN_MHZ	1	/* clocks passsed to Linux in MHz */
 #define CONFIG_8xx_GCLK_FREQ    50331648
 
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
+
 #define	CONFIG_SHOW_BOOT_PROGRESS 1	/* Show boot progress on LEDs	*/
 
 #if 0
include/configs/IVMS8.h +2 -0
index 125cb4b..256cabd 100644
@@ -49,6 +49,8 @@
 #undef	CONFIG_8xx_CONS_NONE
 #define CONFIG_BAUDRATE		115200
 
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
+
 #define	CONFIG_CLOCKS_IN_MHZ	1	/* clocks passsed to Linux in MHz */
 #define CONFIG_8xx_GCLK_FREQ    50331648
 
include/configs/MPC8260ADS.h +1 -0
index 942a4cc..52dd4e7 100644
@@ -81,6 +81,7 @@
 #endif /* CONFIG_ADSTYPE == CONFIG_SYS_8272ADS */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 /* allow serial and ethaddr to be overwritten */
 #define CONFIG_ENV_OVERWRITE
include/configs/MPC8266ADS.h +1 -0
index 4fd86d3..b0162c3 100644
@@ -54,6 +54,7 @@
 #define CONFIG_CPM2		1	/* Has a CPM2 */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 /* allow serial and ethaddr to be overwritten */
 #define CONFIG_ENV_OVERWRITE
include/configs/MPC8560ADS.h +1 -0
index c1a1a6d..8ddce5c 100644
@@ -48,6 +48,7 @@
 #undef CONFIG_ETHER_ON_FCC             /* cpm FCC ethernet support */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_FSL_LAW		1	/* Use common FSL init code */
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy() */
 
 /*
  * sysclk for MPC85xx
include/configs/RPXsuper.h +1 -0
index e97ef95..da962f3 100644
@@ -189,6 +189,7 @@
 #define CONFIG_CPM2		1	/* Has a CPM2 */
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 /*
  * Miscellaneous configurable options
include/configs/SBC8540.h +1 -0
index 7239f84..272b5dd 100644
@@ -77,6 +77,7 @@
 #undef	CONFIG_BTB			    /* toggle branch predition	*/
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	    /* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	    /* Call reset_phy() */
 
 #undef	CONFIG_SYS_DRAM_TEST			    /* memory test, takes time	*/
 #define CONFIG_SYS_MEMTEST_START	0x00200000  /* memtest region */
include/configs/SPD823TS.h +2 -0
index 4181a40..fa77882 100644
@@ -36,6 +36,8 @@
 #define CONFIG_MPC823		1	/* This is a MPC823 CPU		*/
 #define CONFIG_SPD823TS		1	/* ...on a SPD823TS board	*/
 
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
+
 #define CONFIG_8xx_CONS_SMC1	1	/* Console is on SMC1		*/
 #undef	CONFIG_8xx_CONS_SMC2
 #undef	CONFIG_8xx_CONS_NONE
include/configs/pcu_e.h +1 -0
index 11ad9ca..3aee206 100644
@@ -43,6 +43,7 @@
 #define CONFIG_PCU_E		1	/* ...on a PCU E board		*/
 
 #define CONFIG_MISC_INIT_R	1	/* Call misc_init_r()		*/
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 #define	CONFIG_8xx_CONS_SMC1	1	/* Console is on SMC1		*/
 
include/configs/sbc8560.h +1 -0
index 4fa501d..46c94bf 100644
@@ -71,6 +71,7 @@
 #undef	CONFIG_BTB			    /* toggle branch predition	*/
 
 #define CONFIG_BOARD_EARLY_INIT_F 1	    /* Call board_early_init_f	*/
+#define CONFIG_RESET_PHY_R	1	    /* Call reset_phy()		*/
 
 #undef	CONFIG_SYS_DRAM_TEST			    /* memory test, takes time	*/
 #define CONFIG_SYS_MEMTEST_START	0x00200000  /* memtest region */
include/configs/stxgp3.h +1 -0
index 0424e29..86b231c 100644
@@ -66,6 +66,7 @@
 #define  CONFIG_BTB                          /* toggle branch predition */
 
 #define CONFIG_BOARD_EARLY_INIT_F   1        /* Call board_pre_init      */
+#define CONFIG_RESET_PHY_R	1	/* Call reset_phy()		*/
 
 #undef  CONFIG_SYS_DRAM_TEST                       /* memory test, takes time  */
 #define CONFIG_SYS_MEMTEST_START       0x00200000  /* memtest region */
lib_ppc/board.c +1 -16
index c6fb6fe..f9dbdb9 100644
@@ -1000,22 +1000,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	eth_initialize (bd);
 #endif
 
-#if defined(CONFIG_CMD_NET) && ( \
-    defined(CONFIG_CCM)		|| \
-    defined(CONFIG_ELPT860)	|| \
-    defined(CONFIG_EP8260)	|| \
-    defined(CONFIG_IP860)	|| \
-    defined(CONFIG_IVML24)	|| \
-    defined(CONFIG_IVMS8)	|| \
-    defined(CONFIG_MPC8260ADS)	|| \
-    defined(CONFIG_MPC8266ADS)	|| \
-    defined(CONFIG_MPC8560ADS)	|| \
-    defined(CONFIG_PCU_E)	|| \
-    defined(CONFIG_RPXSUPER)	|| \
-    defined(CONFIG_STXGP3)	|| \
-    defined(CONFIG_SPD823TS)	|| \
-    defined(CONFIG_RESET_PHY_R)	)
-
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
 	WATCHDOG_RESET ();
 	debug ("Reset Ethernet PHY\n");
 	reset_phy ();
Signature · 1 line
1.6.2.1
#2 lore raw

PATCH 2/2 ppc: Clean up calling of phy_reset() during init

Dear Peter Tyser,

Quoted 13 lines · In message <[email protected]> you wrote:

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

---
 include/configs/CCM.h        |    1 +
 include/configs/ELPT860.h    |    1 +
 include/configs/IP860.h      |    1 +
 include/configs/IVML24.h     |    2 ++
 include/configs/IVMS8.h      |    2 ++
 include/configs/MPC8260ADS.h |    1 +
 include/configs/MPC8266ADS.h |    1 +
 include/configs/MPC8560ADS.h |    1 +
Quoted 9 lines
 include/configs/RPXsuper.h   |    1 +
 include/configs/SBC8540.h    |    1 +
 include/configs/SPD823TS.h   |    2 ++
 include/configs/pcu_e.h      |    1 +
 include/configs/sbc8560.h    |    1 +
 include/configs/stxgp3.h     |    1 +
 lib_ppc/board.c              |   17 +----------------
 15 files changed, 18 insertions(+), 16 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It takes all sorts of in & out-door schooling to get adapted  to  my
kind of fooling"                                           - R. Frost
#3 lore raw

PATCH 1/2 ppc: Clean up calling of misc_init_r() during init

In reply to Peter Tyser

Hello Peter,

Quoted 4 lines · Peter Tyser

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

Quoted 15 lines
---
 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(-)

for the sc3 board, Thanks!

bye
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#4 lore raw

PATCH 1/2 ppc: Clean up calling of misc_init_r() during init

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:

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

Quoted 15 lines
---
 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(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
THIS IS A 100% MATTER  PRODUCT:  In  the  Unlikely  Event  That  This
Merchandise  Should  Contact  Antimatter  in Any Form, a Catastrophic
Explosion Will Result.