Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Interconnect framework internal structs
0004  *
0005  * Copyright (c) 2019, Linaro Ltd.
0006  * Author: Georgi Djakov <georgi.djakov@linaro.org>
0007  */
0008 
0009 #ifndef __DRIVERS_INTERCONNECT_INTERNAL_H
0010 #define __DRIVERS_INTERCONNECT_INTERNAL_H
0011 
0012 /**
0013  * struct icc_req - constraints that are attached to each node
0014  * @req_node: entry in list of requests for the particular @node
0015  * @node: the interconnect node to which this constraint applies
0016  * @dev: reference to the device that sets the constraints
0017  * @enabled: indicates whether the path with this request is enabled
0018  * @tag: path tag (optional)
0019  * @avg_bw: an integer describing the average bandwidth in kBps
0020  * @peak_bw: an integer describing the peak bandwidth in kBps
0021  */
0022 struct icc_req {
0023     struct hlist_node req_node;
0024     struct icc_node *node;
0025     struct device *dev;
0026     bool enabled;
0027     u32 tag;
0028     u32 avg_bw;
0029     u32 peak_bw;
0030 };
0031 
0032 /**
0033  * struct icc_path - interconnect path structure
0034  * @name: a string name of the path (useful for ftrace)
0035  * @num_nodes: number of hops (nodes)
0036  * @reqs: array of the requests applicable to this path of nodes
0037  */
0038 struct icc_path {
0039     const char *name;
0040     size_t num_nodes;
0041     struct icc_req reqs[];
0042 };
0043 
0044 #endif