mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "interconnect: qcom: fix up endianness for rpmh messages"
This commit is contained in:
commit
fb260342cc
3 changed files with 8 additions and 8 deletions
|
|
@ -61,23 +61,23 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm)
|
|||
for (bucket = 0; bucket < QCOM_ICC_NUM_BUCKETS; bucket++) {
|
||||
for (i = 0; i < bcm->num_nodes; i++) {
|
||||
temp = bcm->nodes[i]->sum_avg[bucket] *
|
||||
bcm->aux_data.width;
|
||||
le16_to_cpu(bcm->aux_data.width);
|
||||
do_div(temp, bcm->nodes[i]->buswidth *
|
||||
bcm->nodes[i]->channels);
|
||||
agg_avg[bucket] = max(agg_avg[bucket], temp);
|
||||
|
||||
temp = bcm->nodes[i]->max_peak[bucket] *
|
||||
bcm->aux_data.width;
|
||||
le16_to_cpu(bcm->aux_data.width);
|
||||
do_div(temp, bcm->nodes[i]->buswidth);
|
||||
agg_peak[bucket] = max(agg_peak[bucket], temp);
|
||||
}
|
||||
|
||||
temp = agg_avg[bucket] * 1000ULL;
|
||||
do_div(temp, bcm->aux_data.unit);
|
||||
do_div(temp, le32_to_cpu(bcm->aux_data.unit));
|
||||
bcm->vote_x[bucket] = temp;
|
||||
|
||||
temp = agg_peak[bucket] * 1000ULL;
|
||||
do_div(temp, bcm->aux_data.unit);
|
||||
do_div(temp, le32_to_cpu(bcm->aux_data.unit));
|
||||
bcm->vote_y[bucket] = temp;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
bcm->aux_data.unit = le32_to_cpu(data->unit);
|
||||
bcm->aux_data.width = le16_to_cpu(data->width);
|
||||
bcm->aux_data.unit = data->unit;
|
||||
bcm->aux_data.width = data->width;
|
||||
bcm->aux_data.vcd = data->vcd;
|
||||
bcm->aux_data.reserved = data->reserved;
|
||||
INIT_LIST_HEAD(&bcm->list);
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ struct tcs_request {
|
|||
#define BCM_TCS_CMD(commit, valid, vote_x, vote_y) \
|
||||
(((commit) << BCM_TCS_CMD_COMMIT_SHFT) | \
|
||||
((valid) << BCM_TCS_CMD_VALID_SHFT) | \
|
||||
((cpu_to_le32(vote_x) & \
|
||||
((vote_x & \
|
||||
BCM_TCS_CMD_VOTE_MASK) << BCM_TCS_CMD_VOTE_X_SHFT) | \
|
||||
((cpu_to_le32(vote_y) & \
|
||||
((vote_y & \
|
||||
BCM_TCS_CMD_VOTE_MASK) << BCM_TCS_CMD_VOTE_Y_SHFT))
|
||||
|
||||
#endif /* __SOC_QCOM_TCS_H__ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue