interconnect: qcom: Add stub icc_set/aggregate() callbacks
Add stub icc_set() and icc_aggregate() callbacks that return success without doing anything. These can be used early in development before the rest of the system is ready to service RPMh requests. Additionally, they can be used during probe to avoid unnecessary set/aggregate() calls each time icc_node_add() is called. Change-Id: If495ffc8f9839c3d2651c166c62a7936927e3c02 Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
This commit is contained in:
parent
fc89958b2d
commit
428497d097
@ -82,6 +82,13 @@ int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_aggregate);
|
||||
|
||||
int qcom_icc_aggregate_stub(struct icc_node *node, u32 tag, u32 avg_bw,
|
||||
u32 peak_bw, u32 *agg_avg, u32 *agg_peak)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(qcom_icc_aggregate_stub);
|
||||
|
||||
/**
|
||||
* qcom_icc_set - set the constraints based on path
|
||||
* @src: source node for the path to set constraints on
|
||||
@ -109,6 +116,12 @@ int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qcom_icc_set);
|
||||
|
||||
int qcom_icc_set_stub(struct icc_node *src, struct icc_node *dst)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(qcom_icc_set_stub);
|
||||
|
||||
struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data)
|
||||
{
|
||||
struct icc_node_data *ndata;
|
||||
@ -239,9 +252,9 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
|
||||
|
||||
provider = &qp->provider;
|
||||
provider->dev = dev;
|
||||
provider->set = qcom_icc_set;
|
||||
provider->set = qcom_icc_set_stub;
|
||||
provider->pre_aggregate = qcom_icc_pre_aggregate;
|
||||
provider->aggregate = qcom_icc_aggregate;
|
||||
provider->aggregate = qcom_icc_aggregate_stub;
|
||||
provider->xlate_extended = qcom_icc_xlate_extended;
|
||||
INIT_LIST_HEAD(&provider->nodes);
|
||||
provider->data = data;
|
||||
@ -313,6 +326,9 @@ int qcom_icc_rpmh_probe(struct platform_device *pdev)
|
||||
data->num_nodes = num_nodes;
|
||||
platform_set_drvdata(pdev, qp);
|
||||
|
||||
provider->set = qcom_icc_set;
|
||||
provider->aggregate = qcom_icc_aggregate;
|
||||
|
||||
mutex_lock(&probe_list_lock);
|
||||
list_add_tail(&qp->probe_list, &qnoc_probe_list);
|
||||
mutex_unlock(&probe_list_lock);
|
||||
|
@ -144,7 +144,10 @@ struct qcom_icc_desc {
|
||||
|
||||
int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
||||
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
|
||||
int qcom_icc_aggregate_stub(struct icc_node *node, u32 tag, u32 avg_bw,
|
||||
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
|
||||
int qcom_icc_set(struct icc_node *src, struct icc_node *dst);
|
||||
int qcom_icc_set_stub(struct icc_node *src, struct icc_node *dst);
|
||||
struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data);
|
||||
int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev);
|
||||
void qcom_icc_pre_aggregate(struct icc_node *node);
|
||||
|
Loading…
Reference in New Issue
Block a user