-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: imx: cpuidle: use init/exit common routine
The code intializes the cpuidle driver at different places. The cpuidle driver for : * imx5 : is in the pm-imx5.c, the init function is in cpuidle.c * imx6 : is in cpuidle-imx6q.c, the init function is in cpuidle.c and cpuidle-imx6q.c Instead of having the cpuidle code spread across different files, let's create a driver for each SoC and use the common register function. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
- Loading branch information
Daniel Lezcano
authored and
Rafael J. Wysocki
committed
Apr 23, 2013
1 parent
3aec034
commit 54a4644
Showing
6 changed files
with
44 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2012 Freescale Semiconductor, Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/cpuidle.h> | ||
#include <linux/module.h> | ||
#include <asm/system_misc.h> | ||
|
||
static int imx5_cpuidle_enter(struct cpuidle_device *dev, | ||
struct cpuidle_driver *drv, int index) | ||
{ | ||
arm_pm_idle(); | ||
return index; | ||
} | ||
|
||
static struct cpuidle_driver imx5_cpuidle_driver = { | ||
.name = "imx5_cpuidle", | ||
.owner = THIS_MODULE, | ||
.states[0] = { | ||
.enter = imx5_cpuidle_enter, | ||
.exit_latency = 2, | ||
.target_residency = 1, | ||
.flags = CPUIDLE_FLAG_TIME_VALID, | ||
.name = "IMX5 SRPG", | ||
.desc = "CPU state retained,powered off", | ||
}, | ||
.state_count = 1, | ||
}; | ||
|
||
int __init imx5_cpuidle_init(void) | ||
{ | ||
return cpuidle_register(&imx5_cpuidle_driver, NULL); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters