Commit 7cd22e2a0483bfe477e3a3ab4b19a21313489a23

Con Kolivas 2014-01-25T14:34:44

Add description to hfa hash clock command.

diff --git a/cgminer.c b/cgminer.c
index 2438274..6238a30 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -78,10 +78,6 @@ char *curly = ":D";
 
 #ifdef USE_HASHFAST
 #include "driver-hashfast.h"
-int opt_hfa_ntime_roll;
-int opt_hfa_hash_clock;
-bool opt_hfa_pll_bypass;
-bool opt_hfa_dfu_boot;
 #endif
 
 #if defined(USE_BITFORCE) || defined(USE_ICARUS) || defined(USE_AVALON) || defined(USE_MODMINER)
@@ -1228,8 +1224,8 @@ static struct opt_table opt_config_table[] = {
 			opt_set_bool, &opt_hfa_dfu_boot,
 			opt_hidden),
 	OPT_WITH_ARG("--hfa-hash-clock",
-		     opt_set_intval, NULL, &opt_hfa_hash_clock,
-		     opt_hidden),
+		     set_int_0_to_9999, opt_show_intval, &opt_hfa_hash_clock,
+		     "Set hashfast clock speed"),
 	OPT_WITH_ARG("--hfa-ntime-roll",
 		     opt_set_intval, NULL, &opt_hfa_ntime_roll,
 		     opt_hidden),
diff --git a/driver-hashfast.c b/driver-hashfast.c
index ea6c030..89d3520 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -18,6 +18,11 @@
 
 #include "driver-hashfast.h"
 
+int opt_hfa_ntime_roll = 1;
+int opt_hfa_hash_clock = 550;
+bool opt_hfa_pll_bypass;
+bool opt_hfa_dfu_boot;
+
 ////////////////////////////////////////////////////////////////////////////////
 // Support for the CRC's used in header (CRC-8) and packet body (CRC-32)
 ////////////////////////////////////////////////////////////////////////////////
@@ -270,8 +275,8 @@ static bool hfa_reset(struct cgpu_info *hashfast, struct hashfast_info *info)
 	bool ret;
 
 	/* Hash clock rate in Mhz */
-	info->hash_clock_rate = opt_hfa_hash_clock ? opt_hfa_hash_clock : 550;
-	info->group_ntime_roll = opt_hfa_ntime_roll ? opt_hfa_ntime_roll : 1;
+	info->hash_clock_rate = opt_hfa_hash_clock;
+	info->group_ntime_roll = opt_hfa_ntime_roll;
 	info->core_ntime_roll = 1;
 
 	// Assemble the USB_INIT request