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

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

Merge "PM / devfreq: Update the devfreq to take LUT table size"

parents 2b4f7de9 16ef1739
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ struct devfreq_qcom_fw {
};

static DEFINE_SPINLOCK(voter_lock);
static unsigned int ftbl_row_size = FTBL_ROW_SIZE;

static int devfreq_qcom_fw_target(struct device *dev, unsigned long *freq,
				  u32 flags)
@@ -118,8 +119,11 @@ static int devfreq_qcom_populate_opp(struct platform_device *pdev)
		return -ENOMEM;
	}

	of_property_read_u32(pdev->dev.of_node, "qcom,ftbl-row-size",
						     &ftbl_row_size);

	for (i = 0; i < FTBL_MAX_ENTRIES; i++) {
		data = readl_relaxed(ftbl_base + i * FTBL_ROW_SIZE);
		data = readl_relaxed(ftbl_base + i * ftbl_row_size);
		src = ((data & SRC_MASK) >> SRC_SHIFT);
		mult = (data & MULT_MASK);
		freq = src ? XO_HZ * mult : INIT_HZ;