Browse Source

Support new overclocking speeds for avalon: 325, 350 and 375

Con Kolivas 12 years ago
parent
commit
c64d95f267
2 changed files with 41 additions and 17 deletions
  1. 7 4
      ASIC-README
  2. 34 13
      driver-avalon.c

+ 7 - 4
ASIC-README

@@ -103,7 +103,10 @@ It is possible to set this a little lower if you are trying to tune for short
 block mining (eg p2pool) but much lower and the device will start creating
 duplicate shares.
 
-Sample settings for different frequencies (last 2 values):
+Sample settings for valid different frequencies (last 2 values):
+34:375
+36:350
+39:325
 43:300
 45:282 (default)
 47:270
@@ -111,14 +114,14 @@ Sample settings for different frequencies (last 2 values):
 
 Frequency:
 This is the clock speed of the devices. Only specific values work, 256, 270,
-282 (default) and 300.
+282 (default), 300, 325, 350 and 375.
 
 If you use the full curses based interface with Avalons you will get this
 information:
-AVA 0: 22/ 46C  60%/2400R
+AVA 0: 22/ 46C  2400R
 
 The values are:
-ambient temp / highest device temp  set fan % / lowest detected fan RPM.
+ambient temp / highest device temp  lowest detected ASIC cooling fan RPM.
 
 Use the API for more detailed information than this.
 

+ 34 - 13
driver-avalon.c

@@ -96,18 +96,36 @@ static int avalon_init_task(struct avalon_task *at,
 	buf[9] = 0x01;
 	buf[10] = 0x00;
 	buf[11] = 0x00;
-	if (frequency == 256) {
-		buf[6] = 0x03;
-		buf[7] = 0x08;
-	} else if (frequency == 270) {
-		buf[6] = 0x73;
-		buf[7] = 0x08;
-	} else if (frequency == 282) {
-		buf[6] = 0xd3;
-		buf[7] = 0x08;
-	} else if (frequency == 300) {
-		buf[6] = 0x63;
-		buf[7] = 0x09;
+	switch (frequency) {
+		case 256:
+			buf[6] = 0x03;
+			buf[7] = 0x08;
+			break;
+		default:
+		case 270:
+			buf[6] = 0x73;
+			buf[7] = 0x08;
+			break;
+		case 282:
+			buf[6] = 0xd3;
+			buf[7] = 0x08;
+			break;
+		case 300:
+			buf[6] = 0x63;
+			buf[7] = 0x09;
+			break;
+		case 325:
+			buf[6] = 0x28;
+			buf[7] = 0x0a;
+			break;
+		case 350:
+			buf[6] = 0xf0;
+			buf[7] = 0x0a;
+			break;
+		case 375:
+			buf[6] = 0xb8;
+			buf[7] = 0x0b;
+			break;
 	}
 
 	return 0;
@@ -447,11 +465,14 @@ static bool get_options(int this_option_offset, int *baud, int *miner_count,
 					case 270:
 					case 282:
 					case 300:
+					case 325:
+					case 350:
+					case 375:
 						*frequency = tmp;
 						break;
 					default:
 						quit(1, "Invalid avalon-options for "
-							"frequency must be 256/270/282/300");
+							"frequency must be 256/270/282/300/325/350/375");
 					}
 				}
 			}