Skip to content

Commit

Permalink
First draft of port of avalon driver to new cgminer queued infrastruc…
Browse files Browse the repository at this point in the history
…ture.
  • Loading branch information
ckolivas committed Apr 5, 2013
1 parent dea35d3 commit 71bae00
Show file tree
Hide file tree
Showing 7 changed files with 1,342 additions and 6 deletions.
34 changes: 32 additions & 2 deletions cgminer.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@
#include "driver-opencl.h"
#include "bench_block.h"
#include "scrypt.h"
#include "driver-avalon.h"

#if defined(unix)
#include <errno.h>
#include <fcntl.h>
#include <sys/wait.h>
#endif

#if defined(USE_BITFORCE) || defined(USE_ICARUS) || defined(USE_MODMINER)
#if defined(USE_BITFORCE) || defined(USE_ICARUS) || defined(USE_AVALON) || defined(USE_MODMINER)
# define USE_FPGA
#if defined(USE_ICARUS)
#if defined(USE_ICARUS) || defined(USE_AVALON)
# define USE_FPGA_SERIAL
#endif
#elif defined(USE_ZTEX)
Expand Down Expand Up @@ -138,6 +139,9 @@ bool opt_disable_pool;
char *opt_icarus_options = NULL;
char *opt_icarus_timing = NULL;
bool opt_worktime;
#ifdef USE_AVALON
char *opt_avalon_options = NULL;
#endif
#ifdef USE_USBUTILS
char *opt_usb_select = NULL;
int opt_usbdump = -1;
Expand Down Expand Up @@ -833,6 +837,15 @@ static char *set_icarus_timing(const char *arg)
}
#endif

#ifdef USE_AVALON
static char *set_avalon_options(const char *arg)
{
opt_set_charp(arg, &opt_avalon_options);

return NULL;
}
#endif

#ifdef USE_USBUTILS
static char *set_usb_select(const char *arg)
{
Expand Down Expand Up @@ -1032,6 +1045,11 @@ static struct opt_table opt_config_table[] = {
OPT_WITH_ARG("--icarus-timing",
set_icarus_timing, NULL, NULL,
opt_hidden),
#endif
#ifdef USE_AVALON
OPT_WITH_ARG("--avalon-options",
set_avalon_options, NULL, NULL,
opt_hidden),
#endif
OPT_WITHOUT_ARG("--load-balance",
set_loadbalance, &pool_strategy,
Expand Down Expand Up @@ -1359,6 +1377,9 @@ static char *opt_verusage_and_exit(const char *extra)
#ifdef USE_ICARUS
"icarus "
#endif
#ifdef USE_AVALON
"avalon "
#endif
#ifdef USE_MODMINER
"modminer "
#endif
Expand Down Expand Up @@ -6792,6 +6813,10 @@ extern struct device_drv bitforce_drv;
extern struct device_drv icarus_drv;
#endif

#ifdef USE_AVALON
extern struct device_drv avalon_api;
#endif

#ifdef USE_MODMINER
extern struct device_drv modminer_drv;
#endif
Expand Down Expand Up @@ -7311,6 +7336,11 @@ int main(int argc, char *argv[])
icarus_drv.drv_detect();
#endif

#ifdef USE_AVALON
if (!opt_scrypt)
avalon_api.drv_detect();
#endif

#ifdef USE_BFLSC
if (!opt_scrypt)
bflsc_drv.drv_detect();
Expand Down
Loading

0 comments on commit 71bae00

Please sign in to comment.