1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2006-2007 PA Semi, Inc
5 * Maintained by: Olof Johansson <olof@lixom.net>
8 #include <asm/processor.h>
10 #include <asm/ppc_asm.h>
11 #include <asm/cputable.h>
12 #include <asm/cache.h>
13 #include <asm/thread_info.h>
14 #include <asm/asm-offsets.h>
16 /* Power savings opcodes since not all binutils have them at this time */
17 #define DOZE .long 0x4c000324
18 #define NAP .long 0x4c000364
19 #define SLEEP .long 0x4c0003a4
20 #define RVW .long 0x4c0003e4
22 /* Common sequence to do before going to any of the
26 #define PRE_SLEEP_SEQUENCE \
43 LOAD_REG_ADDR(r3, _doze)
46 /* Add more modes here later */
52 #ifdef CONFIG_PPC_PASEMI_CPUFREQ
55 /* Only do power savings when in astate 0 */
62 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)