cpuidle34xx.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. /*
  2. * linux/arch/arm/mach-omap2/cpuidle34xx.c
  3. *
  4. * OMAP3 CPU IDLE Routines
  5. *
  6. * Copyright (C) 2008 Texas Instruments, Inc.
  7. * Rajendra Nayak <rnayak@ti.com>
  8. *
  9. * Copyright (C) 2007 Texas Instruments, Inc.
  10. * Karthik Dasu <karthik-dp@ti.com>
  11. *
  12. * Copyright (C) 2006 Nokia Corporation
  13. * Tony Lindgren <tony@atomide.com>
  14. *
  15. * Copyright (C) 2005 Texas Instruments, Inc.
  16. * Richard Woodruff <r-woodruff2@ti.com>
  17. *
  18. * Based on pm.c for omap2
  19. *
  20. * This program is free software; you can redistribute it and/or modify
  21. * it under the terms of the GNU General Public License version 2 as
  22. * published by the Free Software Foundation.
  23. */
  24. #include <linux/sched.h>
  25. #include <linux/cpuidle.h>
  26. #include <plat/prcm.h>
  27. #include <plat/irqs.h>
  28. #include "powerdomain.h"
  29. #include "clockdomain.h"
  30. #include <plat/serial.h>
  31. #include "pm.h"
  32. #include "control.h"
  33. #ifdef CONFIG_CPU_IDLE
  34. #define OMAP3_MAX_STATES 7
  35. #define OMAP3_STATE_C1 0 /* C1 - MPU WFI + Core active */
  36. #define OMAP3_STATE_C2 1 /* C2 - MPU WFI + Core inactive */
  37. #define OMAP3_STATE_C3 2 /* C3 - MPU CSWR + Core inactive */
  38. #define OMAP3_STATE_C4 3 /* C4 - MPU OFF + Core iactive */
  39. #define OMAP3_STATE_C5 4 /* C5 - MPU RET + Core RET */
  40. #define OMAP3_STATE_C6 5 /* C6 - MPU OFF + Core RET */
  41. #define OMAP3_STATE_C7 6 /* C7 - MPU OFF + Core OFF */
  42. #define OMAP3_STATE_MAX OMAP3_STATE_C7
  43. #define CPUIDLE_FLAG_CHECK_BM 0x10000 /* use omap3_enter_idle_bm() */
  44. struct omap3_processor_cx {
  45. u8 valid;
  46. u8 type;
  47. u32 sleep_latency;
  48. u32 wakeup_latency;
  49. u32 mpu_state;
  50. u32 core_state;
  51. u32 threshold;
  52. u32 flags;
  53. };
  54. struct omap3_processor_cx omap3_power_states[OMAP3_MAX_STATES];
  55. struct omap3_processor_cx current_cx_state;
  56. struct powerdomain *mpu_pd, *core_pd, *per_pd;
  57. struct powerdomain *cam_pd;
  58. /*
  59. * The latencies/thresholds for various C states have
  60. * to be configured from the respective board files.
  61. * These are some default values (which might not provide
  62. * the best power savings) used on boards which do not
  63. * pass these details from the board file.
  64. */
  65. static struct cpuidle_params cpuidle_params_table[] = {
  66. /* C1 */
  67. {1, 2, 2, 5},
  68. /* C2 */
  69. {1, 10, 10, 30},
  70. /* C3 */
  71. {1, 50, 50, 300},
  72. /* C4 */
  73. {1, 1500, 1800, 4000},
  74. /* C5 */
  75. {1, 2500, 7500, 12000},
  76. /* C6 */
  77. {1, 3000, 8500, 15000},
  78. /* C7 */
  79. {1, 10000, 30000, 300000},
  80. };
  81. static int omap3_idle_bm_check(void)
  82. {
  83. if (!omap3_can_sleep())
  84. return 1;
  85. return 0;
  86. }
  87. static int _cpuidle_allow_idle(struct powerdomain *pwrdm,
  88. struct clockdomain *clkdm)
  89. {
  90. omap2_clkdm_allow_idle(clkdm);
  91. return 0;
  92. }
  93. static int _cpuidle_deny_idle(struct powerdomain *pwrdm,
  94. struct clockdomain *clkdm)
  95. {
  96. omap2_clkdm_deny_idle(clkdm);
  97. return 0;
  98. }
  99. /**
  100. * omap3_enter_idle - Programs OMAP3 to enter the specified state
  101. * @dev: cpuidle device
  102. * @state: The target state to be programmed
  103. *
  104. * Called from the CPUidle framework to program the device to the
  105. * specified target state selected by the governor.
  106. */
  107. static int omap3_enter_idle(struct cpuidle_device *dev,
  108. struct cpuidle_state *state)
  109. {
  110. struct omap3_processor_cx *cx = cpuidle_get_statedata(state);
  111. struct timespec ts_preidle, ts_postidle, ts_idle;
  112. u32 mpu_state = cx->mpu_state, core_state = cx->core_state;
  113. current_cx_state = *cx;
  114. /* Used to keep track of the total time in idle */
  115. getnstimeofday(&ts_preidle);
  116. local_irq_disable();
  117. local_fiq_disable();
  118. pwrdm_set_next_pwrst(mpu_pd, mpu_state);
  119. pwrdm_set_next_pwrst(core_pd, core_state);
  120. if (omap_irq_pending() || need_resched())
  121. goto return_sleep_time;
  122. if (cx->type == OMAP3_STATE_C1) {
  123. pwrdm_for_each_clkdm(mpu_pd, _cpuidle_deny_idle);
  124. pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle);
  125. }
  126. /* Execute ARM wfi */
  127. omap_sram_idle();
  128. if (cx->type == OMAP3_STATE_C1) {
  129. pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle);
  130. pwrdm_for_each_clkdm(core_pd, _cpuidle_allow_idle);
  131. }
  132. return_sleep_time:
  133. getnstimeofday(&ts_postidle);
  134. ts_idle = timespec_sub(ts_postidle, ts_preidle);
  135. local_irq_enable();
  136. local_fiq_enable();
  137. return ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * USEC_PER_SEC;
  138. }
  139. /**
  140. * next_valid_state - Find next valid c-state
  141. * @dev: cpuidle device
  142. * @state: Currently selected c-state
  143. *
  144. * If the current state is valid, it is returned back to the caller.
  145. * Else, this function searches for a lower c-state which is still
  146. * valid (as defined in omap3_power_states[]).
  147. */
  148. static struct cpuidle_state *next_valid_state(struct cpuidle_device *dev,
  149. struct cpuidle_state *curr)
  150. {
  151. struct cpuidle_state *next = NULL;
  152. struct omap3_processor_cx *cx;
  153. cx = (struct omap3_processor_cx *)cpuidle_get_statedata(curr);
  154. /* Check if current state is valid */
  155. if (cx->valid) {
  156. return curr;
  157. } else {
  158. u8 idx = OMAP3_STATE_MAX;
  159. /*
  160. * Reach the current state starting at highest C-state
  161. */
  162. for (; idx >= OMAP3_STATE_C1; idx--) {
  163. if (&dev->states[idx] == curr) {
  164. next = &dev->states[idx];
  165. break;
  166. }
  167. }
  168. /*
  169. * Should never hit this condition.
  170. */
  171. WARN_ON(next == NULL);
  172. /*
  173. * Drop to next valid state.
  174. * Start search from the next (lower) state.
  175. */
  176. idx--;
  177. for (; idx >= OMAP3_STATE_C1; idx--) {
  178. struct omap3_processor_cx *cx;
  179. cx = cpuidle_get_statedata(&dev->states[idx]);
  180. if (cx->valid) {
  181. next = &dev->states[idx];
  182. break;
  183. }
  184. }
  185. /*
  186. * C1 and C2 are always valid.
  187. * So, no need to check for 'next==NULL' outside this loop.
  188. */
  189. }
  190. return next;
  191. }
  192. /**
  193. * omap3_enter_idle_bm - Checks for any bus activity
  194. * @dev: cpuidle device
  195. * @state: The target state to be programmed
  196. *
  197. * Used for C states with CPUIDLE_FLAG_CHECK_BM flag set. This
  198. * function checks for any pending activity and then programs the
  199. * device to the specified or a safer state.
  200. */
  201. static int omap3_enter_idle_bm(struct cpuidle_device *dev,
  202. struct cpuidle_state *state)
  203. {
  204. struct cpuidle_state *new_state = next_valid_state(dev, state);
  205. u32 core_next_state, per_next_state = 0, per_saved_state = 0;
  206. u32 cam_state;
  207. struct omap3_processor_cx *cx;
  208. int ret;
  209. if ((state->flags & CPUIDLE_FLAG_CHECK_BM) && omap3_idle_bm_check()) {
  210. BUG_ON(!dev->safe_state);
  211. new_state = dev->safe_state;
  212. goto select_state;
  213. }
  214. cx = cpuidle_get_statedata(state);
  215. core_next_state = cx->core_state;
  216. /*
  217. * FIXME: we currently manage device-specific idle states
  218. * for PER and CORE in combination with CPU-specific
  219. * idle states. This is wrong, and device-specific
  220. * idle management needs to be separated out into
  221. * its own code.
  222. */
  223. /*
  224. * Prevent idle completely if CAM is active.
  225. * CAM does not have wakeup capability in OMAP3.
  226. */
  227. cam_state = pwrdm_read_pwrst(cam_pd);
  228. if (cam_state == PWRDM_POWER_ON) {
  229. new_state = dev->safe_state;
  230. goto select_state;
  231. }
  232. /*
  233. * Prevent PER off if CORE is not in retention or off as this
  234. * would disable PER wakeups completely.
  235. */
  236. per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd);
  237. if ((per_next_state == PWRDM_POWER_OFF) &&
  238. (core_next_state > PWRDM_POWER_RET))
  239. per_next_state = PWRDM_POWER_RET;
  240. /* Are we changing PER target state? */
  241. if (per_next_state != per_saved_state)
  242. pwrdm_set_next_pwrst(per_pd, per_next_state);
  243. select_state:
  244. dev->last_state = new_state;
  245. ret = omap3_enter_idle(dev, new_state);
  246. /* Restore original PER state if it was modified */
  247. if (per_next_state != per_saved_state)
  248. pwrdm_set_next_pwrst(per_pd, per_saved_state);
  249. return ret;
  250. }
  251. DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
  252. /**
  253. * omap3_cpuidle_update_states() - Update the cpuidle states
  254. * @mpu_deepest_state: Enable states upto and including this for mpu domain
  255. * @core_deepest_state: Enable states upto and including this for core domain
  256. *
  257. * This goes through the list of states available and enables and disables the
  258. * validity of C states based on deepest state that can be achieved for the
  259. * variable domain
  260. */
  261. void omap3_cpuidle_update_states(u32 mpu_deepest_state, u32 core_deepest_state)
  262. {
  263. int i;
  264. for (i = OMAP3_STATE_C1; i < OMAP3_MAX_STATES; i++) {
  265. struct omap3_processor_cx *cx = &omap3_power_states[i];
  266. if ((cx->mpu_state >= mpu_deepest_state) &&
  267. (cx->core_state >= core_deepest_state)) {
  268. cx->valid = 1;
  269. } else {
  270. cx->valid = 0;
  271. }
  272. }
  273. }
  274. void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
  275. {
  276. int i;
  277. if (!cpuidle_board_params)
  278. return;
  279. for (i = OMAP3_STATE_C1; i < OMAP3_MAX_STATES; i++) {
  280. cpuidle_params_table[i].valid =
  281. cpuidle_board_params[i].valid;
  282. cpuidle_params_table[i].sleep_latency =
  283. cpuidle_board_params[i].sleep_latency;
  284. cpuidle_params_table[i].wake_latency =
  285. cpuidle_board_params[i].wake_latency;
  286. cpuidle_params_table[i].threshold =
  287. cpuidle_board_params[i].threshold;
  288. }
  289. return;
  290. }
  291. /* omap3_init_power_states - Initialises the OMAP3 specific C states.
  292. *
  293. * Below is the desciption of each C state.
  294. * C1 . MPU WFI + Core active
  295. * C2 . MPU WFI + Core inactive
  296. * C3 . MPU CSWR + Core inactive
  297. * C4 . MPU OFF + Core inactive
  298. * C5 . MPU CSWR + Core CSWR
  299. * C6 . MPU OFF + Core CSWR
  300. * C7 . MPU OFF + Core OFF
  301. */
  302. void omap_init_power_states(void)
  303. {
  304. /* C1 . MPU WFI + Core active */
  305. omap3_power_states[OMAP3_STATE_C1].valid =
  306. cpuidle_params_table[OMAP3_STATE_C1].valid;
  307. omap3_power_states[OMAP3_STATE_C1].type = OMAP3_STATE_C1;
  308. omap3_power_states[OMAP3_STATE_C1].sleep_latency =
  309. cpuidle_params_table[OMAP3_STATE_C1].sleep_latency;
  310. omap3_power_states[OMAP3_STATE_C1].wakeup_latency =
  311. cpuidle_params_table[OMAP3_STATE_C1].wake_latency;
  312. omap3_power_states[OMAP3_STATE_C1].threshold =
  313. cpuidle_params_table[OMAP3_STATE_C1].threshold;
  314. omap3_power_states[OMAP3_STATE_C1].mpu_state = PWRDM_POWER_ON;
  315. omap3_power_states[OMAP3_STATE_C1].core_state = PWRDM_POWER_ON;
  316. omap3_power_states[OMAP3_STATE_C1].flags = CPUIDLE_FLAG_TIME_VALID;
  317. /* C2 . MPU WFI + Core inactive */
  318. omap3_power_states[OMAP3_STATE_C2].valid =
  319. cpuidle_params_table[OMAP3_STATE_C2].valid;
  320. omap3_power_states[OMAP3_STATE_C2].type = OMAP3_STATE_C2;
  321. omap3_power_states[OMAP3_STATE_C2].sleep_latency =
  322. cpuidle_params_table[OMAP3_STATE_C2].sleep_latency;
  323. omap3_power_states[OMAP3_STATE_C2].wakeup_latency =
  324. cpuidle_params_table[OMAP3_STATE_C2].wake_latency;
  325. omap3_power_states[OMAP3_STATE_C2].threshold =
  326. cpuidle_params_table[OMAP3_STATE_C2].threshold;
  327. omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_ON;
  328. omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON;
  329. omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID |
  330. CPUIDLE_FLAG_CHECK_BM;
  331. /* C3 . MPU CSWR + Core inactive */
  332. omap3_power_states[OMAP3_STATE_C3].valid =
  333. cpuidle_params_table[OMAP3_STATE_C3].valid;
  334. omap3_power_states[OMAP3_STATE_C3].type = OMAP3_STATE_C3;
  335. omap3_power_states[OMAP3_STATE_C3].sleep_latency =
  336. cpuidle_params_table[OMAP3_STATE_C3].sleep_latency;
  337. omap3_power_states[OMAP3_STATE_C3].wakeup_latency =
  338. cpuidle_params_table[OMAP3_STATE_C3].wake_latency;
  339. omap3_power_states[OMAP3_STATE_C3].threshold =
  340. cpuidle_params_table[OMAP3_STATE_C3].threshold;
  341. omap3_power_states[OMAP3_STATE_C3].mpu_state = PWRDM_POWER_RET;
  342. omap3_power_states[OMAP3_STATE_C3].core_state = PWRDM_POWER_ON;
  343. omap3_power_states[OMAP3_STATE_C3].flags = CPUIDLE_FLAG_TIME_VALID |
  344. CPUIDLE_FLAG_CHECK_BM;
  345. /* C4 . MPU OFF + Core inactive */
  346. omap3_power_states[OMAP3_STATE_C4].valid =
  347. cpuidle_params_table[OMAP3_STATE_C4].valid;
  348. omap3_power_states[OMAP3_STATE_C4].type = OMAP3_STATE_C4;
  349. omap3_power_states[OMAP3_STATE_C4].sleep_latency =
  350. cpuidle_params_table[OMAP3_STATE_C4].sleep_latency;
  351. omap3_power_states[OMAP3_STATE_C4].wakeup_latency =
  352. cpuidle_params_table[OMAP3_STATE_C4].wake_latency;
  353. omap3_power_states[OMAP3_STATE_C4].threshold =
  354. cpuidle_params_table[OMAP3_STATE_C4].threshold;
  355. omap3_power_states[OMAP3_STATE_C4].mpu_state = PWRDM_POWER_OFF;
  356. omap3_power_states[OMAP3_STATE_C4].core_state = PWRDM_POWER_ON;
  357. omap3_power_states[OMAP3_STATE_C4].flags = CPUIDLE_FLAG_TIME_VALID |
  358. CPUIDLE_FLAG_CHECK_BM;
  359. /* C5 . MPU CSWR + Core CSWR*/
  360. omap3_power_states[OMAP3_STATE_C5].valid =
  361. cpuidle_params_table[OMAP3_STATE_C5].valid;
  362. omap3_power_states[OMAP3_STATE_C5].type = OMAP3_STATE_C5;
  363. omap3_power_states[OMAP3_STATE_C5].sleep_latency =
  364. cpuidle_params_table[OMAP3_STATE_C5].sleep_latency;
  365. omap3_power_states[OMAP3_STATE_C5].wakeup_latency =
  366. cpuidle_params_table[OMAP3_STATE_C5].wake_latency;
  367. omap3_power_states[OMAP3_STATE_C5].threshold =
  368. cpuidle_params_table[OMAP3_STATE_C5].threshold;
  369. omap3_power_states[OMAP3_STATE_C5].mpu_state = PWRDM_POWER_RET;
  370. omap3_power_states[OMAP3_STATE_C5].core_state = PWRDM_POWER_RET;
  371. omap3_power_states[OMAP3_STATE_C5].flags = CPUIDLE_FLAG_TIME_VALID |
  372. CPUIDLE_FLAG_CHECK_BM;
  373. /* C6 . MPU OFF + Core CSWR */
  374. omap3_power_states[OMAP3_STATE_C6].valid =
  375. cpuidle_params_table[OMAP3_STATE_C6].valid;
  376. omap3_power_states[OMAP3_STATE_C6].type = OMAP3_STATE_C6;
  377. omap3_power_states[OMAP3_STATE_C6].sleep_latency =
  378. cpuidle_params_table[OMAP3_STATE_C6].sleep_latency;
  379. omap3_power_states[OMAP3_STATE_C6].wakeup_latency =
  380. cpuidle_params_table[OMAP3_STATE_C6].wake_latency;
  381. omap3_power_states[OMAP3_STATE_C6].threshold =
  382. cpuidle_params_table[OMAP3_STATE_C6].threshold;
  383. omap3_power_states[OMAP3_STATE_C6].mpu_state = PWRDM_POWER_OFF;
  384. omap3_power_states[OMAP3_STATE_C6].core_state = PWRDM_POWER_RET;
  385. omap3_power_states[OMAP3_STATE_C6].flags = CPUIDLE_FLAG_TIME_VALID |
  386. CPUIDLE_FLAG_CHECK_BM;
  387. /* C7 . MPU OFF + Core OFF */
  388. omap3_power_states[OMAP3_STATE_C7].valid =
  389. cpuidle_params_table[OMAP3_STATE_C7].valid;
  390. omap3_power_states[OMAP3_STATE_C7].type = OMAP3_STATE_C7;
  391. omap3_power_states[OMAP3_STATE_C7].sleep_latency =
  392. cpuidle_params_table[OMAP3_STATE_C7].sleep_latency;
  393. omap3_power_states[OMAP3_STATE_C7].wakeup_latency =
  394. cpuidle_params_table[OMAP3_STATE_C7].wake_latency;
  395. omap3_power_states[OMAP3_STATE_C7].threshold =
  396. cpuidle_params_table[OMAP3_STATE_C7].threshold;
  397. omap3_power_states[OMAP3_STATE_C7].mpu_state = PWRDM_POWER_OFF;
  398. omap3_power_states[OMAP3_STATE_C7].core_state = PWRDM_POWER_OFF;
  399. omap3_power_states[OMAP3_STATE_C7].flags = CPUIDLE_FLAG_TIME_VALID |
  400. CPUIDLE_FLAG_CHECK_BM;
  401. /*
  402. * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot
  403. * enable OFF mode in a stable form for previous revisions.
  404. * we disable C7 state as a result.
  405. */
  406. if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583)) {
  407. omap3_power_states[OMAP3_STATE_C7].valid = 0;
  408. cpuidle_params_table[OMAP3_STATE_C7].valid = 0;
  409. WARN_ONCE(1, "%s: core off state C7 disabled due to i583\n",
  410. __func__);
  411. }
  412. }
  413. struct cpuidle_driver omap3_idle_driver = {
  414. .name = "omap3_idle",
  415. .owner = THIS_MODULE,
  416. };
  417. /**
  418. * omap3_idle_init - Init routine for OMAP3 idle
  419. *
  420. * Registers the OMAP3 specific cpuidle driver with the cpuidle
  421. * framework with the valid set of states.
  422. */
  423. int __init omap3_idle_init(void)
  424. {
  425. int i, count = 0;
  426. struct omap3_processor_cx *cx;
  427. struct cpuidle_state *state;
  428. struct cpuidle_device *dev;
  429. mpu_pd = pwrdm_lookup("mpu_pwrdm");
  430. core_pd = pwrdm_lookup("core_pwrdm");
  431. per_pd = pwrdm_lookup("per_pwrdm");
  432. cam_pd = pwrdm_lookup("cam_pwrdm");
  433. omap_init_power_states();
  434. cpuidle_register_driver(&omap3_idle_driver);
  435. dev = &per_cpu(omap3_idle_dev, smp_processor_id());
  436. for (i = OMAP3_STATE_C1; i < OMAP3_MAX_STATES; i++) {
  437. cx = &omap3_power_states[i];
  438. state = &dev->states[count];
  439. if (!cx->valid)
  440. continue;
  441. cpuidle_set_statedata(state, cx);
  442. state->exit_latency = cx->sleep_latency + cx->wakeup_latency;
  443. state->target_residency = cx->threshold;
  444. state->flags = cx->flags;
  445. state->enter = (state->flags & CPUIDLE_FLAG_CHECK_BM) ?
  446. omap3_enter_idle_bm : omap3_enter_idle;
  447. if (cx->type == OMAP3_STATE_C1)
  448. dev->safe_state = state;
  449. sprintf(state->name, "C%d", count+1);
  450. count++;
  451. }
  452. if (!count)
  453. return -EINVAL;
  454. dev->state_count = count;
  455. if (enable_off_mode)
  456. omap3_cpuidle_update_states(PWRDM_POWER_OFF, PWRDM_POWER_OFF);
  457. else
  458. omap3_cpuidle_update_states(PWRDM_POWER_RET, PWRDM_POWER_RET);
  459. if (cpuidle_register_device(dev)) {
  460. printk(KERN_ERR "%s: CPUidle register device failed\n",
  461. __func__);
  462. return -EIO;
  463. }
  464. return 0;
  465. }
  466. #else
  467. int __init omap3_idle_init(void)
  468. {
  469. return 0;
  470. }
  471. #endif /* CONFIG_CPU_IDLE */