forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/sh/kernel/cpu/shmobile/cpuidle.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * arch/sh/kernel/cpu/shmobile/cpuidle.c
34 *
45 * Cpuidle support code for SuperH Mobile
56 *
67 * Copyright (C) 2009 Magnus Damm
7
- *
8
- * This file is subject to the terms and conditions of the GNU General Public
9
- * License. See the file "COPYING" in the main directory of this archive
10
- * for more details.
118 */
129 #include <linux/init.h>
1310 #include <linux/kernel.h>
....@@ -70,7 +67,7 @@
7067 .enter = cpuidle_sleep_enter,
7168 .name = "C2",
7269 .desc = "SuperH Sleep Mode [SF]",
73
- .disabled = true,
70
+ .flags = CPUIDLE_FLAG_UNUSABLE,
7471 },
7572 {
7673 .exit_latency = 2300,
....@@ -79,7 +76,7 @@
7976 .enter = cpuidle_sleep_enter,
8077 .name = "C3",
8178 .desc = "SuperH Mobile Standby Mode [SF]",
82
- .disabled = true,
79
+ .flags = CPUIDLE_FLAG_UNUSABLE,
8380 },
8481 },
8582 .safe_state_index = 0,
....@@ -89,10 +86,10 @@
8986 int __init sh_mobile_setup_cpuidle(void)
9087 {
9188 if (sh_mobile_sleep_supported & SUSP_SH_SF)
92
- cpuidle_driver.states[1].disabled = false;
89
+ cpuidle_driver.states[1].flags = CPUIDLE_FLAG_NONE;
9390
9491 if (sh_mobile_sleep_supported & SUSP_SH_STANDBY)
95
- cpuidle_driver.states[2].disabled = false;
92
+ cpuidle_driver.states[2].flags = CPUIDLE_FLAG_NONE;
9693
9794 return cpuidle_register(&cpuidle_driver, NULL);
9895 }