2017-12-26 03:54:32 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
2007-12-23 10:09:34 +08:00
|
|
|
* Copyright (c) 2007 Simtec Electronics
|
|
|
|
* Ben Dooks <ben@simtec.co.uk>
|
|
|
|
*
|
|
|
|
* S3C2412 Power Manager low-level sleep support
|
2017-12-26 03:54:32 +08:00
|
|
|
*/
|
2007-12-23 10:09:34 +08:00
|
|
|
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <asm/assembler.h>
|
2008-08-05 23:14:15 +08:00
|
|
|
#include <mach/hardware.h>
|
|
|
|
#include <mach/map.h>
|
2007-12-23 10:09:34 +08:00
|
|
|
|
2008-08-05 23:14:15 +08:00
|
|
|
#include <mach/regs-irq.h>
|
2007-12-23 10:09:34 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
|
|
|
|
.global s3c2412_sleep_enter
|
|
|
|
|
|
|
|
s3c2412_sleep_enter:
|
|
|
|
mov r0, #0 /* argument for coprocessors */
|
|
|
|
ldr r1, =S3C2410_INTPND
|
|
|
|
ldr r2, =S3C2410_SRCPND
|
|
|
|
ldr r3, =S3C2410_EINTPEND
|
|
|
|
|
|
|
|
teq r0, r0
|
|
|
|
bl s3c2412_sleep_enter1
|
|
|
|
teq pc, r0
|
|
|
|
bl s3c2412_sleep_enter1
|
|
|
|
|
|
|
|
.align 5
|
|
|
|
|
|
|
|
/* this is called twice, first with the Z flag to ensure that the
|
|
|
|
* instructions have been loaded into the cache, and the second
|
|
|
|
* time to try and suspend the system.
|
|
|
|
*/
|
|
|
|
s3c2412_sleep_enter1:
|
|
|
|
mcr p15, 0, r0, c7, c10, 4
|
|
|
|
mcrne p15, 0, r0, c7, c0, 4
|
|
|
|
|
|
|
|
/* if we return from here, it is because an interrupt was
|
|
|
|
* active when we tried to shutdown. Try and ack the IRQ and
|
|
|
|
* retry, as simply returning causes the system to lock.
|
|
|
|
*/
|
|
|
|
|
ARM: samsung: fix assembly syntax for new gas
Recent assembler versions complain about extraneous
whitespace inside [] brackets. This fixes all of
these instances for the samsung platforms. We should
backport this to all kernels that might need to
be built with new binutils.
arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r2,[ r6,#(0x10)]'
arch/arm/kernel/entry-armv.S:214: Error: ARM register expected -- `ldr r0,[ r6,#(0x14)]'
arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r2,[ r6,#(0x10)]'
arch/arm/kernel/entry-armv.S:430: Error: ARM register expected -- `ldr r0,[ r6,#(0x14)]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S: Assembler messages:
arch/arm/mach-s3c24xx/sleep-s3c2410.S:48: Error: ARM register expected -- `ldr r7,[ r4 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:49: Error: ARM register expected -- `ldr r8,[ r5 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:50: Error: ARM register expected -- `ldr r9,[ r6 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:64: Error: ARM register expected -- `streq r7,[ r4 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:65: Error: ARM register expected -- `streq r8,[ r5 ]'
arch/arm/mach-s3c24xx/sleep-s3c2410.S:66: Error: ARM register expected -- `streq r9,[ r6 ]'
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r2,#((0x0B0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-((0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r2,#((0x0B0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-((0)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/mach-s3c24xx/pm-h1940.S: Assembler messages:
arch/arm/mach-s3c24xx/pm-h1940.S:33: Error: ARM register expected -- `ldr pc,[ r0,#((0x0B8)+(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000))))-(((0x56000000)-(0x50000000))+(0xF6000000+(0x01000000)))]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S: Assembler messages:
arch/arm/mach-s3c24xx/sleep-s3c2412.S:60: Error: ARM register expected -- `ldrne r9,[ r1 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:61: Error: ARM register expected -- `strne r9,[ r1 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:62: Error: ARM register expected -- `ldrne r9,[ r2 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:63: Error: ARM register expected -- `strne r9,[ r2 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:64: Error: ARM register expected -- `ldrne r9,[ r3 ]'
arch/arm/mach-s3c24xx/sleep-s3c2412.S:65: Error: ARM register expected -- `strne r9,[ r3 ]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x08)]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/kernel/debug.S:83: Error: ARM register expected -- `ldr r2,[ r3,#(0x10)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x08)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x18)]'
arch/arm/kernel/debug.S:85: Error: ARM register expected -- `ldr r2,[ r3,#(0x10)]'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: stable@vger.kernel.org
2013-01-09 05:58:31 +08:00
|
|
|
ldrne r9, [r1]
|
|
|
|
strne r9, [r1]
|
|
|
|
ldrne r9, [r2]
|
|
|
|
strne r9, [r2]
|
|
|
|
ldrne r9, [r3]
|
|
|
|
strne r9, [r3]
|
2007-12-23 10:09:34 +08:00
|
|
|
bne s3c2412_sleep_enter1
|
|
|
|
|
2014-06-30 23:29:12 +08:00
|
|
|
ret lr
|