From 053239987f89f9a6299e78610bad010764bccd71 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 28 Jun 2016 16:10:33 +0200 Subject: 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 Reviewed-by: Ulrich Hecht Signed-off-by: Simon Horman --- drivers/soc/renesas/rcar-sysc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers/soc/renesas/rcar-sysc.c') diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c index 68d6856c9d3c..22f0d646225c 100644 --- a/drivers/soc/renesas/rcar-sysc.c +++ b/drivers/soc/renesas/rcar-sysc.c @@ -400,10 +400,14 @@ out_put: } early_initcall(rcar_sysc_pd_init); -void __iomem * __init rcar_sysc_init(phys_addr_t base) +void __init rcar_sysc_init(phys_addr_t base, u32 syscier) { - if (rcar_sysc_pd_init()) - rcar_sysc_base = ioremap_nocache(base, PAGE_SIZE); + if (!rcar_sysc_pd_init()) + return; - return rcar_sysc_base; + rcar_sysc_base = ioremap_nocache(base, PAGE_SIZE); + + /* enable all interrupt sources, but do not use interrupt handler */ + iowrite32(syscier, rcar_sysc_base + SYSCIER); + iowrite32(0, rcar_sysc_base + SYSCIMR); } -- cgit v1.2.1