Create basic placeholders for bitfury driver code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
diff --git a/Makefile.am b/Makefile.am
index 706ebed..2389d67 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,6 +76,10 @@ if HAS_BITFORCE
cgminer_SOURCES += driver-bitforce.c
endif
+if HAS_BITFURY
+cgminer_SOURCES += driver-bitfury.c driver-bitfury.h
+endif
+
if HAS_ICARUS
cgminer_SOURCES += driver-icarus.c
endif
diff --git a/driver-bitfury.c b/driver-bitfury.c
new file mode 100644
index 0000000..aad2501
--- /dev/null
+++ b/driver-bitfury.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2013 Con Kolivas
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option)
+ * any later version. See COPYING for more details.
+ */
+
+#include "config.h"
+
+#include "miner.h"
+#include "driver-bitfury.h"
+
+struct device_drv bitfury_drv;
+
+static void bitfury_detect(void)
+{
+}
+
+static bool bitfury_prepare(struct thr_info __maybe_unused *thr)
+{
+ return false;
+}
+
+static bool bitfury_fill(struct cgpu_info __maybe_unused *bitfury)
+{
+ return true;
+}
+
+static int64_t bitfury_scanhash(struct thr_info __maybe_unused *thr)
+{
+ return 0;
+}
+
+static void bitfury_flush_work(struct cgpu_info __maybe_unused *bitfury)
+{
+}
+
+static struct api_data *bitfury_api_stats(struct cgpu_info __maybe_unused *cgpu)
+{
+ return NULL;
+}
+
+static void get_bitfury_statline_before(char __maybe_unused *buf, size_t __maybe_unused bufsiz,
+ struct cgpu_info __maybe_unused *bitfury)
+{
+}
+
+static void bitfury_init(struct cgpu_info __maybe_unused *bitfury)
+{
+}
+
+static void bitfury_shutdown(struct thr_info __maybe_unused *thr)
+{
+}
+
+/* Currently hardcoded to BF1 devices */
+struct device_drv bitfury_drv = {
+ .drv_id = DRIVER_BITFURY,
+ .dname = "bitfury",
+ .name = "BFO",
+ .drv_detect = bitfury_detect,
+ .thread_prepare = bitfury_prepare,
+ .hash_work = hash_queued_work,
+ .queue_full = bitfury_fill,
+ .scanwork = bitfury_scanhash,
+ .flush_work = bitfury_flush_work,
+ .get_api_stats = bitfury_api_stats,
+ .get_statline_before = get_bitfury_statline_before,
+ .reinit_device = bitfury_init,
+ .thread_shutdown = bitfury_shutdown
+};
diff --git a/driver-bitfury.h b/driver-bitfury.h
new file mode 100644
index 0000000..52592bb
--- /dev/null
+++ b/driver-bitfury.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2013 Con Kolivas
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option)
+ * any later version. See COPYING for more details.
+ */
+
+#ifndef BITFURY_H
+#define BITFURY_H
+
+#include "usbutils.h"
+
+#endif /* BITFURY_H */
diff --git a/miner.h b/miner.h
index d551585..bc10f5e 100644
--- a/miner.h
+++ b/miner.h
@@ -234,6 +234,7 @@ enum drv_driver {
DRIVER_OPENCL = 0,
DRIVER_ICARUS,
DRIVER_BITFORCE,
+ DRIVER_BITFURY,
DRIVER_MODMINER,
DRIVER_ZTEX,
DRIVER_BFLSC,