diff options
author | Olof Johansson <olof@lixom.net> | 2019-06-25 15:51:56 +0300 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2019-06-25 15:51:56 +0300 |
commit | a7d881464194920a04fb9b8c324877b32fd58a1f (patch) | |
tree | eb9807c2c3237d43b31d410a6d8982b83c99b1f2 /arch/arm | |
parent | f7fd41afa15de2555ccf352b1849ab9c37d1ec33 (diff) | |
parent | a5a9dffcc9034ec244f68ead4e61c80965cc8d2d (diff) | |
download | linux-a7d881464194920a04fb9b8c324877b32fd58a1f.tar.xz |
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/cpuidle-imx6q.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx7d.c | 7 |
2 files changed, 12 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 326e870d7123..d9ac80aa1eb0 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c @@ -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; } diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c index 26ca744d3e2b..0b77412795c9 100644 --- a/arch/arm/mach-imx/mach-imx7d.c +++ b/arch/arm/mach-imx/mach-imx7d.c @@ -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 |