cpuidle-calxeda.c (527c465a3c8716d93201ae34b7fc52679610596d) | cpuidle-calxeda.c (be120397e7709d9d5ed88317a385ce864a2603bc) |
---|---|
1/* 2 * Copyright 2012 Calxeda, Inc. 3 * 4 * Based on arch/arm/plat-mxc/cpuidle.c: #v3.7 5 * Copyright 2012 Freescale Semiconductor, Inc. 6 * Copyright 2012 Linaro Ltd. 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 11 unchanged lines hidden (view full) --- 20 * Maintainer: Rob Herring <rob.herring@calxeda.com> 21 */ 22 23#include <linux/cpuidle.h> 24#include <linux/cpu_pm.h> 25#include <linux/init.h> 26#include <linux/mm.h> 27#include <linux/platform_device.h> | 1/* 2 * Copyright 2012 Calxeda, Inc. 3 * 4 * Based on arch/arm/plat-mxc/cpuidle.c: #v3.7 5 * Copyright 2012 Freescale Semiconductor, Inc. 6 * Copyright 2012 Linaro Ltd. 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 11 unchanged lines hidden (view full) --- 20 * Maintainer: Rob Herring <rob.herring@calxeda.com> 21 */ 22 23#include <linux/cpuidle.h> 24#include <linux/cpu_pm.h> 25#include <linux/init.h> 26#include <linux/mm.h> 27#include <linux/platform_device.h> |
28#include <linux/psci.h> 29 |
|
28#include <asm/cpuidle.h> 29#include <asm/suspend.h> | 30#include <asm/cpuidle.h> 31#include <asm/suspend.h> |
30#include <asm/psci.h> | |
31 | 32 |
33#include <uapi/linux/psci.h> 34 35#define CALXEDA_IDLE_PARAM \ 36 ((0 << PSCI_0_2_POWER_STATE_ID_SHIFT) | \ 37 (0 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) | \ 38 (PSCI_POWER_STATE_TYPE_POWER_DOWN << PSCI_0_2_POWER_STATE_TYPE_SHIFT)) 39 |
|
32static int calxeda_idle_finish(unsigned long val) 33{ | 40static int calxeda_idle_finish(unsigned long val) 41{ |
34 const struct psci_power_state ps = { 35 .type = PSCI_POWER_STATE_TYPE_POWER_DOWN, 36 }; 37 return psci_ops.cpu_suspend(ps, __pa(cpu_resume)); | 42 return psci_ops.cpu_suspend(CALXEDA_IDLE_PARAM, __pa(cpu_resume)); |
38} 39 40static int calxeda_pwrdown_idle(struct cpuidle_device *dev, 41 struct cpuidle_driver *drv, 42 int index) 43{ 44 cpu_pm_enter(); 45 cpu_suspend(0, calxeda_idle_finish); --- 33 unchanged lines hidden --- | 43} 44 45static int calxeda_pwrdown_idle(struct cpuidle_device *dev, 46 struct cpuidle_driver *drv, 47 int index) 48{ 49 cpu_pm_enter(); 50 cpu_suspend(0, calxeda_idle_finish); --- 33 unchanged lines hidden --- |