Browse Source

bitmain: Hardcode configuration for now

Luke Dashjr 10 years ago
parent
commit
66f545d63a
2 changed files with 7 additions and 13 deletions
  1. 7 2
      driver-bitmain.c
  2. 0 11
      driver-bitmain.h

+ 7 - 2
driver-bitmain.c

@@ -38,6 +38,13 @@
 #include "driver-bitmain.h"
 #include "driver-bitmain.h"
 #include "util.h"
 #include "util.h"
 
 
+#warning "FIXME: Make these --set able"
+char * const opt_bitmain_dev = "/dev/bitmain-asic";
+char * const opt_bitmain_options = "115200:32:8:7:200:0782:0725";
+const bool opt_bitmain_hwerror = true;
+char * const opt_bitmain_freq = "3:350:0d82";
+char * const opt_bitmain_voltage = "0725";
+
 BFG_REGISTER_DRIVER(bitmain_drv)
 BFG_REGISTER_DRIVER(bitmain_drv)
 
 
 static inline unsigned int bfg_work_block(struct work * const work)
 static inline unsigned int bfg_work_block(struct work * const work)
@@ -237,8 +244,6 @@ const char btm_work_test_midstate[BITMAIN_TEST_NUM][256] = {
 };
 };
 #endif
 #endif
 
 
-char opt_bitmain_dev[256] = {0};
-bool opt_bitmain_hwerror = false;
 bool opt_bitmain_checkall = false;
 bool opt_bitmain_checkall = false;
 bool opt_bitmain_nobeeper = false;
 bool opt_bitmain_nobeeper = false;
 bool opt_bitmain_notempoverctrl = false;
 bool opt_bitmain_notempoverctrl = false;

+ 0 - 11
driver-bitmain.h

@@ -305,17 +305,6 @@ struct bitmain_info {
 
 
 #define BITMAIN_READ_TIME(baud) ((double)BITMAIN_READ_SIZE * (double)8.0 / (double)(baud))
 #define BITMAIN_READ_TIME(baud) ((double)BITMAIN_READ_SIZE * (double)8.0 / (double)(baud))
 #define ASSERT1(condition) __maybe_unused static char sizeof_uint32_t_must_be_4[(condition)?1:-1]
 #define ASSERT1(condition) __maybe_unused static char sizeof_uint32_t_must_be_4[(condition)?1:-1]
-ASSERT1(sizeof(uint32_t) == 4);
-
-extern struct bitmain_info **bitmain_info;
-extern char opt_bitmain_dev[256];
-extern int opt_bitmain_temp;
-extern int opt_bitmain_overheat;
-extern int opt_bitmain_fan_min;
-extern int opt_bitmain_fan_max;
-extern bool opt_bitmain_auto;
-extern char *set_bitmain_dev(char *arg);
-extern char *set_bitmain_fan(char *arg);
 
 
 #endif /* USE_BITMAIN */
 #endif /* USE_BITMAIN */
 #endif	/* BITMAIN_H */
 #endif	/* BITMAIN_H */