Skip to content

Commit

Permalink
gridseed: added support for the 80-chip (two blades of 40 chips) G-Bl…
Browse files Browse the repository at this point in the history
…ade Scrypt-only miner
  • Loading branch information
nwoolls committed Jun 3, 2014
1 parent ae08af4 commit 45d1f88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions driver-gridseed.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ bool gridseed_detect_custom(const char *path, struct device_drv *driver, struct
return false;

device->device_fd = fd;

info->chips = GC3355_ORB_DEFAULT_CHIPS;
if((fw_version & 0xffff) == 0x1402)
info->chips = GC3355_BLADE_DEFAULT_CHIPS;

gc3355_init_usborb(device->device_fd, info->freq, false, false);

applog(LOG_INFO, "Found %"PRIpreprv" at %s", device->proc_repr, path);
applog(LOG_DEBUG, "%"PRIpreprv": Init: firmware=%"PRId64, device->proc_repr, fw_version);
applog(LOG_DEBUG, "%"PRIpreprv": Init: firmware=%"PRId64", chips=%d", device->proc_repr, fw_version, info->chips);

return true;
}
Expand Down Expand Up @@ -203,7 +207,7 @@ int64_t gridseed_estimate_hashes(struct thr_info *thr)
cgtime(&info->scanhash_time);
int elapsed_ms = ms_tdiff(&info->scanhash_time, &old_scanhash_time);

return GRIDSEED_HASH_SPEED * (double)elapsed_ms * (double)(info->freq * GC3355_ORB_DEFAULT_CHIPS);
return GRIDSEED_HASH_SPEED * (double)elapsed_ms * (double)(info->freq * info->chips);
}

// read from device for nonce or command
Expand Down
2 changes: 1 addition & 1 deletion gc3355.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ int64_t gc3355_get_firmware_version(int fd)
return -1;
}

uint32_t fw_version = le32toh(*(uint32_t *)(buf + 8));
uint32_t fw_version = be32toh(*(uint32_t *)(buf + 8));

return fw_version;
}
2 changes: 2 additions & 0 deletions gc3355.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ int opt_pll_freq;

#define GC3355_COMMAND_DELAY_MS 20
#define GC3355_ORB_DEFAULT_CHIPS 5
#define GC3355_BLADE_DEFAULT_CHIPS 40
#define GC3355_READ_SIZE 12

struct gc3355_orb_info
{
uint16_t freq;
uint8_t chips;
struct timeval scanhash_time;
};

Expand Down

0 comments on commit 45d1f88

Please sign in to comment.