the -t test option now does no memory test, but enables 38400 baud on players
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5441 a1c6a512-1295-4272-9138-f99709370657
diff --git a/flash/uart_boot/uart_boot.c b/flash/uart_boot/uart_boot.c
index 9149373..f2047d8 100644
--- a/flash/uart_boot/uart_boot.c
+++ b/flash/uart_boot/uart_boot.c
@@ -173,7 +173,13 @@
if (gCmd.bNoDownload)
{ // just set our speed
- if (!UartConfig(serial_handle, gCmd.bRecorder ? 115200 : 38400, eNOPARITY, eONESTOPBIT, 8))
+ int baudrate = gCmd.bRecorder ? 115200 : 14400;
+ if (!gCmd.bRecorder && gCmd.bTest)
+ { // experimental Player speedup to 38400 baud
+ baudrate = 38400;
+ }
+
+ if (!UartConfig(serial_handle, baudrate, eNOPARITY, eONESTOPBIT, 8))
{
printf("Error setting up COM params\n");
exit(1);
@@ -198,9 +204,9 @@
{ // we can be faster
SetTargetBaudrate(serial_handle, 11059200, 115200); // set to 115200
}
- else
- {
- SetTargetBaudrate(serial_handle, 12000000, 38400); // set to 38400
+ else if (gCmd.bTest) // experimental Player speedup to 38400 baud
+ {
+ SetTargetBaudrate(serial_handle, 12000000, 38400); // set to 38400
}
}
}
@@ -345,112 +351,6 @@
}
- if (gCmd.bTest) // DRAM test
- {
- static UINT8 abRam[2*1024*1024]; // DRAM copy, not on stack
- int i;
- int fails;
-
- // init the DRAM controller like the flash boot does
- reg = ReadHalfword(serial_handle, 0x05FFFFCA); // PACR2
- reg &= 0xFFFB; // PA1 config: /RAS
- reg |= 0x0008;
- WriteHalfword(serial_handle, 0x05FFFFCA, reg); // PACR2
- reg = 0xAFFF; // CS1, CS3 config: /CASH. /CASL
- WriteHalfword(serial_handle, 0x05FFFFEE, reg); // CASCR
- reg = ReadHalfword(serial_handle, 0x05FFFFA0); // BCR
- reg |= 0x8000; // DRAM enable, default bus
- WriteHalfword(serial_handle, 0x05FFFFA0, reg); // BCR
- reg = ReadHalfword(serial_handle, 0x05FFFFA2); // WCR1
- reg &= 0xFDFD; // 1-cycle CAS
- WriteHalfword(serial_handle, 0x05FFFFA2, reg); // WCR1
- reg = 0x0E00; // CAS 35%, multiplexed, 10 bit row addr.
- WriteHalfword(serial_handle, 0x05FFFFA8, reg); // DCR
- reg = 0x5AB0; // refresh, 4 cycle waitstate
- WriteHalfword(serial_handle, 0x05FFFFAC, reg); // RCR
- reg = 0x9605; // refresh constant
- WriteHalfword(serial_handle, 0x05FFFFB2, reg); // RTCOR
- reg = 0xA518; // phi/32
- WriteHalfword(serial_handle, 0x05FFFFAE, reg); // RTCSR
-
- fails = 0;
- memset(abRam, 0xFF, sizeof(abRam));
- printf("writing 0xFF pattern\n");
- WriteByteMultiple(serial_handle, 0x09000000, sizeof(abRam), abRam);
- printf("testing marching 0x00\n");
- for (i=0; i<sizeof(abRam); i++)
- {
- UINT8 byte;
- WriteByte(serial_handle, 0x09000000 + i, 0x00);
- byte = ReadByte(serial_handle, 0x09000000 + i);
- WriteByte(serial_handle, 0x09000000 + i, 0xFF);
-
- if (byte != 0x00)
- {
- printf("RAM at offset 0x%06X is 0x%02X instead of 0x%02X\n", i, byte, 0x00);
- fails++;
- }
-
- }
- printf("%d failures\n", fails);
-
- fails = 0;
- memset(abRam, 0x00, sizeof(abRam));
- printf("writing 0x00 pattern\n");
- WriteByteMultiple(serial_handle, 0x09000000, sizeof(abRam), abRam);
- printf("testing marching 0xFF\n");
- for (i=0; i<sizeof(abRam); i++)
- {
- UINT8 byte;
- WriteByte(serial_handle, 0x09000000 + i, 0xFF);
- byte = ReadByte(serial_handle, 0x09000000 + i);
- WriteByte(serial_handle, 0x09000000 + i, 0x00);
-
- if (byte != 0xFF)
- {
- printf("RAM at offset 0x%06X is 0x%02X instead of 0x%02X\n", i, byte, 0xFF);
- fails++;
- }
-
- }
- printf("%d failures\n", fails);
-
- fails = 0;
- memset(abRam, 0xAA, sizeof(abRam));
- printf("writing 0xAA pattern\n");
- WriteByteMultiple(serial_handle, 0x09000000, sizeof(abRam), abRam);
- printf("reading back\n");
- ReadByteMultiple(serial_handle, 0x09000000, sizeof(abRam), abRam);
- for (i=0; i<sizeof(abRam); i++)
- {
- if (abRam[i] != 0xAA)
- {
- printf("RAM at offset 0x%06X is 0x%02X instead of 0x%02X\n", i, abRam[i], 0xAA);
- fails++;
- }
-
- }
- printf("%d failures\n", fails);
-
- fails = 0;
- memset(abRam, 0x55, sizeof(abRam));
- printf("writing 0x55 pattern\n");
- WriteByteMultiple(serial_handle, 0x09000000, sizeof(abRam), abRam);
- printf("reading back\n");
- ReadByteMultiple(serial_handle, 0x09000000, sizeof(abRam), abRam);
- for (i=0; i<sizeof(abRam); i++)
- {
- if (abRam[i] != 0x55)
- {
- printf("RAM at offset 0x%06X is 0x%02X instead of 0x%02X\n", i, abRam[i], 0x55);
- fails++;
- }
-
- }
- printf("%d failures\n", fails);
- }
-
-
if (gCmd.bBlink)
{
// blinking LED