Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298015
b: refs/heads/master
c: ee807dd
h: refs/heads/master
i:
  298013: 31c1c2f
  298011: b482aec
  298007: c93ce8e
  297999: 0808bac
  297983: d5e8fd9
v: v3
  • Loading branch information
Robert Lee authored and Len Brown committed Mar 21, 2012
1 parent d6a3b4d commit 97bf5f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d13e9261ac026f90cccac1e6de3978fb18d4af7b
refs/heads/master: ee807dd89c0003a5cc0ec961132cd83542e5c30c
31 changes: 7 additions & 24 deletions trunk/arch/arm/mach-shmobile/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/module.h>
#include <linux/err.h>
#include <asm/system.h>
#include <asm/cpuidle.h>
#include <asm/io.h>

static void shmobile_enter_wfi(void)
Expand All @@ -29,37 +30,19 @@ static int shmobile_cpuidle_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
ktime_t before, after;

before = ktime_get();

local_irq_disable();
local_fiq_disable();

shmobile_cpuidle_modes[index]();

local_irq_enable();
local_fiq_enable();

after = ktime_get();
dev->last_residency = ktime_to_ns(ktime_sub(after, before)) >> 10;

return index;
}

static struct cpuidle_device shmobile_cpuidle_dev;
static struct cpuidle_driver shmobile_cpuidle_driver = {
.name = "shmobile_cpuidle",
.owner = THIS_MODULE,
.states[0] = {
.name = "C1",
.desc = "WFI",
.exit_latency = 1,
.target_residency = 1 * 2,
.flags = CPUIDLE_FLAG_TIME_VALID,
},
.safe_state_index = 0, /* C1 */
.state_count = 1,
.name = "shmobile_cpuidle",
.owner = THIS_MODULE,
.en_core_tk_irqen = 1,
.states[0] = ARM_CPUIDLE_WFI_STATE,
.safe_state_index = 0, /* C1 */
.state_count = 1,
};

void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv);
Expand Down

0 comments on commit 97bf5f8

Please sign in to comment.