1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
6 * S3C2412 Power Manager low-level sleep support
9 #include <linux/linkage.h>
10 #include <asm/assembler.h>
17 .global s3c2412_sleep_enter
20 mov r0, #0 /* argument for coprocessors */
21 ldr r1, =S3C2410_INTPND
22 ldr r2, =S3C2410_SRCPND
23 ldr r3, =S3C2410_EINTPEND
26 bl s3c2412_sleep_enter1
28 bl s3c2412_sleep_enter1
32 /* this is called twice, first with the Z flag to ensure that the
33 * instructions have been loaded into the cache, and the second
34 * time to try and suspend the system.
37 mcr p15, 0, r0, c7, c10, 4
38 mcrne p15, 0, r0, c7, c0, 4
40 /* if we return from here, it is because an interrupt was
41 * active when we tried to shutdown. Try and ack the IRQ and
42 * retry, as simply returning causes the system to lock.
51 bne s3c2412_sleep_enter1