qcom_glink_native.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2016-2017, Linaro Ltd
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef __QCOM_GLINK_NATIVE_H__
  14. #define __QCOM_GLINK_NATIVE_H__
  15. #define GLINK_FEATURE_INTENT_REUSE BIT(0)
  16. #define GLINK_FEATURE_MIGRATION BIT(1)
  17. #define GLINK_FEATURE_TRACER_PKT BIT(2)
  18. struct qcom_glink_pipe {
  19. size_t length;
  20. size_t (*avail)(struct qcom_glink_pipe *glink_pipe);
  21. void (*peak)(struct qcom_glink_pipe *glink_pipe, void *data,
  22. unsigned int offset, size_t count);
  23. void (*advance)(struct qcom_glink_pipe *glink_pipe, size_t count);
  24. void (*write)(struct qcom_glink_pipe *glink_pipe,
  25. const void *hdr, size_t hlen,
  26. const void *data, size_t dlen);
  27. };
  28. struct qcom_glink;
  29. struct qcom_glink *qcom_glink_native_probe(struct device *dev,
  30. unsigned long features,
  31. struct qcom_glink_pipe *rx,
  32. struct qcom_glink_pipe *tx,
  33. bool intentless);
  34. void qcom_glink_native_remove(struct qcom_glink *glink);
  35. void qcom_glink_native_unregister(struct qcom_glink *glink);
  36. #endif