diff options
author | Jon Medhurst <tixy@linaro.org> | 2017-04-20 16:29:51 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2017-04-20 16:29:51 +0100 |
commit | 184b341e4a6dca0b31d90e38c76ec7425a68f4ae (patch) | |
tree | 2118cc2f1390ec4b468f2fb08576d702c51241a8 | |
parent | 71afea5c1f09e8aca8d5adeb166f47416d6c5daa (diff) | |
parent | 9b04aabff44bfe8606845e2002dbaf03cf8b0094 (diff) |
Merge branch '4.4-armlt-hacks' into lsk-4.4-armltlsk-4.4-armlt-20170420
-rw-r--r-- | drivers/firmware/arm_scpi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index 900b6a2f4972..c1d25bf3296c 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -472,6 +472,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; @@ -511,6 +513,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; } @@ -706,6 +716,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; |