mic_dev.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Intel MIC Platform Software Stack (MPSS)
  3. *
  4. * Copyright(c) 2013 Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License, version 2, as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * The full GNU General Public License is included in this distribution in
  16. * the file called "COPYING".
  17. *
  18. * Intel MIC driver.
  19. *
  20. */
  21. #ifndef __MIC_DEV_H__
  22. #define __MIC_DEV_H__
  23. /* The maximum number of MIC devices supported in a single host system. */
  24. #define MIC_MAX_NUM_DEVS 128
  25. /**
  26. * enum mic_hw_family - The hardware family to which a device belongs.
  27. */
  28. enum mic_hw_family {
  29. MIC_FAMILY_X100 = 0,
  30. MIC_FAMILY_X200,
  31. MIC_FAMILY_UNKNOWN,
  32. MIC_FAMILY_LAST
  33. };
  34. /**
  35. * struct mic_mw - MIC memory window
  36. *
  37. * @pa: Base physical address.
  38. * @va: Base ioremap'd virtual address.
  39. * @len: Size of the memory window.
  40. */
  41. struct mic_mw {
  42. phys_addr_t pa;
  43. void __iomem *va;
  44. resource_size_t len;
  45. };
  46. /*
  47. * Scratch pad register offsets used by the host to communicate
  48. * device page DMA address to the card.
  49. */
  50. #define MIC_DPLO_SPAD 14
  51. #define MIC_DPHI_SPAD 15
  52. /*
  53. * These values are supposed to be in the config_change field of the
  54. * device page when the host sends a config change interrupt to the card.
  55. */
  56. #define MIC_VIRTIO_PARAM_DEV_REMOVE 0x1
  57. #define MIC_VIRTIO_PARAM_CONFIG_CHANGED 0x2
  58. /* Maximum number of DMA channels */
  59. #define MIC_MAX_DMA_CHAN 4
  60. #endif