Path: blob/master/arch/powerpc/sysdev/6xx-suspend.S
10817 views
/*1* Enter and leave sleep state on chips with 6xx-style HID02* power management bits, which don't leave sleep state via reset.3*4* Author: Scott Wood <[email protected]>5*6* Copyright (c) 2006-2007 Freescale Semiconductor, Inc.7*8* This program is free software; you can redistribute it and/or modify it9* under the terms of the GNU General Public License version 2 as published10* by the Free Software Foundation.11*/1213#include <asm/ppc_asm.h>14#include <asm/reg.h>15#include <asm/thread_info.h>16#include <asm/asm-offsets.h>1718_GLOBAL(mpc6xx_enter_standby)19mflr r42021mfspr r5, SPRN_HID022rlwinm r5, r5, 0, ~(HID0_DOZE | HID0_NAP)23oris r5, r5, HID0_SLEEP@h24mtspr SPRN_HID0, r525isync2627lis r5, ret_from_standby@h28ori r5, r5, ret_from_standby@l29mtlr r53031rlwinm r5, r1, 0, 0, 31-THREAD_SHIFT32lwz r6, TI_LOCAL_FLAGS(r5)33ori r6, r6, _TLF_SLEEPING34stw r6, TI_LOCAL_FLAGS(r5)3536mfmsr r537ori r5, r5, MSR_EE38oris r5, r5, MSR_POW@h39sync40mtmsr r541isync42431: b 1b4445ret_from_standby:46mfspr r5, SPRN_HID047rlwinm r5, r5, 0, ~HID0_SLEEP48mtspr SPRN_HID0, r54950mtlr r451blr525354