interconnect: qcom: Add support for mask-based BCMs
Some BCMs aren't directly associated with the data path (i.e. ACV) and therefore don't communicate using BW. Instead, they are simply enabled/disabled with a simple bit mask. Add support for these. Change-Id: I9b73e0ce05a09338d22571ff311c5b058fb8e1b2 Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
This commit is contained in:
parent
5d9a29660b
commit
6d75baa3d2
@ -85,6 +85,11 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm, bool init)
|
||||
|
||||
temp = agg_peak[bucket] * bcm->vote_scale;
|
||||
bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit);
|
||||
|
||||
if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) {
|
||||
bcm->vote_x[bucket] = 0;
|
||||
bcm->vote_y[bucket] = bcm->enable_mask;
|
||||
}
|
||||
}
|
||||
|
||||
if (bcm->keepalive) {
|
||||
|
@ -91,6 +91,7 @@ struct qcom_icc_node {
|
||||
* @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm
|
||||
* @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm
|
||||
* @vote_scale: scaling factor for vote_x and vote_y
|
||||
* @enable_mask: optional mask to send as vote instead of vote_x/vote_y
|
||||
* @dirty: flag used to indicate whether the bcm needs to be committed
|
||||
* @keepalive: flag used to indicate whether a keepalive is required
|
||||
* @aux_data: auxiliary data used when calculating threshold values and
|
||||
@ -107,6 +108,7 @@ struct qcom_icc_bcm {
|
||||
u64 vote_x[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 vote_y[QCOM_ICC_NUM_BUCKETS];
|
||||
u64 vote_scale;
|
||||
u32 enable_mask;
|
||||
bool dirty;
|
||||
bool keepalive;
|
||||
struct bcm_db aux_data;
|
||||
|
Loading…
Reference in New Issue
Block a user