mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ARM: SoC driver updates
These are changes for drivers that are intimately tied to some SoC and for some reason could not get merged through the respective subsystem maintainer tree. This time around, much of this is for at91, with the bulk of it being syscon and udc drivers. Also, there's: - coupled cpuidle support for Samsung Exynos4210 - Renesas 73A0 common-clk work - of/platform changes to tear down DMA mappings on device destruction - a few updates to the TI Keystone knav code -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJU4upSAAoJEIwa5zzehBx3HkUP/Rc4B1yZChNIFNfVq4dbei6w dT9WdFmxOIj2JLeXEypFBiNf1nSHmsxrZe9/IDACz2fYQOnaZZ6/786utUJP/PtC 2GDJy9cjL2Xh03We3nQp5z6J33XvpEni1t82cOpCl8wLBOQNnkjEks8UvLgi1LHW CNLcMm8JtDQ2aB/gRTjzetp9liZluESY5+Mig+loE2F/rzbMbNQDcWDDgUPyIQIS 1onL+Bad3BnGFdo/+qnkurGc81pxoKiQJty06VWFftzvIwxXhsNjrqls2+KzstAx 0lLvW1tqaDhXvUBImRM8GgfbldZslsgoFVmgESS9MpPMBNENYrkAiQNvJUnM7kd9 qHDQNq+zRNsz/k4fVvp/YUp7xEiAo4rLcFmp/dBr535jS2LNyiZnB94q+kXsin/m tiyEMx+RWxEHTEHN9WdKE61Ty1RbzOa5UTLSzOKFAkF+m2nvuQsJvb97n19coAq9 SSsj/wJgesfqrDEegphCDh1fyVxUzlAjjhTAyvPS155WvPzkbxZxuBbSqRuriRKA 2aCfVne2ELimHAr3LEPgPW2kFBcONHckOGe6MvrTX4zPHU8bb9WIeg+iGdQChnr3 nclT9jq+ZnQro5XTgUtPtadq100oEXlJbqpAzhd+cJbvgzSNbcWfcgE6kOWqd9uK oeWQWFLCdXLmXf9zCwmk =T7R2 -----END PGP SIGNATURE----- Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "These are changes for drivers that are intimately tied to some SoC and for some reason could not get merged through the respective subsystem maintainer tree. This time around, much of this is for at91, with the bulk of it being syscon and udc drivers. Also, there's: - coupled cpuidle support for Samsung Exynos4210 - Renesas 73A0 common-clk work - of/platform changes to tear down DMA mappings on device destruction - a few updates to the TI Keystone knav code" * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (26 commits) cpuidle: exynos: add coupled cpuidle support for exynos4210 ARM: EXYNOS: apply S5P_CENTRAL_SEQ_OPTION fix only when necessary soc: ti: knav_qmss_queue: change knav_range_setup_acc_irq to static soc: ti: knav_qmss_queue: makefile tweak to build as dynamic module pcmcia: at91_cf: depend on !ARCH_MULTIPLATFORM soc: ti: knav_qmss_queue: export API calls for use by user driver of/platform: teardown DMA mappings on device destruction usb: gadget: at91_udc: Allocate udc instance usb: gadget: at91_udc: Update DT binding documentation usb: gadget: at91_udc: Rework for multi-platform kernel support usb: gadget: at91_udc: Simplify probe and remove functions usb: gadget: at91_udc: Remove non-DT handling code usb: gadget: at91_udc: Document DT clocks and clock-names property usb: gadget: at91_udc: Drop uclk clock usb: gadget: at91_udc: Fix clock names mfd: syscon: Add Atmel SMC binding doc mfd: syscon: Add atmel-smc registers definition mfd: syscon: Add Atmel Matrix bus DT binding documentation mfd: syscon: Add atmel-matrix registers definition clk: shmobile: fix sparse NULL pointer warning ...
This commit is contained in:
commit
18656782a8
28 changed files with 1570 additions and 268 deletions
|
|
@ -55,6 +55,7 @@ config ARM_AT91_CPUIDLE
|
|||
config ARM_EXYNOS_CPUIDLE
|
||||
bool "Cpu Idle Driver for the Exynos processors"
|
||||
depends on ARCH_EXYNOS
|
||||
select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
|
||||
help
|
||||
Select this to enable cpuidle for Exynos processors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
/* linux/arch/arm/mach-exynos/cpuidle.c
|
||||
*
|
||||
* Copyright (c) 2011 Samsung Electronics Co., Ltd.
|
||||
/*
|
||||
* Copyright (c) 2011-2014 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Coupled cpuidle support based on the work of:
|
||||
* Colin Cross <ccross@android.com>
|
||||
* Daniel Lezcano <daniel.lezcano@linaro.org>
|
||||
*
|
||||
* 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
|
||||
* published by the Free Software Foundation.
|
||||
|
|
@ -13,13 +16,49 @@
|
|||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_data/cpuidle-exynos.h>
|
||||
|
||||
#include <asm/proc-fns.h>
|
||||
#include <asm/suspend.h>
|
||||
#include <asm/cpuidle.h>
|
||||
|
||||
static atomic_t exynos_idle_barrier;
|
||||
|
||||
static struct cpuidle_exynos_data *exynos_cpuidle_pdata;
|
||||
static void (*exynos_enter_aftr)(void);
|
||||
|
||||
static int exynos_enter_coupled_lowpower(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv,
|
||||
int index)
|
||||
{
|
||||
int ret;
|
||||
|
||||
exynos_cpuidle_pdata->pre_enter_aftr();
|
||||
|
||||
/*
|
||||
* Waiting all cpus to reach this point at the same moment
|
||||
*/
|
||||
cpuidle_coupled_parallel_barrier(dev, &exynos_idle_barrier);
|
||||
|
||||
/*
|
||||
* Both cpus will reach this point at the same time
|
||||
*/
|
||||
ret = dev->cpu ? exynos_cpuidle_pdata->cpu1_powerdown()
|
||||
: exynos_cpuidle_pdata->cpu0_enter_aftr();
|
||||
if (ret)
|
||||
index = ret;
|
||||
|
||||
/*
|
||||
* Waiting all cpus to finish the power sequence before going further
|
||||
*/
|
||||
cpuidle_coupled_parallel_barrier(dev, &exynos_idle_barrier);
|
||||
|
||||
exynos_cpuidle_pdata->post_enter_aftr();
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
static int exynos_enter_lowpower(struct cpuidle_device *dev,
|
||||
struct cpuidle_driver *drv,
|
||||
int index)
|
||||
|
|
@ -55,13 +94,40 @@ static struct cpuidle_driver exynos_idle_driver = {
|
|||
.safe_state_index = 0,
|
||||
};
|
||||
|
||||
static struct cpuidle_driver exynos_coupled_idle_driver = {
|
||||
.name = "exynos_coupled_idle",
|
||||
.owner = THIS_MODULE,
|
||||
.states = {
|
||||
[0] = ARM_CPUIDLE_WFI_STATE,
|
||||
[1] = {
|
||||
.enter = exynos_enter_coupled_lowpower,
|
||||
.exit_latency = 5000,
|
||||
.target_residency = 10000,
|
||||
.flags = CPUIDLE_FLAG_COUPLED |
|
||||
CPUIDLE_FLAG_TIMER_STOP,
|
||||
.name = "C1",
|
||||
.desc = "ARM power down",
|
||||
},
|
||||
},
|
||||
.state_count = 2,
|
||||
.safe_state_index = 0,
|
||||
};
|
||||
|
||||
static int exynos_cpuidle_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
exynos_enter_aftr = (void *)(pdev->dev.platform_data);
|
||||
if (of_machine_is_compatible("samsung,exynos4210")) {
|
||||
exynos_cpuidle_pdata = pdev->dev.platform_data;
|
||||
|
||||
ret = cpuidle_register(&exynos_coupled_idle_driver,
|
||||
cpu_possible_mask);
|
||||
} else {
|
||||
exynos_enter_aftr = (void *)(pdev->dev.platform_data);
|
||||
|
||||
ret = cpuidle_register(&exynos_idle_driver, NULL);
|
||||
}
|
||||
|
||||
ret = cpuidle_register(&exynos_idle_driver, NULL);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to register cpuidle driver\n");
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue