1/* 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 12#include <asm/io.h> 13 14#include "pm-rcar.h" 15#include "r8a7779.h" 16 17/* SYSC */ 18#define SYSCIER 0x0c 19#define SYSCIMR 0x10 20 21#if defined(CONFIG_PM) || defined(CONFIG_SMP) 22 23static void __init r8a7779_sysc_init(void) 24{ 25 void __iomem *base = rcar_sysc_init(0xffd85000); 26 27 /* enable all interrupt sources, but do not use interrupt handler */ 28 iowrite32(0x0131000e, base + SYSCIER); 29 iowrite32(0, base + SYSCIMR); 30} 31 32#else /* CONFIG_PM || CONFIG_SMP */ 33 34static inline void r8a7779_sysc_init(void) {} 35 36#endif /* CONFIG_PM || CONFIG_SMP */ 37 38void __init r8a7779_pm_init(void) 39{ 40 static int once; 41 42 if (!once++) 43 r8a7779_sysc_init(); 44} 45