summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Gu <gucheng@google.com>2019-05-22 12:38:53 -0700
committerCheng Gu <gucheng@google.com>2019-06-27 14:32:52 -0700
commit7de99f080e17c66de83f4875821794859577bf56 (patch)
treee453904926b4ee955a55068280dd45441c4608c2
parentab3e9d2f3f5160cc1ea426179ca6cb0ef3bc0067 (diff)
downloadarm64-android-amber-intel-linux-4.7-r-preview-1.tar.gz
FSP0 is a boot frequency and is not supported to be switched at runtime. Overwirte all FSP0 requests to be FSP1. Bug: 133340008 Change-Id: I0e66d241ff5ca99fe9a0afcc2e1000512fb2517b Signed-off-by: Cheng Gu <gucheng@google.com>
-rw-r--r--drivers/thermal/mnh-clk.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/thermal/mnh-clk.c b/drivers/thermal/mnh-clk.c
index 97d0c6f3124e..81f8815e705a 100644
--- a/drivers/thermal/mnh-clk.c
+++ b/drivers/thermal/mnh-clk.c
@@ -1065,6 +1065,7 @@ int mnh_ddr_adjust_refresh_suspend(void)
* just like cold-boot case.
*/
previous_refresh_rate = INIT_REFRESH_RATE;
+
return 1;
}
@@ -1766,6 +1767,13 @@ static ssize_t lpddr_sw_freq_set(struct device *dev,
return ret;
dev_dbg(mnh_dev->dev, "%s: %d\n", __func__, fsp);
+ /*
+ * FSP0 is not recommended in runtime.
+ * Use FSP1 instead if FSP0 is requested.
+ */
+ if (fsp == LPDDR_FREQ_FSP0)
+ fsp = LPDDR_FREQ_FSP1;
+
ret = mnh_lpddr_sw_freq_change(fsp);
return count;
@@ -1939,6 +1947,7 @@ static irqreturn_t mnh_pm_handle_ddr_irq(int irq, void *dev_id)
/* return interrupt handled */
return IRQ_HANDLED;
}
+
int mnh_clk_init(struct platform_device *pdev, void __iomem *baseadress)
{
int ret = 0, err = 0;