Merge tag 'locks-v3.16-2' of git://git.samba.org/jlayton/linux
[linux/fpc-iii.git] / arch / arm / mach-shmobile / pm-r8a7790.c
blobfc82839e2c2a1b68e4adaa31f1fe5db1b68cc963
1 /*
2 * r8a7790 Power management support
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 * Copyright (C) 2011 Renesas Solutions Corp.
6 * Copyright (C) 2011 Magnus Damm
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
13 #include <linux/kernel.h>
14 #include <asm/io.h>
15 #include <mach/pm-rcar.h>
16 #include <mach/r8a7790.h>
18 /* SYSC */
19 #define SYSCIER 0x0c
20 #define SYSCIMR 0x10
22 #if defined(CONFIG_SMP)
24 static void __init r8a7790_sysc_init(void)
26 void __iomem *base = rcar_sysc_init(0xe6180000);
28 /* enable all interrupt sources, but do not use interrupt handler */
29 iowrite32(0x0131000e, base + SYSCIER);
30 iowrite32(0, base + SYSCIMR);
33 #else /* CONFIG_SMP */
35 static inline void r8a7790_sysc_init(void) {}
37 #endif /* CONFIG_SMP */
39 void __init r8a7790_pm_init(void)
41 static int once;
43 if (!once++)
44 r8a7790_sysc_init();