blob: 5c9a93f5e650181a6e4684f4aded5e2144eff609 [file] [log] [blame]
Magnus Damma662c082012-01-10 15:50:01 +09001/*
2 * r8a7779 Power management support
3 *
4 * Copyright (C) 2011 Renesas Solutions Corp.
5 * Copyright (C) 2011 Magnus Damm
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
Geert Uytterhoevenbe32bcb2016-04-20 14:02:36 +020012#include <linux/soc/renesas/rcar-sysc.h>
13
Magnus Damma662c082012-01-10 15:50:01 +090014#include <asm/io.h>
Geert Uytterhoeven1b553532014-06-20 18:53:05 +020015
Geert Uytterhoeven1b553532014-06-20 18:53:05 +020016#include "r8a7779.h"
Magnus Damma662c082012-01-10 15:50:01 +090017
Magnus Damma662c082012-01-10 15:50:01 +090018/* SYSC */
Magnus Damma662c082012-01-10 15:50:01 +090019#define SYSCIER 0x0c
20#define SYSCIMR 0x10
Magnus Damma662c082012-01-10 15:50:01 +090021
Magnus Dammf40aaf62012-01-10 17:44:39 +090022#if defined(CONFIG_PM) || defined(CONFIG_SMP)
23
Magnus Damma662c082012-01-10 15:50:01 +090024static void __init r8a7779_sysc_init(void)
25{
Geert Uytterhoeven05323992016-06-28 16:10:33 +020026 rcar_sysc_init(0xffd85000, 0x0131000e);
Magnus Damma662c082012-01-10 15:50:01 +090027}
28
Magnus Dammf40aaf62012-01-10 17:44:39 +090029#else /* CONFIG_PM || CONFIG_SMP */
30
31static inline void r8a7779_sysc_init(void) {}
32
33#endif /* CONFIG_PM || CONFIG_SMP */
34
Magnus Damma662c082012-01-10 15:50:01 +090035void __init r8a7779_pm_init(void)
36{
Magnus Dammf40aaf62012-01-10 17:44:39 +090037 static int once;
38
39 if (!once++)
40 r8a7779_sysc_init();
Magnus Damma662c082012-01-10 15:50:01 +090041}