1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

usb/ica add more (incomplete) CMR settings

This commit is contained in:
Kano 2013-05-28 22:44:03 +10:00
parent 6041be6142
commit df8566a78c
3 changed files with 40 additions and 13 deletions

View File

@ -253,7 +253,8 @@ static void icarus_initialise(struct cgpu_info *icarus, __maybe_unused int baud)
switch (icarus->usbdev->ident) { switch (icarus->usbdev->ident) {
case IDENT_BLT: case IDENT_BLT:
case IDENT_LLT: case IDENT_LLT:
case IDENT_CMR: case IDENT_CMR1:
case IDENT_CMR2:
// Latency // Latency
transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_LATENCY, FTDI_VALUE_LATENCY, transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_LATENCY, FTDI_VALUE_LATENCY,
icarus->usbdev->found->interface, C_LATENCY); icarus->usbdev->found->interface, C_LATENCY);
@ -275,10 +276,14 @@ static void icarus_initialise(struct cgpu_info *icarus, __maybe_unused int baud)
if (icarus->usbinfo.nodev) if (icarus->usbinfo.nodev)
return; return;
// Set the baud // TODO: Get the baud settings for the 2 CMRs
transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_BAUD, FTDI_VALUE_BAUD_BLT, if (icarus->usbdev->ident != IDENT_CMR1 &&
(FTDI_INDEX_BAUD_BLT & 0xff00) | icarus->usbdev->found->interface, icarus->usbdev->ident != IDENT_CMR2) {
C_SETBAUD); // Set the baud
transfer(icarus, FTDI_TYPE_OUT, FTDI_REQUEST_BAUD, FTDI_VALUE_BAUD_BLT,
(FTDI_INDEX_BAUD_BLT & 0xff00) | icarus->usbdev->found->interface,
C_SETBAUD);
}
if (icarus->usbinfo.nodev) if (icarus->usbinfo.nodev)
return; return;
@ -484,7 +489,9 @@ static void set_timing_mode(int this_option_offset, struct cgpu_info *icarus)
case IDENT_AMU: case IDENT_AMU:
info->Hs = ASICMINERUSB_HASH_TIME; info->Hs = ASICMINERUSB_HASH_TIME;
break; break;
case IDENT_CMR: // TODO: ?
case IDENT_CMR1:
case IDENT_CMR2:
info->Hs = CAIRNSMORE1_HASH_TIME; info->Hs = CAIRNSMORE1_HASH_TIME;
break; break;
default: default:
@ -617,7 +624,9 @@ static void get_options(int this_option_offset, struct cgpu_info *icarus, int *b
*work_division = 1; *work_division = 1;
*fpga_count = 1; *fpga_count = 1;
break; break;
case IDENT_CMR: // TODO: ?
case IDENT_CMR1:
case IDENT_CMR2:
*baud = ICARUS_IO_SPEED; *baud = ICARUS_IO_SPEED;
*work_division = 2; *work_division = 2;
*fpga_count = 2; *fpga_count = 2;

View File

@ -106,7 +106,24 @@ static struct usb_endpoints llt_eps[] = {
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(1), 0 }, { LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(1), 0 },
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(2), 0 } { LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(2), 0 }
}; };
static struct usb_endpoints cmr_eps[] = { static struct usb_endpoints cmr1_eps[] = {
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(1), 0 },
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(2), 0 }
/*
Interface 1
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(3), 0 },
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(4), 0 },
Interface 2
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(5), 0 },
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(6), 0 },
Interface 3
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(7), 0 },
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(8), 0 }
*/
};
static struct usb_endpoints cmr2_eps[] = {
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(1), 0 }, { LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(1), 0 },
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(2), 0 } { LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(2), 0 }
}; };
@ -230,7 +247,7 @@ static struct usb_find_devices find_dev[] = {
{ {
.drv = DRV_ICARUS, .drv = DRV_ICARUS,
.name = "CMR", .name = "CMR",
.ident = IDENT_CMR, .ident = IDENT_CMR1,
.idVendor = IDVENDOR_FTDI, .idVendor = IDVENDOR_FTDI,
.idProduct = 0x8350, .idProduct = 0x8350,
.iProduct = "Cairnsmore1", .iProduct = "Cairnsmore1",
@ -238,12 +255,12 @@ static struct usb_find_devices find_dev[] = {
.config = 1, .config = 1,
.interface = 0, .interface = 0,
.timeout = ICARUS_TIMEOUT_MS, .timeout = ICARUS_TIMEOUT_MS,
.epcount = ARRAY_SIZE(cmr_eps), .epcount = ARRAY_SIZE(cmr1_eps),
.eps = cmr_eps }, .eps = cmr_eps },
{ {
.drv = DRV_ICARUS, .drv = DRV_ICARUS,
.name = "CMR", .name = "CMR",
.ident = IDENT_CMR, .ident = IDENT_CMR2,
.idVendor = IDVENDOR_FTDI, .idVendor = IDVENDOR_FTDI,
.idProduct = 0x6014, .idProduct = 0x6014,
.iProduct = "Cairnsmore1", .iProduct = "Cairnsmore1",
@ -251,7 +268,7 @@ static struct usb_find_devices find_dev[] = {
.config = 1, .config = 1,
.interface = 0, .interface = 0,
.timeout = ICARUS_TIMEOUT_MS, .timeout = ICARUS_TIMEOUT_MS,
.epcount = ARRAY_SIZE(cmr_eps), .epcount = ARRAY_SIZE(cmr2_eps),
.eps = cmr_eps }, .eps = cmr_eps },
#endif #endif
#ifdef USE_ZTEX #ifdef USE_ZTEX

View File

@ -108,7 +108,8 @@ enum sub_ident {
IDENT_AMU, IDENT_AMU,
IDENT_BLT, IDENT_BLT,
IDENT_LLT, IDENT_LLT,
IDENT_CMR, IDENT_CMR1,
IDENT_CMR2,
IDENT_ZTX IDENT_ZTX
}; };