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