2012-01-10 10:50:01 +04:00
|
|
|
/*
|
|
|
|
* r8a7779 Power management support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Renesas Solutions Corp.
|
|
|
|
* Copyright (C) 2011 Magnus Damm
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
2016-04-20 15:02:36 +03:00
|
|
|
#include <linux/soc/renesas/rcar-sysc.h>
|
|
|
|
|
2012-01-10 10:50:01 +04:00
|
|
|
#include <asm/io.h>
|
2014-06-20 20:53:05 +04:00
|
|
|
|
|
|
|
#include "r8a7779.h"
|
2012-01-10 10:50:01 +04:00
|
|
|
|
|
|
|
/* SYSC */
|
|
|
|
#define SYSCIER 0x0c
|
|
|
|
#define SYSCIMR 0x10
|
|
|
|
|
2012-01-10 12:44:39 +04:00
|
|
|
#if defined(CONFIG_PM) || defined(CONFIG_SMP)
|
|
|
|
|
2012-01-10 10:50:01 +04:00
|
|
|
static void __init r8a7779_sysc_init(void)
|
|
|
|
{
|
soc: renesas: rcar-sysc: Move SYSC interrupt config to rcar-sysc driver
On R-Car H1 and Gen2, the SYSC interrupt registers are always configured
using hardcoded values in platform code. For R-Car Gen2, values are
provided for H2 and M2-W only, other SoCs are not yet supported, and
never will be.
Move this configuration from SoC-specific platform code to the
rcar_sysc_init() wrapper, so it can be skipped if the SYSC is configured
from DT. This would be the case not only for H1, H2, and M2-W using a
modern DTS, but also for other R-Car Gen2 SoCs not supported by the
platform code, relying purely on DT.
There is no longer a need to return the mapped register block, hence
make the function return void.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2016-06-28 17:10:33 +03:00
|
|
|
rcar_sysc_init(0xffd85000, 0x0131000e);
|
2012-01-10 10:50:01 +04:00
|
|
|
}
|
|
|
|
|
2012-01-10 12:44:39 +04:00
|
|
|
#else /* CONFIG_PM || CONFIG_SMP */
|
|
|
|
|
|
|
|
static inline void r8a7779_sysc_init(void) {}
|
|
|
|
|
|
|
|
#endif /* CONFIG_PM || CONFIG_SMP */
|
|
|
|
|
2012-01-10 10:50:01 +04:00
|
|
|
void __init r8a7779_pm_init(void)
|
|
|
|
{
|
2012-01-10 12:44:39 +04:00
|
|
|
static int once;
|
|
|
|
|
|
|
|
if (!once++)
|
|
|
|
r8a7779_sysc_init();
|
2012-01-10 10:50:01 +04:00
|
|
|
}
|