aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2015-10-22 12:48:02 -0400
committerOlof Johansson <olof@lixom.net>2015-10-22 12:48:02 -0400
commit9aa2b26bd38cdae51adebbbcbb4bb06d38eed1dd (patch)
treec8be9909b6a65f86b9f8f7dc24035476c2e891db
parent5f1e3c910013254221ad4bcf8d6bfcb84a1a05e5 (diff)
parent1fd377b3fc1e071702e27b2f828e3abd8b31c74d (diff)
Merge tag 'renesas-cleanup2-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup
Second Round of Renesas ARM Based SoC Cleanup for v4.4 * Remove now unused legacy pm domain code * Add missing of_node_put to pm-rmobile * Corresct spelling of interrupt-names in renesas-memory-controller binding documentation * Correct signdness of CPU id in shmobile apmu implementation * Make some functions static as appropriate * tag 'renesas-cleanup2-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: R-Mobile: add missing of_node_put ARM: shmobile: dt: Rename incorrect interrupt related binding ARM: shmobile: apmu: correct type of CPU id ARM: shmobile: r8a7779: Remove legacy PM Domain remainings ARM: shmobile: r8a7778: Make r8a7778_init_irq_dt() static ARM: shmobile: smp: Make shmobile_smp_apmu_cpu_shutdown() static Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt6
-rw-r--r--arch/arm/mach-shmobile/platsmp-apmu.c4
-rw-r--r--arch/arm/mach-shmobile/pm-r8a7779.c99
-rw-r--r--arch/arm/mach-shmobile/pm-rmobile.c4
-rw-r--r--arch/arm/mach-shmobile/r8a7779.h6
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c3
6 files changed, 10 insertions, 112 deletions
diff --git a/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt b/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
index c64b7925cd09..9f78e6c82740 100644
--- a/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/renesas-memory-controllers.txt
@@ -24,9 +24,9 @@ Required properties:
24Optional properties: 24Optional properties:
25 - interrupts: Must contain a list of interrupt specifiers for memory 25 - interrupts: Must contain a list of interrupt specifiers for memory
26 controller interrupts, if available. 26 controller interrupts, if available.
27 - interrupts-names: Must contain a list of interrupt names corresponding to 27 - interrupt-names: Must contain a list of interrupt names corresponding to
28 the interrupts in the interrupts property, if available. 28 the interrupts in the interrupts property, if available.
29 Valid interrupt names are: 29 Valid interrupt names are:
30 - "sec" (secure interrupt) 30 - "sec" (secure interrupt)
31 - "temp" (normal (temperature) interrupt) 31 - "temp" (normal (temperature) interrupt)
32 - power-domains: Must contain a reference to the PM domain that the memory 32 - power-domains: Must contain a reference to the PM domain that the memory
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 4e54512bee30..911884f7e28b 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -88,7 +88,7 @@ static void apmu_init_cpu(struct resource *res, int cpu, int bit)
88static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit), 88static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit),
89 struct rcar_apmu_config *apmu_config, int num) 89 struct rcar_apmu_config *apmu_config, int num)
90{ 90{
91 u32 id; 91 int id;
92 int k; 92 int k;
93 int bit, index; 93 int bit, index;
94 bool is_allowed; 94 bool is_allowed;
@@ -170,7 +170,7 @@ static inline void cpu_enter_lowpower_a15(void)
170 dsb(); 170 dsb();
171} 171}
172 172
173void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu) 173static void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
174{ 174{
175 175
176 /* Select next sleep mode using the APMU */ 176 /* Select next sleep mode using the APMU */
diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c
index 47a862e7f8ba..14c42a1bdf1e 100644
--- a/arch/arm/mach-shmobile/pm-r8a7779.c
+++ b/arch/arm/mach-shmobile/pm-r8a7779.c
@@ -9,20 +9,8 @@
9 * for more details. 9 * for more details.
10 */ 10 */
11 11
12#include <linux/pm.h>
13#include <linux/suspend.h>
14#include <linux/err.h>
15#include <linux/pm_clock.h>
16#include <linux/pm_domain.h>
17#include <linux/platform_device.h>
18#include <linux/delay.h>
19#include <linux/irq.h>
20#include <linux/interrupt.h>
21#include <linux/console.h>
22
23#include <asm/io.h> 12#include <asm/io.h>
24 13
25#include "common.h"
26#include "pm-rcar.h" 14#include "pm-rcar.h"
27#include "r8a7779.h" 15#include "r8a7779.h"
28 16
@@ -30,17 +18,6 @@
30#define SYSCIER 0x0c 18#define SYSCIER 0x0c
31#define SYSCIMR 0x10 19#define SYSCIMR 0x10
32 20
33struct r8a7779_pm_domain {
34 struct generic_pm_domain genpd;
35 struct rcar_sysc_ch ch;
36};
37
38static inline
39const struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
40{
41 return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
42}
43
44#if defined(CONFIG_PM) || defined(CONFIG_SMP) 21#if defined(CONFIG_PM) || defined(CONFIG_SMP)
45 22
46static void __init r8a7779_sysc_init(void) 23static void __init r8a7779_sysc_init(void)
@@ -58,82 +35,6 @@ static inline void r8a7779_sysc_init(void) {}
58 35
59#endif /* CONFIG_PM || CONFIG_SMP */ 36#endif /* CONFIG_PM || CONFIG_SMP */
60 37
61#ifdef CONFIG_PM
62
63static int pd_power_down(struct generic_pm_domain *genpd)
64{
65 return rcar_sysc_power_down(to_r8a7779_ch(genpd));
66}
67
68static int pd_power_up(struct generic_pm_domain *genpd)
69{
70 return rcar_sysc_power_up(to_r8a7779_ch(genpd));
71}
72
73static bool pd_is_off(struct generic_pm_domain *genpd)
74{
75 return rcar_sysc_power_is_off(to_r8a7779_ch(genpd));
76}
77
78static bool pd_active_wakeup(struct device *dev)
79{
80 return true;
81}
82
83static void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd)
84{
85 struct generic_pm_domain *genpd = &r8a7779_pd->genpd;
86
87 pm_genpd_init(genpd, NULL, false);
88 genpd->dev_ops.active_wakeup = pd_active_wakeup;
89 genpd->power_off = pd_power_down;
90 genpd->power_on = pd_power_up;
91
92 if (pd_is_off(&r8a7779_pd->genpd))
93 pd_power_up(&r8a7779_pd->genpd);
94}
95
96static struct r8a7779_pm_domain r8a7779_pm_domains[] = {
97 {
98 .genpd.name = "SH4A",
99 .ch = {
100 .chan_offs = 0x80, /* PWRSR1 .. PWRER1 */
101 .isr_bit = 16, /* SH4A */
102 },
103 },
104 {
105 .genpd.name = "SGX",
106 .ch = {
107 .chan_offs = 0xc0, /* PWRSR2 .. PWRER2 */
108 .isr_bit = 20, /* SGX */
109 },
110 },
111 {
112 .genpd.name = "VDP1",
113 .ch = {
114 .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
115 .isr_bit = 21, /* VDP */
116 },
117 },
118 {
119 .genpd.name = "IMPX3",
120 .ch = {
121 .chan_offs = 0x140, /* PWRSR4 .. PWRER4 */
122 .isr_bit = 24, /* IMP */
123 },
124 },
125};
126
127void __init r8a7779_init_pm_domains(void)
128{
129 int j;
130
131 for (j = 0; j < ARRAY_SIZE(r8a7779_pm_domains); j++)
132 r8a7779_init_pm_domain(&r8a7779_pm_domains[j]);
133}
134
135#endif /* CONFIG_PM */
136
137void __init r8a7779_pm_init(void) 38void __init r8a7779_pm_init(void)
138{ 39{
139 static int once; 40 static int once;
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index a5b96b990aea..424155b0cfe9 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -342,8 +342,10 @@ static int __init rmobile_add_pm_domains(void __iomem *base,
342 } 342 }
343 343
344 pd = kzalloc(sizeof(*pd), GFP_KERNEL); 344 pd = kzalloc(sizeof(*pd), GFP_KERNEL);
345 if (!pd) 345 if (!pd) {
346 of_node_put(np);
346 return -ENOMEM; 347 return -ENOMEM;
348 }
347 349
348 pd->genpd.name = np->name; 350 pd->genpd.name = np->name;
349 pd->base = base; 351 pd->base = base;
diff --git a/arch/arm/mach-shmobile/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h
index aad833a8f0b8..e1aaa2ef9376 100644
--- a/arch/arm/mach-shmobile/r8a7779.h
+++ b/arch/arm/mach-shmobile/r8a7779.h
@@ -3,12 +3,6 @@
3 3
4extern void r8a7779_pm_init(void); 4extern void r8a7779_pm_init(void);
5 5
6#ifdef CONFIG_PM
7extern void __init r8a7779_init_pm_domains(void);
8#else
9static inline void r8a7779_init_pm_domains(void) {}
10#endif /* CONFIG_PM */
11
12extern struct smp_operations r8a7779_smp_ops; 6extern struct smp_operations r8a7779_smp_ops;
13 7
14#endif /* __ASM_R8A7779_H__ */ 8#endif /* __ASM_R8A7779_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index b0c9986d022d..0ab9d3272875 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -42,7 +42,8 @@ static void __init r8a7778_timer_init(void)
42 42
43#define INT2NTSR0 0x00018 /* 0xfe700018 */ 43#define INT2NTSR0 0x00018 /* 0xfe700018 */
44#define INT2NTSR1 0x0002c /* 0xfe70002c */ 44#define INT2NTSR1 0x0002c /* 0xfe70002c */
45void __init r8a7778_init_irq_dt(void) 45
46static void __init r8a7778_init_irq_dt(void)
46{ 47{
47 void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); 48 void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000);
48 49