driver-hashfast.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright 2013 Con Kolivas <kernel@kolivas.org>
  3. * Copyright 2013 Hashfast
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the Free
  7. * Software Foundation; either version 3 of the License, or (at your option)
  8. * any later version. See COPYING for more details.
  9. */
  10. #ifndef HASHFAST_H
  11. #define HASHFAST_H
  12. #ifdef USE_HASHFAST
  13. #include "miner.h"
  14. #include "elist.h"
  15. #include "hf_protocol.h"
  16. #define HASHFAST_MINER_THREADS 1
  17. #define HF_NUM_SEQUENCE 256
  18. struct hashfast_info {
  19. int asic_count; // # of chips in the chain
  20. struct hf_g1_die_data *die_status; // Array of per-die voltage, current, temperature sensor data
  21. struct hf_long_statistics *die_statistics; // Array of per-die error counters
  22. int hash_clock_rate; // Hash clock rate to use, in Mhz
  23. struct hf_usb_init_base usb_init_base; // USB Base information from USB_INIT
  24. struct hf_config_data config_data; // Configuration data used from USB_INIT
  25. struct work **works;
  26. uint16_t device_sequence_head; // The most recent sequence number the device dispatched
  27. uint16_t device_sequence_tail; // The most recently completed job in the device
  28. uint16_t hash_sequence_tail; // Follows device_sequence_tail around to free work
  29. };
  30. #endif /* USE_HASHFAST */
  31. #endif /* HASHFAST_H */