Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a2d6176 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "platform : msm-geni-se: fix voting unit for bus bandwidth"

parents a22aea40 87170d10
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,6 @@
#define SLV_ADDR_SHFT		(9)
#define SLV_ADDR_SHFT		(9)


#define I2C_PACK_EN		(BIT(0) | BIT(1))
#define I2C_PACK_EN		(BIT(0) | BIT(1))
#define I2C_CORE2X_VOTE		(960)
#define GP_IRQ0			0
#define GP_IRQ0			0
#define GP_IRQ1			1
#define GP_IRQ1			1
#define GP_IRQ2			2
#define GP_IRQ2			2
+0 −3
Original line number Original line Diff line number Diff line
@@ -189,9 +189,6 @@ enum geni_i3c_err_code {
#define PACKING_BYTES_PW	4
#define PACKING_BYTES_PW	4
#define XFER_TIMEOUT		HZ
#define XFER_TIMEOUT		HZ
#define DFS_INDEX_MAX		7
#define DFS_INDEX_MAX		7
#define I3C_CORE2X_VOTE		(960)
#define DEFAULT_BUS_WIDTH	(4)
#define DEFAULT_SE_CLK		(19200000)


#define I3C_DDR_READ_CMD BIT(7)
#define I3C_DDR_READ_CMD BIT(7)
#define I3C_ADDR_MASK	0x7f
#define I3C_ADDR_MASK	0x7f
+2 −2
Original line number Original line Diff line number Diff line
@@ -76,11 +76,11 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm, bool init)
			agg_peak[bucket] = max(agg_peak[bucket], temp);
			agg_peak[bucket] = max(agg_peak[bucket], temp);
		}
		}


		temp = agg_avg[bucket] * 1000ULL;
		temp = agg_avg[bucket] * bcm->vote_scale;
		do_div(temp, le32_to_cpu(bcm->aux_data.unit));
		do_div(temp, le32_to_cpu(bcm->aux_data.unit));
		bcm->vote_x[bucket] = temp;
		bcm->vote_x[bucket] = temp;


		temp = agg_peak[bucket] * 1000ULL;
		temp = agg_peak[bucket] * bcm->vote_scale;
		do_div(temp, le32_to_cpu(bcm->aux_data.unit));
		do_div(temp, le32_to_cpu(bcm->aux_data.unit));
		bcm->vote_y[bucket] = temp;
		bcm->vote_y[bucket] = temp;
	}
	}
+3 −0
Original line number Original line Diff line number Diff line
@@ -150,6 +150,9 @@ int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev)
	INIT_LIST_HEAD(&bcm->list);
	INIT_LIST_HEAD(&bcm->list);
	INIT_LIST_HEAD(&bcm->ws_list);
	INIT_LIST_HEAD(&bcm->ws_list);


	if (!bcm->vote_scale)
		bcm->vote_scale = 1000;

	/*
	/*
	 * Link Qnodes to their respective BCMs
	 * Link Qnodes to their respective BCMs
	 */
	 */
+2 −0
Original line number Original line Diff line number Diff line
@@ -89,6 +89,7 @@ struct qcom_icc_node {
 * @addr: address offsets used when voting to RPMH
 * @addr: address offsets used when voting to RPMH
 * @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm
 * @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_y: aggregated threshold values, represents peak_bw when @type is bw bcm
 * @vote_scale: scaling factor for vote_x and vote_y
 * @dirty: flag used to indicate whether the bcm needs to be committed
 * @dirty: flag used to indicate whether the bcm needs to be committed
 * @keepalive: flag used to indicate whether a keepalive is required
 * @keepalive: flag used to indicate whether a keepalive is required
 * @aux_data: auxiliary data used when calculating threshold values and
 * @aux_data: auxiliary data used when calculating threshold values and
@@ -104,6 +105,7 @@ struct qcom_icc_bcm {
	u32 addr;
	u32 addr;
	u64 vote_x[QCOM_ICC_NUM_BUCKETS];
	u64 vote_x[QCOM_ICC_NUM_BUCKETS];
	u64 vote_y[QCOM_ICC_NUM_BUCKETS];
	u64 vote_y[QCOM_ICC_NUM_BUCKETS];
	u64 vote_scale;
	bool dirty;
	bool dirty;
	bool keepalive;
	bool keepalive;
	struct bcm_db aux_data;
	struct bcm_db aux_data;
Loading