ARM: shmobile: Consolidate the pm code for R-Car Gen2
PATCH v2 1/1 ARM: shmobile: Consolidate the pm code for R-Car Gen2
The pm code for R-Car Gen2 is scatterd in each SoC. These files (pm-r8a7790.c/pm-r8a7791.c) have some overlap code. This change consolidate the pm code for R-Car Gen2 into one.
---
Changes since version 1:
- Fixed copyright.
- Added the argument of syscier to rcar_gen2_sysc_init().
- Changed the variable name.(has_a15/has_a7)
Based on : renesas-devel-20150312v2-v4.0-rc3
arch/arm/mach-shmobile/Makefile | 5 +- arch/arm/mach-shmobile/pm-r8a7790.c | 82 ----------------------- arch/arm/mach-shmobile/pm-r8a7791.c | 73 --------------------- arch/arm/mach-shmobile/pm-rcar-gen2.c | 115 +++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/r8a7790.h | 1 - arch/arm/mach-shmobile/r8a7791.h | 1 - arch/arm/mach-shmobile/rcar-gen2.h | 1 + arch/arm/mach-shmobile/smp-r8a7790.c | 3 +- arch/arm/mach-shmobile/smp-r8a7791.c | 2 +- 9 files changed, 122 insertions(+), 161 deletions(-) delete mode 100644 arch/arm/mach-shmobile/pm-r8a7790.c delete mode 100644 arch/arm/mach-shmobile/pm-r8a7791.c create mode 100644 arch/arm/mach-shmobile/pm-rcar-gen2.c
arch/arm/mach-shmobile/Makefile +3 -2
@@ -11,8 +11,8 @@ obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o -obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o -obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o pm-r8a7791.o +obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o +obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o obj-$(CONFIG_ARCH_R8A7794) += setup-r8a7794.o obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o
@@ -49,6 +49,7 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_CPU_FREQ) += cpufreq.o obj-$(CONFIG_PM_RCAR) += pm-rcar.o obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o +obj-$(CONFIG_ARCH_RCAR_GEN2) += pm-rcar-gen2.o # Board objects ifdef CONFIG_ARCH_SHMOBILE_MULTI
arch/arm/mach-shmobile/pm-r8a7790.c deleted +0 -82
82 lines not on this page · raw message
arch/arm/mach-shmobile/pm-r8a7791.c deleted +0 -73
73 lines not on this page · raw message
arch/arm/mach-shmobile/pm-rcar-gen2.c new file +115 -0
115 lines not on this page · raw message
arch/arm/mach-shmobile/r8a7790.h +0 -1
@@ -1,7 +1,6 @@#ifndef __ASM_R8A7790_H__#define __ASM_R8A7790_H__ -void r8a7790_pm_init (void );extern struct smp_operations r8a7790_smp_ops;#endif /* __ASM_R8A7790_H__ */
arch/arm/mach-shmobile/r8a7791.h +0 -1
@@ -1,7 +1,6 @@#ifndef __ASM_R8A7791_H__#define __ASM_R8A7791_H__ -void r8a7791_pm_init (void );extern struct smp_operations r8a7791_smp_ops;#endif /* __ASM_R8A7791_H__ */
arch/arm/mach-shmobile/rcar-gen2.h +1 -0
@@ -5,5 +5,6 @@ void rcar_gen2_timer_init(void);#define MD (nr) BIT(nr)u32 rcar_gen2_read_mode_pins (void );void rcar_gen2_reserve (void ); +void rcar_gen2_pm_init (void );#endif /* __ASM_RCAR_GEN2_H__ */
arch/arm/mach-shmobile/smp-r8a7790.c +2 -1
@@ -23,6 +23,7 @@#include "common.h" #include "platsmp-apmu.h" #include "pm-rcar.h" +#include "rcar-gen2.h" #include "r8a7790.h" static struct rcar_sysc_ch r8a7790_ca15_scu = {
@@ -54,7 +55,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) ARRAY_SIZE(r8a7790_apmu_config));/* turn on power to SCU */ -r8a7790_pm_init (); +rcar_gen2_pm_init ();rcar_sysc_power_up (&r8a7790_ca15_scu);rcar_sysc_power_up (&r8a7790_ca7_scu); }
arch/arm/mach-shmobile/smp-r8a7791.c +1 -1
@@ -39,7 +39,7 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus) r8a7791_apmu_config, ARRAY_SIZE(r8a7791_apmu_config)); -r8a7791_pm_init (); +rcar_gen2_pm_init (); } static int r8a7791_smp_boot_secondary(unsigned int cpu,
Signature · 1 line
1.7.9.5
Hi Inami-san,
Quoted 11 lines · Gaku Inami
The pm code for R-Car Gen2 is scatterd in each SoC. These files (
pm-r8a7790.c/pm-r8a7791.c) have some overlap code. This change consolidate the pm code for R-Car Gen2 into one.Signed-off-by Gaku Inami <[email protected]>---
Changes since version 1:
- Fixed copyright.
- Added the argument of syscier torcar_gen2_sysc_init().
- Changed the variable name.(has_a15/has_a7)
Thanks for the update!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 11 lines · Geert Uytterhoeven
Hi Inami-san,
Quoted 7 lines · Gaku Inami
The pm code for R-Car Gen2 is scatterd in each SoC. These files (
pm-r8a7790.c/pm-r8a7791.c) have some overlap code. This change consolidate the pm code for R-Car Gen2 into one.Signed-off-by Gaku Inami <[email protected]>---
Quoted 8 lines
Quoted 4 lines
Changes since version 1:
- Fixed copyright.
- Added the argument of syscier torcar_gen2_sysc_init().
- Changed the variable name.(has_a15/has_a7)Thanks for the update!
Thanks, I have queued this up in a shiny new pm-for-v4.1 branch.