diff options
-rw-r--r-- | arch/arm/mach-shmobile/pm-r8a7779.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pm-rcar-gen2.c | 6 | ||||
-rw-r--r-- | drivers/soc/renesas/rcar-sysc.c | 12 | ||||
-rw-r--r-- | include/linux/soc/renesas/rcar-sysc.h | 2 |
4 files changed, 11 insertions, 15 deletions
diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c index 4174cbcbc467..5c9a93f5e650 100644 --- a/arch/arm/mach-shmobile/pm-r8a7779.c +++ b/arch/arm/mach-shmobile/pm-r8a7779.c @@ -23,11 +23,7 @@ static void __init r8a7779_sysc_init(void) { - void __iomem *base = rcar_sysc_init(0xffd85000); - - /* enable all interrupt sources, but do not use interrupt handler */ - iowrite32(0x0131000e, base + SYSCIER); - iowrite32(0, base + SYSCIMR); + rcar_sysc_init(0xffd85000, 0x0131000e); } #else /* CONFIG_PM || CONFIG_SMP */ diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c index 691ac166a277..7768fd1bce65 100644 --- a/arch/arm/mach-shmobile/pm-rcar-gen2.c +++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c @@ -37,11 +37,7 @@ static void __init rcar_gen2_sysc_init(u32 syscier) { - void __iomem *base = rcar_sysc_init(0xe6180000); - - /* enable all interrupt sources, but do not use interrupt handler */ - iowrite32(syscier, base + SYSCIER); - iowrite32(0, base + SYSCIMR); + rcar_sysc_init(0xe6180000, syscier); } #else /* CONFIG_SMP */ 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); } diff --git a/include/linux/soc/renesas/rcar-sysc.h b/include/linux/soc/renesas/rcar-sysc.h index 92fc613ab23d..7b8b280c181b 100644 --- a/include/linux/soc/renesas/rcar-sysc.h +++ b/include/linux/soc/renesas/rcar-sysc.h @@ -11,6 +11,6 @@ struct rcar_sysc_ch { int rcar_sysc_power_down(const struct rcar_sysc_ch *sysc_ch); int rcar_sysc_power_up(const struct rcar_sysc_ch *sysc_ch); -void __iomem *rcar_sysc_init(phys_addr_t base); +void rcar_sysc_init(phys_addr_t base, u32 syscier); #endif /* __LINUX_SOC_RENESAS_RCAR_SYSC_H__ */ |