2 * Enter and leave sleep state on chips with 6xx-style HID0
3 * power management bits, which don't leave sleep state via reset.
5 * Author: Scott Wood <scottwood@freescale.com>
7 * Copyright (c) 2006-2007 Freescale Semiconductor, Inc.
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as published
11 * by the Free Software Foundation.
14 #include <asm/ppc_asm.h>
16 #include <asm/thread_info.h>
17 #include <asm/asm-offsets.h>
19 _GLOBAL(mpc6xx_enter_standby)
23 rlwinm r5, r5, 0, ~(HID0_DOZE | HID0_NAP)
24 oris r5, r5, HID0_SLEEP@h
28 lis r5, ret_from_standby@h
29 ori r5, r5, ret_from_standby@l
32 CURRENT_THREAD_INFO(r5, r1)
33 lwz r6, TI_LOCAL_FLAGS(r5)
34 ori r6, r6, _TLF_SLEEPING
35 stw r6, TI_LOCAL_FLAGS(r5)
39 oris r5, r5, MSR_POW@h
48 rlwinm r5, r5, 0, ~HID0_SLEEP