mirror of https://gitee.com/openkylin/linux.git
i.MX SoC changes for 5.3:
- Switch imx7d to imx-cpufreq-dt for speed-grading, as imx-cpufreq-dt driver can handle speed grading bits on imx7d just like on imx8mq. - Improve imx6 cpuidle driver to use raw_spinlock_t. The change makes no difference for !RT build, but is required by RT kernel. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJdEYN8AAoJEFBXWFqHsHzOvrsIAKfzDNOwAHHNhMDAGotG7F7w qdfKYVawDCWXSPeNegS690/i+yT3HBrcmV3biyGR2DeI3NvOpi2s/x7eft44uSj5 ssWDe2hLQnFJedS06G0AiQLnKywEnJ7lZc2QVetbGQ+Gqb04kbqiTzSz3xqBBhYo PWufierLPOJQ0BkjG6NIRrBr+vwVCVrYOg9aNWnfB5nNYTafCXooKd0N3ic7b77H wDnh8lT7EtVegoiVsj0z/+v8WhdRAu2WOYjQWnsaxVnScpMAtX71pcwaxSIUcSd8 dubImY3ZWUeAyBs2HLGwm9SNThNEyc4DHlf9gyVa6+v8jZI9pIPmIldsmPcJYzI= =5B7k -----END PGP SIGNATURE----- Merge tag 'imx-soc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC changes for 5.3: - Switch imx7d to imx-cpufreq-dt for speed-grading, as imx-cpufreq-dt driver can handle speed grading bits on imx7d just like on imx8mq. - Improve imx6 cpuidle driver to use raw_spinlock_t. The change makes no difference for !RT build, but is required by RT kernel. * tag 'imx-soc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Switch imx7d to imx-cpufreq-dt for speed-grading ARM: imx6: cpuidle: Use raw_spinlock_t Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
a7d8814641
|
@ -17,22 +17,22 @@
|
|||
#include "hardware.h"
|
||||
|
||||
static int num_idle_cpus = 0;
|
||||
static DEFINE_SPINLOCK(cpuidle_lock);
|
||||
static DEFINE_RAW_SPINLOCK(cpuidle_lock);
|
||||
|
||||
static int imx6q_enter_wait(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv, int index)
|
||||
{
|
||||
spin_lock(&cpuidle_lock);
|
||||
raw_spin_lock(&cpuidle_lock);
|
||||
if (++num_idle_cpus == num_online_cpus())
|
||||
imx6_set_lpm(WAIT_UNCLOCKED);
|
||||
spin_unlock(&cpuidle_lock);
|
||||
raw_spin_unlock(&cpuidle_lock);
|
||||
|
||||
cpu_do_idle();
|
||||
|
||||
spin_lock(&cpuidle_lock);
|
||||
raw_spin_lock(&cpuidle_lock);
|
||||
if (num_idle_cpus-- == num_online_cpus())
|
||||
imx6_set_lpm(WAIT_CLOCKED);
|
||||
spin_unlock(&cpuidle_lock);
|
||||
raw_spin_unlock(&cpuidle_lock);
|
||||
|
||||
return index;
|
||||
}
|
||||
|
|
|
@ -97,6 +97,12 @@ static void __init imx7d_init_machine(void)
|
|||
imx7d_enet_init();
|
||||
}
|
||||
|
||||
static void __init imx7d_init_late(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_ARM_IMX_CPUFREQ_DT))
|
||||
platform_device_register_simple("imx-cpufreq-dt", -1, NULL, 0);
|
||||
}
|
||||
|
||||
static void __init imx7d_init_irq(void)
|
||||
{
|
||||
imx_init_revision_from_anatop();
|
||||
|
@ -113,5 +119,6 @@ static const char *const imx7d_dt_compat[] __initconst = {
|
|||
DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
|
||||
.init_irq = imx7d_init_irq,
|
||||
.init_machine = imx7d_init_machine,
|
||||
.init_late = imx7d_init_late,
|
||||
.dt_compat = imx7d_dt_compat,
|
||||
MACHINE_END
|
||||
|
|
Loading…
Reference in New Issue