internal.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Interconnect framework internal structs
  4. *
  5. * Copyright (c) 2019, Linaro Ltd.
  6. * Author: Georgi Djakov <[email protected]>
  7. */
  8. #ifndef __DRIVERS_INTERCONNECT_INTERNAL_H
  9. #define __DRIVERS_INTERCONNECT_INTERNAL_H
  10. /**
  11. * struct icc_req - constraints that are attached to each node
  12. * @req_node: entry in list of requests for the particular @node
  13. * @node: the interconnect node to which this constraint applies
  14. * @dev: reference to the device that sets the constraints
  15. * @enabled: indicates whether the path with this request is enabled
  16. * @tag: path tag (optional)
  17. * @avg_bw: an integer describing the average bandwidth in kBps
  18. * @peak_bw: an integer describing the peak bandwidth in kBps
  19. */
  20. struct icc_req {
  21. struct hlist_node req_node;
  22. struct icc_node *node;
  23. struct device *dev;
  24. bool enabled;
  25. u32 tag;
  26. u32 avg_bw;
  27. u32 peak_bw;
  28. };
  29. /**
  30. * struct icc_path - interconnect path structure
  31. * @name: a string name of the path (useful for ftrace)
  32. * @num_nodes: number of hops (nodes)
  33. * @reqs: array of the requests applicable to this path of nodes
  34. */
  35. struct icc_path {
  36. const char *name;
  37. size_t num_nodes;
  38. struct icc_req reqs[];
  39. };
  40. #endif