2 * Copyright 2002 Embedded Edge, LLC
3 * Author: dan@embeddededge.com
5 * Sleep helper for Au1xxx sleep mode.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
13 #include <asm/mipsregs.h>
14 #include <asm/addrspace.h>
15 #include <asm/regdef.h>
16 #include <asm/stackframe.h>
23 /* Save all of the processor general registers and go to sleep.
24 * A wakeup condition will get us back here to restore the registers.
69 /* Now set up the scratch registers so the boot rom will
70 * return to this point upon wakeup.
79 /* Put SDRAM into self refresh. Preload instructions into cache,
80 * issue a precharge, then auto refresh, then sleep commands to it.
92 sw zero, 0x001c(k0) /* Precharge */
93 sw zero, 0x0020(k0) /* Auto refresh */
94 sw zero, 0x0030(k0) /* SDRAM sleep */
98 sw zero, 0x0078(k1) /* get ready to sleep */
100 sw zero, 0x007c(k1) /* Put processor to sleep */
103 /* This is where we return upon wakeup.
104 * Reload all of the registers and return.
112 mtc0 k0, CP0_PAGEMASK