mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Merge branches 'misc' and 'sa1111-base' into for-linus
This commit is contained in:
commit
301a36fa70
1370 changed files with 15591 additions and 8121 deletions
|
|
@ -74,6 +74,8 @@ static const struct of_device_id machines[] __initconst = {
|
|||
{ .compatible = "ti,omap5", },
|
||||
|
||||
{ .compatible = "xlnx,zynq-7000", },
|
||||
|
||||
{ }
|
||||
};
|
||||
|
||||
static int __init cpufreq_dt_platdev_init(void)
|
||||
|
|
|
|||
|
|
@ -145,11 +145,30 @@ static struct powernv_pstate_info {
|
|||
/* Use following macros for conversions between pstate_id and index */
|
||||
static inline int idx_to_pstate(unsigned int i)
|
||||
{
|
||||
if (unlikely(i >= powernv_pstate_info.nr_pstates)) {
|
||||
pr_warn_once("index %u is out of bound\n", i);
|
||||
return powernv_freqs[powernv_pstate_info.nominal].driver_data;
|
||||
}
|
||||
|
||||
return powernv_freqs[i].driver_data;
|
||||
}
|
||||
|
||||
static inline unsigned int pstate_to_idx(int pstate)
|
||||
{
|
||||
int min = powernv_freqs[powernv_pstate_info.min].driver_data;
|
||||
int max = powernv_freqs[powernv_pstate_info.max].driver_data;
|
||||
|
||||
if (min > 0) {
|
||||
if (unlikely((pstate < max) || (pstate > min))) {
|
||||
pr_warn_once("pstate %d is out of bound\n", pstate);
|
||||
return powernv_pstate_info.nominal;
|
||||
}
|
||||
} else {
|
||||
if (unlikely((pstate > max) || (pstate < min))) {
|
||||
pr_warn_once("pstate %d is out of bound\n", pstate);
|
||||
return powernv_pstate_info.nominal;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* abs() is deliberately used so that is works with
|
||||
* both monotonically increasing and decreasing
|
||||
|
|
@ -593,7 +612,7 @@ void gpstate_timer_handler(unsigned long data)
|
|||
} else {
|
||||
gpstate_idx = calc_global_pstate(gpstates->elapsed_time,
|
||||
gpstates->highest_lpstate_idx,
|
||||
freq_data.pstate_id);
|
||||
gpstates->last_lpstate_idx);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue