aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/renesas/rcar-sysc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/soc/renesas/rcar-sysc.c b/drivers/soc/renesas/rcar-sysc.c
index 22f0d646225c..65c8e1eb90c0 100644
--- a/drivers/soc/renesas/rcar-sysc.c
+++ b/drivers/soc/renesas/rcar-sysc.c
@@ -402,12 +402,25 @@ early_initcall(rcar_sysc_pd_init);
402 402
403void __init rcar_sysc_init(phys_addr_t base, u32 syscier) 403void __init rcar_sysc_init(phys_addr_t base, u32 syscier)
404{ 404{
405 u32 syscimr;
406
405 if (!rcar_sysc_pd_init()) 407 if (!rcar_sysc_pd_init())
406 return; 408 return;
407 409
408 rcar_sysc_base = ioremap_nocache(base, PAGE_SIZE); 410 rcar_sysc_base = ioremap_nocache(base, PAGE_SIZE);
409 411
410 /* enable all interrupt sources, but do not use interrupt handler */ 412 /*
413 * Mask all interrupt sources to prevent the CPU from receiving them.
414 * Make sure not to clear reserved bits that were set before.
415 */
416 syscimr = ioread32(rcar_sysc_base + SYSCIMR);
417 syscimr |= syscier;
418 pr_debug("%s: syscimr = 0x%08x\n", __func__, syscimr);
419 iowrite32(syscimr, rcar_sysc_base + SYSCIMR);
420
421 /*
422 * SYSC needs all interrupt sources enabled to control power.
423 */
424 pr_debug("%s: syscier = 0x%08x\n", __func__, syscier);
411 iowrite32(syscier, rcar_sysc_base + SYSCIER); 425 iowrite32(syscier, rcar_sysc_base + SYSCIER);
412 iowrite32(0, rcar_sysc_base + SYSCIMR);
413} 426}