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

Commit b88a1076 authored by Sekhar Nori's avatar Sekhar Nori
Browse files

Merge branch 'v4.11/fixes-non-critical' into v4.11/soc

This merge is because patches in branch v4.11/soc conflict
with cleanup done as part of 0a501167 ("ARM: davinci:
da850: coding style fix") that is already queued as a
non-critical fix.
parents 57a66aaf 430d7dd4
Loading
Loading
Loading
Loading
+19 −5
Original line number Diff line number Diff line
@@ -1174,14 +1174,28 @@ static int da850_set_armrate(struct clk *clk, unsigned long index)
	return clk_set_rate(pllclk, index);
}

static int da850_set_pll0rate(struct clk *clk, unsigned long index)
static int da850_set_pll0rate(struct clk *clk, unsigned long rate)
{
	unsigned int prediv, mult, postdiv;
	struct da850_opp *opp;
	struct pll_data *pll = clk->pll_data;
	struct cpufreq_frequency_table *freq;
	unsigned int prediv, mult, postdiv;
	struct da850_opp *opp = NULL;
	int ret;

	opp = (struct da850_opp *) cpufreq_info.freq_table[index].driver_data;
	rate /= 1000;

	for (freq = da850_freq_table;
	     freq->frequency != CPUFREQ_TABLE_END; freq++) {
		/* rate is in Hz, freq->frequency is in KHz */
		if (freq->frequency == rate) {
			opp = (struct da850_opp *)freq->driver_data;
			break;
		}
	}

	if (!opp)
		return -EINVAL;

	prediv = opp->prediv;
	mult = opp->mult;
	postdiv = opp->postdiv;
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * Copyright (C) 2016 BayLibre SAS
 *
 * Author:
 *   Bartosz Golaszewski <bgolaszewski@baylibre.com.com>
 *   Bartosz Golaszewski <bgolaszewski@baylibre.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static int davinci_target(struct cpufreq_policy *policy, unsigned int idx)
			return ret;
	}

	ret = clk_set_rate(armclk, idx);
	ret = clk_set_rate(armclk, new_freq * 1000);
	if (ret)
		return ret;