1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2008 IBM Corp.
5 * Based on arch/powerpc/platforms/pasemi/idle.c:
6 * Copyright (C) 2006-2007 PA Semi, Inc
8 * Added by: Jerone Young <jyoung5@us.ibm.com>
12 #include <linux/kernel.h>
13 #include <asm/machdep.h>
17 static void ppc44x_idle(void)
19 unsigned long msr_save;
22 /* set wait state MSR */
23 mtmsr(msr_save|MSR_WE|MSR_EE|MSR_CE|MSR_DE);
25 /* return to initial state */
30 int __init ppc44x_idle_init(void)
33 /* If we are not setting spin mode
34 then we set to wait mode */
35 ppc_md.power_save = &ppc44x_idle;
41 arch_initcall(ppc44x_idle_init);
43 static int __init idle_param(char *p)
46 if (!strcmp("spin", p)) {
48 ppc_md.power_save = NULL;
54 early_param("idle", idle_param);