1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Enter and leave sleep state on chips with 6xx-style HID0
4 * power management bits, which don't leave sleep state via reset.
6 * Author: Scott Wood <scottwood@freescale.com>
8 * Copyright (c) 2006-2007 Freescale Semiconductor, Inc.
11 #include <asm/ppc_asm.h>
13 #include <asm/thread_info.h>
14 #include <asm/asm-offsets.h>
16 _GLOBAL(mpc6xx_enter_standby)
20 rlwinm r5, r5, 0, ~(HID0_DOZE | HID0_NAP)
21 oris r5, r5, HID0_SLEEP@h
25 lis r5, ret_from_standby@h
26 ori r5, r5, ret_from_standby@l
29 lwz r6, TI_LOCAL_FLAGS(r2)
30 ori r6, r6, _TLF_SLEEPING
31 stw r6, TI_LOCAL_FLAGS(r2)
35 oris r5, r5, MSR_POW@h
44 rlwinm r5, r5, 0, ~HID0_SLEEP