hbm.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2003-2018, Intel Corporation. All rights reserved.
  4. * Intel Management Engine Interface (Intel MEI) Linux driver
  5. */
  6. #ifndef _MEI_HBM_H_
  7. #define _MEI_HBM_H_
  8. struct mei_device;
  9. struct mei_msg_hdr;
  10. struct mei_cl;
  11. struct mei_dma_data;
  12. /**
  13. * enum mei_hbm_state - host bus message protocol state
  14. *
  15. * @MEI_HBM_IDLE : protocol not started
  16. * @MEI_HBM_STARTING : start request message was sent
  17. * @MEI_HBM_CAP_SETUP : capabilities request message was sent
  18. * @MEI_HBM_DR_SETUP : dma ring setup request message was sent
  19. * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent
  20. * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties
  21. * @MEI_HBM_STARTED : enumeration was completed
  22. * @MEI_HBM_STOPPED : stopping exchange
  23. */
  24. enum mei_hbm_state {
  25. MEI_HBM_IDLE = 0,
  26. MEI_HBM_STARTING,
  27. MEI_HBM_CAP_SETUP,
  28. MEI_HBM_DR_SETUP,
  29. MEI_HBM_ENUM_CLIENTS,
  30. MEI_HBM_CLIENT_PROPERTIES,
  31. MEI_HBM_STARTED,
  32. MEI_HBM_STOPPED,
  33. };
  34. const char *mei_hbm_state_str(enum mei_hbm_state state);
  35. int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr);
  36. void mei_hbm_idle(struct mei_device *dev);
  37. void mei_hbm_reset(struct mei_device *dev);
  38. int mei_hbm_start_req(struct mei_device *dev);
  39. int mei_hbm_start_wait(struct mei_device *dev);
  40. int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl);
  41. int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl);
  42. int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl);
  43. int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl);
  44. bool mei_hbm_version_is_supported(struct mei_device *dev);
  45. int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd);
  46. void mei_hbm_pg_resume(struct mei_device *dev);
  47. int mei_hbm_cl_notify_req(struct mei_device *dev,
  48. struct mei_cl *cl, u8 request);
  49. int mei_hbm_cl_dma_map_req(struct mei_device *dev, struct mei_cl *cl);
  50. int mei_hbm_cl_dma_unmap_req(struct mei_device *dev, struct mei_cl *cl);
  51. #endif /* _MEI_HBM_H_ */