aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2017-04-20 16:32:07 +0100
committerJon Medhurst <tixy@linaro.org>2017-04-20 16:32:07 +0100
commit71322b9ba0dd4c17d65c133f9c4778a7126e6e83 (patch)
tree590c8709405bc7ad3a9637774de8f6b77f66ee83
parent4e779ccb69b602a396eef4df2d37ec08634aac1f (diff)
parentfdfb523290b7efbb70b75b67c07d69d02dc35126 (diff)
Merge branch 'latest-armlt-juno' into latest-armltlatest-armlt-20170420
-rw-r--r--drivers/firmware/arm_scpi.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c
index d891ec00d3e9..8c6ebc972cf6 100644
--- a/drivers/firmware/arm_scpi.c
+++ b/drivers/firmware/arm_scpi.c
@@ -659,6 +659,8 @@ static int opp_cmp_func(const void *opp1, const void *opp2)
return t1->freq - t2->freq;
}
+static bool juno_cpufreq_limit_hack = 0;
+
static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain)
{
struct scpi_dvfs_info *info;
@@ -697,6 +699,14 @@ static struct scpi_dvfs_info *scpi_dvfs_get_info(u8 domain)
sort(info->opps, info->count, sizeof(*opp), opp_cmp_func, NULL);
+ /*
+ * Juno silicon doesn't seem to be able to run the big cluster
+ * (domain == 0) at max frequency in AArch32 mode (it produces
+ * random and weird crashes) so drop the highest OPP in that case...
+ */
+ if (juno_cpufreq_limit_hack && domain == 0)
+ --info->count;
+
scpi_info->dvfs[domain] = info;
return info;
}
@@ -907,6 +917,10 @@ static int scpi_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
+ if (IS_ENABLED(CONFIG_ARM) && of_find_compatible_node(NULL,NULL,"arm,juno")) {
+ juno_cpufreq_limit_hack = true;
+ }
+
scpi_info = devm_kzalloc(dev, sizeof(*scpi_info), GFP_KERNEL);
if (!scpi_info)
return -ENOMEM;