Browse Source

* Extend burst mode RAM test program to take a loop count
(0 = infinite)

* Use CONFIG_DRIVER_KS8695ETH to enable KS8695 ethernet driver on
those boards that use it.

wdenk 20 years ago
parent
commit
2eab48f511
5 changed files with 41 additions and 12 deletions
  1. 6 0
      CHANGELOG
  2. 3 1
      drivers/ks8695eth.c
  3. 26 9
      examples/test_burst.c
  4. 3 1
      include/configs/cm4008.h
  5. 3 1
      include/configs/cm41xx.h

+ 6 - 0
CHANGELOG

@@ -2,6 +2,12 @@
 Changes for U-Boot 1.1.3:
 Changes for U-Boot 1.1.3:
 ======================================================================
 ======================================================================
 
 
+* Extend burst mode RAM test program to take a loop count
+  (0 = infinite)
+
+* Use CONFIG_DRIVER_KS8695ETH to enable KS8695 ethernet driver on
+  those boards that use it.
+
 * Patches by Greg Ungerer, 19 May 2005:
 * Patches by Greg Ungerer, 19 May 2005:
   - add support for the KS8695P (ARM 922 based) CPU
   - add support for the KS8695P (ARM 922 based) CPU
   - add support for the OpenGear CM4008, CM4116 and CM4148 boards
   - add support for the OpenGear CM4008, CM4116 and CM4148 boards

+ 3 - 1
drivers/ks8695eth.c

@@ -18,6 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  */
 
 
+#ifdef	CONFIG_DRIVER_KS8695ETH
+
 /****************************************************************************/
 /****************************************************************************/
 
 
 #include <common.h>
 #include <common.h>
@@ -233,4 +235,4 @@ int eth_send(volatile void *packet, int len)
 	return len;
 	return len;
 }
 }
 
 
-/****************************************************************************/
+#endif	/* CONFIG_DRIVER_KS8695ETH */

+ 26 - 9
examples/test_burst.c

@@ -88,10 +88,11 @@ static unsigned long test_pattern [] = {
 int test_burst (int argc, char *argv[])
 int test_burst (int argc, char *argv[])
 {
 {
 	unsigned long size = CACHE_LINE_SIZE;
 	unsigned long size = CACHE_LINE_SIZE;
-	int res;
-	int i;
+	unsigned int pass = 0;
+	int res = 0;
+	int i, j;
 
 
-	if (argc == 2) {
+	if (argc == 3) {
 		char * d;
 		char * d;
 		for (size = 0, d = argv[1]; *d >= '0' && *d <= '9'; d++) {
 		for (size = 0, d = argv[1]; *d >= '0' && *d <= '9'; d++) {
 			size *= 10;
 			size *= 10;
@@ -101,7 +102,15 @@ int test_burst (int argc, char *argv[])
 			test_usage();
 			test_usage();
 			return 1;
 			return 1;
 		}
 		}
-	} else if (argc > 2) {
+		for (d = argv[2]; *d >= '0' && *d <= '9'; d++) {
+			pass *= 10;
+			pass += *d - '0';
+		}
+		if (*d) {
+			test_usage();
+			return 1;
+		}
+	} else if (argc > 3) {
 		test_usage();
 		test_usage();
 		return 1;
 		return 1;
 	}
 	}
@@ -115,11 +124,19 @@ int test_burst (int argc, char *argv[])
 
 
 	test_desc(size);
 	test_desc(size);
 
 
-	for (i = 0; i < sizeof(test_pattern) / sizeof(test_pattern[0]); i++) {
-		res = test_burst_start(size, test_pattern[i]);
-		if (res != 0) {
-			goto Done;
+	for (j = 0; !pass || j < pass; j++) {
+		for (i = 0; i < sizeof(test_pattern) / sizeof(test_pattern[0]);
+		     i++) {
+			res = test_burst_start(size, test_pattern[i]);
+			if (res != 0) {
+				goto Done;
+			}
 		}
 		}
+
+		printf ("Iteration #%d passed\n", j + 1);
+
+		if (tstc() && 0x03 == getc())
+			break;
 	}
 	}
 Done:
 Done:
 	return res;
 	return res;
@@ -298,5 +315,5 @@ static void signal_error(void)
 
 
 static void test_usage(void)
 static void test_usage(void)
 {
 {
-	printf("Usage: go 0x40004 [size]\n");
+	printf("Usage: go 0x40004 [size] [count]\n");
 }
 }

+ 3 - 1
include/configs/cm4008.h

@@ -31,12 +31,14 @@
 #define CONFIG_KS8695	1		/* it is a KS8695 CPU */
 #define CONFIG_KS8695	1		/* it is a KS8695 CPU */
 #define CONFIG_CM4008	1		/* it is an OpenGear CM4008 boad */
 #define CONFIG_CM4008	1		/* it is an OpenGear CM4008 boad */
 
 
-#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */
+#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 
 #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/
 #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/
 #define CONFIG_SETUP_MEMORY_TAGS 1
 #define CONFIG_SETUP_MEMORY_TAGS 1
 #define CONFIG_INITRD_TAG	 1
 #define CONFIG_INITRD_TAG	 1
 
 
+#define CONFIG_DRIVER_KS8695ETH		/* use KS8695 ethernet driver	*/
+
 /*
 /*
  * Size of malloc() pool
  * Size of malloc() pool
  */
  */

+ 3 - 1
include/configs/cm41xx.h

@@ -31,12 +31,14 @@
 #define CONFIG_KS8695	1		/* it is a KS8695 CPU */
 #define CONFIG_KS8695	1		/* it is a KS8695 CPU */
 #define CONFIG_CM41xx	1		/* it is an OpenGear CM41xx boad */
 #define CONFIG_CM41xx	1		/* it is an OpenGear CM41xx boad */
 
 
-#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff */
+#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
 
 
 #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/
 #define CONFIG_CMDLINE_TAG	 1	/* enable passing of ATAGs	*/
 #define CONFIG_SETUP_MEMORY_TAGS 1
 #define CONFIG_SETUP_MEMORY_TAGS 1
 #define CONFIG_INITRD_TAG	 1
 #define CONFIG_INITRD_TAG	 1
 
 
+#define CONFIG_DRIVER_KS8695ETH		/* use KS8695 ethernet driver	*/
+
 /*
 /*
  * Size of malloc() pool
  * Size of malloc() pool
  */
  */