Skip to contentSkip to conversation

board/mpl: Remove mpl-specific memory test command

PATCH New Peter Tyser 3 participants 4 messages Oct 6, 2010 – Oct 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board/mpl: Remove mpl-specific memory test command

The mpl-specfic memory test is only documented for one board, doesn't compile cleanly, uses improper coding style, and overlaps functionality with U-Boot's common 'mtest' command, so lets get rid of it.

CC d.peter at mpl.ch
CC d.mueller at elsoft.ch
CC wdenk at denx.de

---
The few snippets of code I looked at in board/mpl were extremely ugly; I'm assuming these board ports aren't really maintained. Would anyone complain if I removed them?

Note I didn't compile test for the vcma9, but did compile the other boards.

 board/mpl/common/common_util.c |   30 +--
 board/mpl/common/memtst.c      |  565 ----------------------------------------
 board/mpl/mip405/Makefile      |    2 +-
 board/mpl/mip405/cmd_mip405.c  |    3 +-
 board/mpl/pati/Makefile        |    2 +-
 board/mpl/pip405/Makefile      |    2 +-
 board/mpl/vcma9/Makefile       |    2 +-
 7 files changed, 8 insertions(+), 598 deletions(-)
 delete mode 100644 board/mpl/common/memtst.c
board/mpl/common/common_util.c +3 -27
index 624c708..d3300ed 100644
@@ -430,12 +430,12 @@ void check_env(void)
 
 int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-	ulong size,src,ld_addr;
+	ulong ld_addr;
 	int result;
 #if !defined(CONFIG_PATI)
+	ulong size = IMAGE_SIZE;
+	ulong src = MULTI_PURPOSE_SOCKET_ADDR;
 	backup_t back;
-	src = MULTI_PURPOSE_SOCKET_ADDR;
-	size = IMAGE_SIZE;
 #endif
 
 	if (strcmp(argv[1], "flash") == 0)
@@ -480,30 +480,6 @@ int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 		}
 #endif /* #if !defined(CONFIG_PATI)	*/
 	}
-	if (strcmp(argv[1], "mem") == 0)
-	{
-		result=0;
-		if(argc==3)
-		{
-			result = (int)simple_strtol(argv[2], NULL, 16);
-	    }
-	    src=(unsigned long)&result;
-	    src-=CONFIG_SYS_MEMTEST_START;
-	    src-=(100*1024); /* - 100k */
-	    src&=0xfff00000;
-	    size=0;
-	    do {
-		size++;
-			printf("\n\nPass %ld\n",size);
-			mem_test(CONFIG_SYS_MEMTEST_START,src,1);
-			if(ctrlc())
-				break;
-			if(result>0)
-				result--;
-
-		}while(result);
-		return 0;
-	}
 #if !defined(CONFIG_PATI)
 	if (strcmp(argv[1], "clearenvvalues") == 0)
 	{
board/mpl/common/memtst.c deleted +0 -565

565 lines not on this page · raw message

board/mpl/mip405/Makefile +1 -1
index 18a8d86..21e3cda 100644
@@ -29,7 +29,7 @@ endif
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	= $(BOARD).o ../common/flash.o cmd_mip405.o ../common/pci.o \
-			../common/usb_uhci.o ../common/memtst.o ../common/common_util.o
+			../common/usb_uhci.o ../common/common_util.o
 
 SOBJS	= init.o
 
board/mpl/mip405/cmd_mip405.c +1 -2
index 8ddb54d..f7cc37b 100644
@@ -59,8 +59,7 @@ U_BOOT_CMD(
 	"flash mem [SrcAddr] - updates U-Boot with image in memory\n"
 	"mip405 flash mps - updates U-Boot with image from MPS\n"
 	"mip405 info      - displays board information\n"
-	"mip405 led <on>  - switches LED on (on=1) or off (on=0)\n"
-	"mip405 mem [cnt] - Memory Test <cnt>-times, <cnt> = -1 loop forever"
+	"mip405 led <on>  - switches LED on (on=1) or off (on=0)"
 );
 
 /* ------------------------------------------------------------------------- */
board/mpl/pati/Makefile +1 -1
index adeba69..9f38d70 100644
@@ -28,7 +28,7 @@ endif
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:=  pati.o ../common/flash.o ../common/memtst.o cmd_pati.o ../common/common_util.o
+COBJS	:=  pati.o ../common/flash.o cmd_pati.o ../common/common_util.o
 #### cmd_pati.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/mpl/pip405/Makefile +1 -1
index 774b59f..fb39ec3 100644
@@ -32,7 +32,7 @@ COBJS	= $(BOARD).o \
 	  ../common/flash.o cmd_pip405.o ../common/pci.o \
 	  ../common/isa.o ../common/kbd.o \
 	  ../common/usb_uhci.o \
-	  ../common/memtst.o ../common/common_util.o
+	  ../common/common_util.o
 
 SOBJS	= init.o
 
board/mpl/vcma9/Makefile +1 -1
index 10bcb3b..3f629fc 100644
@@ -29,7 +29,7 @@ endif
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= vcma9.o flash.o cmd_vcma9.o
-COBJS	+= ../common/common_util.o ../common/memtst.o
+COBJS	+= ../common/common_util.o
 
 SOBJS	:= lowlevel_init.o
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 board/mpl: Remove mpl-specific memory test command

Dear Peter Tyser,

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

The mpl-specfic memory test is only documented for one board, doesn't compile cleanly, uses improper coding style, and overlaps functionality with U-Boot's common 'mtest' command, so lets get rid of it.

CC d.peter at mpl.ch
CC d.mueller at elsoft.ch
CC wdenk at denx.de

Do you happen to know where this incorrect email address is coming from? I never had any such problems, but in the last few days more and more people seem to pick up that bad address?

Quoted 3 lines

The few snippets of code I looked at in board/mpl were extremely ugly; I'm assuming these board ports aren't really maintained. Would anyone complain if I removed them?

I think you are right. If you have tiome, please submit patches to remove these, then we will see if anybody cares.

Quoted 9 lines
 board/mpl/common/common_util.c |   30 +--
 board/mpl/common/memtst.c      |  565 ----------------------------------------
 board/mpl/mip405/Makefile      |    2 +-
 board/mpl/mip405/cmd_mip405.c  |    3 +-
 board/mpl/pati/Makefile        |    2 +-
 board/mpl/pip405/Makefile      |    2 +-
 board/mpl/vcma9/Makefile       |    2 +-
 7 files changed, 8 insertions(+), 598 deletions(-)
 delete mode 100644 board/mpl/common/memtst.c

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 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
I program, therefore I am.
#2 lore raw

PATCH 1/1 board/mpl: Remove mpl-specific memory test command

Quoted 13 lines · Wolfgang Denk

Dear Peter Tyser,

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

The mpl-specfic memory test is only documented for one board, doesn't compile cleanly, uses improper coding style, and overlaps functionality with U-Boot's common 'mtest' command, so lets get rid of it.

CC d.peter at mpl.ch
CC d.mueller at elsoft.ch
CC wdenk at denx.de
Quoted 3 lines

Do you happen to know where this incorrect email address is coming from? I never had any such problems, but in the last few days more and more people seem to pick up that bad address?

This was just a typo on my part. I normally use git email aliases or my mail client's address book, but this time I manually typed in your address in the patch, and failed.

Quoted 6 lines
Quoted 3 lines

The few snippets of code I looked at in board/mpl were extremely ugly; I'm assuming these board ports aren't really maintained. Would anyone complain if I removed them?

I think you are right. If you have tiome, please submit patches to remove these, then we will see if anybody cares.

Will do.

Regards,
Peter

#3 lore raw

PATCH 1/1 board/mpl: Remove mpl-specific memory test command

Quoted 5 lines · Peter Tyser
Quoted 2 lines · Wolfgang Denk

I think you are right. If you have tiome, please submit patches to remove these, then we will see if anybody cares.

Will do.

I'm currently trying to bring the VCMA9 port in sync with the recently introduced "ARM relocation support" feature.

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101008/11c0c3bd/attachment.pgp