Skip to contentSkip to conversation

4xx: Remove obsolete or unused functions from some esd boards

PATCH New Matthias Fuchs 2 participants 2 messages Sep 2, 2008 – Sep 3, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 4xx: Remove obsolete or unused functions from some esd boards

This patch removes initdram() and testdram() from most esd 405 platforms. Some boards also have an empty dummy implementation of misc_init_f(). This is also removed.

---
 board/esd/apc405/apc405.c       |   10 ----------
 board/esd/ash405/ash405.c       |   23 -----------------------
 board/esd/cms700/cms700.c       |   21 ---------------------
 board/esd/cpci2dp/cpci2dp.c     |   21 ---------------------
 board/esd/cpci405/cpci405.c     |   19 -------------------
 board/esd/cpciiser4/cpciiser4.c |   19 -------------------
 board/esd/dasa_sim/dasa_sim.c   |   20 --------------------
 board/esd/dp405/dp405.c         |   36 ------------------------------------
 board/esd/du405/du405.c         |   15 ---------------
 board/esd/hh405/hh405.c         |   17 -----------------
 board/esd/hub405/hub405.c       |   18 ------------------
 board/esd/ocrtc/ocrtc.c         |   32 --------------------------------
 board/esd/pmc405/pmc405.c       |   18 ------------------
 board/esd/voh405/voh405.c       |   36 ------------------------------------
 board/esd/wuh405/wuh405.c       |   21 ---------------------
 15 files changed, 0 insertions(+), 326 deletions(-)
board/esd/apc405/apc405.c +0 -10
index 83657c8..e629fd9 100644
@@ -423,16 +423,6 @@ int checkboard (void)
 	return 0;
 }
 
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
 #ifdef CONFIG_IDE_RESET
 void ide_set_reset(int on)
 {
board/esd/ash405/ash405.c +0 -23
index 25360a6..c3710ab 100644
@@ -82,15 +82,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-/* ------------------------------------------------------------------------- */
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	volatile unsigned char *duart0_mcr = (unsigned char *)((ulong)DUART0_BA + 4);
@@ -205,20 +196,6 @@ int checkboard (void)
 	return 0;
 }
 
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-/* ------------------------------------------------------------------------- */
-
 void reset_phy(void)
 {
 #ifdef CONFIG_LXT971_NO_SLEEP
board/esd/cms700/cms700.c +0 -21
index ba27c03..806c755 100644
@@ -77,15 +77,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-/* ------------------------------------------------------------------------- */
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	/* adjust flash start and offset */
@@ -141,18 +132,6 @@ int checkboard (void)
 
 /* ------------------------------------------------------------------------- */
 
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-/* ------------------------------------------------------------------------- */
-
 #if defined(CFG_EEPROM_WREN)
 /* Input: <dev_addr>  I2C address of EEPROM device to enable.
  *         <state>     -1: deliver current state
board/esd/cpci2dp/cpci2dp.c +0 -21
index 54de0b8..8bc40d5 100644
@@ -67,13 +67,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	unsigned long cntrl0Reg;
@@ -115,20 +108,6 @@ int checkboard (void)
 	return 0;
 }
 
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-/* ------------------------------------------------------------------------- */
-
 #if defined(CFG_EEPROM_WREN)
 /* Input: <dev_addr>  I2C address of EEPROM device to enable.
  *	   <state>     -1: deliver current state
board/esd/cpci405/cpci405.c +0 -19
index b856705..005871c 100644
@@ -255,11 +255,6 @@ int cpci405_version(void)
 	}
 }
 
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
 int misc_init_r (void)
 {
 	unsigned long cntrl0Reg;
@@ -493,18 +488,6 @@ int checkboard (void)
 	return 0;
 }
 
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
 void reset_phy(void)
 {
 #ifdef CONFIG_LXT971_NO_SLEEP
@@ -516,8 +499,6 @@ void reset_phy(void)
 #endif
 }
 
-/* ------------------------------------------------------------------------- */
-
 #ifdef CONFIG_CPCI405_VER2
 #ifdef CONFIG_IDE_RESET
 
board/esd/cpciiser4/cpciiser4.c +0 -19
index 204117e..b5d2543 100644
@@ -183,22 +183,3 @@ int checkboard (void)
 
 	return 0;
 }
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	return (16 * 1024 * 1024);
-}
-
-/* ------------------------------------------------------------------------- */
-
-int testdram (void)
-{
-	/* TODO: XXX XXX XXX */
-	printf ("test: 16 MB - ok\n");
-
-	return (0);
-}
-
-/* ------------------------------------------------------------------------- */
board/esd/dasa_sim/dasa_sim.c +0 -20
index fb0c77e..def0354 100644
@@ -202,23 +202,3 @@ int checkboard (void)
 
 	return 0;
 }
-
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	return (16 * 1024 * 1024);
-}
-
-/* ------------------------------------------------------------------------- */
-
-int testdram (void)
-{
-	/* TODO: XXX XXX XXX */
-	printf ("test: 16 MB - ok\n");
-
-	return (0);
-}
-
-/* ------------------------------------------------------------------------- */
board/esd/dp405/dp405.c +0 -36
index bb3baa4..eb001da 100644
@@ -74,15 +74,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-/* ------------------------------------------------------------------------- */
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	/* adjust flash start and offset */
@@ -119,30 +110,3 @@ int checkboard (void)
 
 	return 0;
 }
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-#if 0
-	printf("\nmb0cf=%x\n", val); /* test-only */
-	printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-/* ------------------------------------------------------------------------- */
-
-int testdram (void)
-{
-	/* TODO: XXX XXX XXX */
-	printf ("test: 16 MB - ok\n");
-
-	return (0);
-}
board/esd/du405/du405.c +0 -15
index 78ae4ba..8a87d55 100644
@@ -198,18 +198,3 @@ int checkboard (void)
 
 	return 0;
 }
-
-
-phys_size_t initdram (int board_type)
-{
-	return (16 * 1024 * 1024);
-}
-
-
-int testdram (void)
-{
-	/* TODO: XXX XXX XXX */
-	printf ("test: 16 MB - ok\n");
-
-	return (0);
-}
board/esd/hh405/hh405.c +0 -17
index 802491a..9fc41c8 100644
@@ -643,23 +643,6 @@ int checkboard (void)
 	return 0;
 }
 
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-#if 0
-	printf("\nmb0cf=%x\n", val); /* test-only */
-	printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-
 #ifdef CONFIG_IDE_RESET
 void ide_set_reset(int on)
 {
board/esd/hub405/hub405.c +0 -18
index 03b87c9..38a6f7a 100644
@@ -101,13 +101,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	volatile unsigned char *duart0_mcr = (unsigned char *)((ulong)DUART0_BA + 4);
@@ -227,14 +220,3 @@ int checkboard (void)
 
 	return 0;
 }
-
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
board/esd/ocrtc/ocrtc.c +0 -32
index 7b0edd5..35bfa95 100644
@@ -62,13 +62,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-int misc_init_f (void)
-{
-	return 0;					/* dummy implementation */
-}
-
-
 /*
  * Check Board Identity:
  */
@@ -99,28 +92,3 @@ int checkboard (void)
 
 	return (0);
 }
-
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr (memcfga, mem_mb0cf);
-	val = mfdcr (memcfgd);
-
-#if 0
-	printf ("\nmb0cf=%x\n", val);	/* test-only */
-	printf ("strap=%x\n", mfdcr (strap));	/* test-only */
-#endif
-
-	return (4 * 1024 * 1024 << ((val & 0x000e0000) >> 17));
-}
-
-
-int testdram (void)
-{
-	/* TODO: XXX XXX XXX */
-	printf ("test: 16 MB - ok\n");
-
-	return (0);
-}
board/esd/pmc405/pmc405.c +0 -18
index 326d560..90a212b 100644
@@ -156,24 +156,6 @@ int checkboard (void)
 }
 
 /* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-#if 0
-	printf("\nmb0cf=%x\n", val); /* test-only */
-	printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-
-/* ------------------------------------------------------------------------- */
 void reset_phy(void)
 {
 #ifdef CONFIG_LXT971_NO_SLEEP
board/esd/voh405/voh405.c +0 -36
index 5253422..115f8b4 100644
@@ -104,13 +104,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	unsigned char *duart0_mcr = (unsigned char *)((ulong)DUART0_BA + 4);
@@ -303,35 +296,6 @@ int checkboard (void)
 	return 0;
 }
 
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-#if 0
-	printf("\nmb0cf=%x\n", val); /* test-only */
-	printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
-
-/* ------------------------------------------------------------------------- */
-
-int testdram (void)
-{
-	/* TODO: XXX XXX XXX */
-	printf ("test: 16 MB - ok\n");
-
-	return (0);
-}
-
-/* ------------------------------------------------------------------------- */
-
 #ifdef CONFIG_IDE_RESET
 void ide_set_reset(int on)
 {
board/esd/wuh405/wuh405.c +0 -21
index 0590fc7..3a94fd8 100644
@@ -80,15 +80,6 @@ int board_early_init_f (void)
 	return 0;
 }
 
-
-/* ------------------------------------------------------------------------- */
-
-int misc_init_f (void)
-{
-	return 0;  /* dummy implementation */
-}
-
-
 int misc_init_r (void)
 {
 	volatile unsigned char *duart0_mcr = (unsigned char *)((ulong)DUART0_BA + 4);
@@ -202,15 +193,3 @@ int checkboard (void)
 
 	return 0;
 }
-
-/* ------------------------------------------------------------------------- */
-
-phys_size_t initdram (int board_type)
-{
-	unsigned long val;
-
-	mtdcr(memcfga, mem_mb0cf);
-	val = mfdcr(memcfgd);
-
-	return (4*1024*1024 << ((val & 0x000e0000) >> 17));
-}
Signature · 1 line
1.5.3
#1 lore raw

PATCH 1/1 4xx: Remove obsolete or unused functions from some esd boards

Quoted 3 lines · Matthias Fuchs

This patch removes initdram() and testdram() from most esd 405 platforms. Some boards also have an empty dummy implementation of misc_init_f(). This is also removed.

Applied to u-boot-ppc4xx. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================