From a7425c6c1bbd17c4800a89dd0b2461872339c7b3 Mon Sep 17 00:00:00 2001 From: Kano Date: Fri, 7 Jun 2013 01:52:51 +1000 Subject: [PATCH] Icarus AMU enable the UART --- driver-icarus.c | 10 ++++++++++ usbutils.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/driver-icarus.c b/driver-icarus.c index 2d183338..df65cfdc 100644 --- a/driver-icarus.c +++ b/driver-icarus.c @@ -364,6 +364,16 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud) case IDENT_AMU: nmsleep(20); + // Enable the UART + transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_IFC_ENABLE, + CP210X_VALUE_UART_ENABLE, + icarus->usbdev->found->interface, C_PURGETX); + + if (icarus->usbinfo.nodev) + return; + + nmsleep(20); + // Set data control transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_DATA, CP210X_VALUE_DATA, icarus->usbdev->found->interface, C_SETDATA); diff --git a/usbutils.h b/usbutils.h index 8cc8922a..9b2cf262 100644 --- a/usbutils.h +++ b/usbutils.h @@ -68,9 +68,11 @@ // For 0x10c4:0xea60 USB cp210x chip - AMU #define CP210X_TYPE_OUT 0x41 +#define CP210X_REQUEST_IFC_ENABLE 0x00 #define CP210X_REQUEST_DATA 0x07 #define CP210X_REQUEST_BAUD 0x1e +#define CP210X_VALUE_UART_ENABLE 0x0001 #define CP210X_VALUE_DATA 0x0303 #define CP210X_DATA_BAUD 0x0001c200