* [PATCH 1/6] ARM: shmobile: smp: Make shmobile_smp_apmu_cpu_shutdown() static
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
@ 2015-10-15 0:33 ` Simon Horman
2015-10-15 0:33 ` [PATCH 2/6] ARM: shmobile: r8a7778: Make r8a7778_init_irq_dt() static Simon Horman
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2015-10-15 0:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
shmobile_smp_apmu_cpu_shutdown() is used inside platsmp-apmu.c only.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/platsmp-apmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 4e54512bee30..bcf4cc51b926 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -170,7 +170,7 @@ static inline void cpu_enter_lowpower_a15(void)
dsb();
}
-void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
+static void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
{
/* Select next sleep mode using the APMU */
--
2.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/6] ARM: shmobile: r8a7778: Make r8a7778_init_irq_dt() static
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
2015-10-15 0:33 ` [PATCH 1/6] ARM: shmobile: smp: Make shmobile_smp_apmu_cpu_shutdown() static Simon Horman
@ 2015-10-15 0:33 ` Simon Horman
2015-10-15 0:33 ` [PATCH 3/6] ARM: shmobile: r8a7779: Remove legacy PM Domain remainings Simon Horman
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2015-10-15 0:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
As of commit 4baadb9e05c68962 ("ARM: shmobile: r8a7778: remove obsolete
setup code"), r8a7778_init_irq_dt() is no longer used outside
setup-r8a7778.c.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/setup-r8a7778.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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)
#define INT2NTSR0 0x00018 /* 0xfe700018 */
#define INT2NTSR1 0x0002c /* 0xfe70002c */
-void __init r8a7778_init_irq_dt(void)
+
+static void __init r8a7778_init_irq_dt(void)
{
void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000);
--
2.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/6] ARM: shmobile: r8a7779: Remove legacy PM Domain remainings
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
2015-10-15 0:33 ` [PATCH 1/6] ARM: shmobile: smp: Make shmobile_smp_apmu_cpu_shutdown() static Simon Horman
2015-10-15 0:33 ` [PATCH 2/6] ARM: shmobile: r8a7778: Make r8a7778_init_irq_dt() static Simon Horman
@ 2015-10-15 0:33 ` Simon Horman
2015-10-15 0:33 ` [PATCH 4/6] ARM: shmobile: apmu: correct type of CPU id Simon Horman
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2015-10-15 0:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Geert Uytterhoeven <geert+renesas@glider.be>
As of commit c99cd90d98a98aa1 ("ARM: shmobile: r8a7779: Remove legacy
SoC code"), r8a7779_init_pm_domains() is no longer called.
Remove all related legacy PM Domain code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/pm-r8a7779.c | 99 -------------------------------------
arch/arm/mach-shmobile/r8a7779.h | 6 ---
2 files changed, 105 deletions(-)
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 @@
* for more details.
*/
-#include <linux/pm.h>
-#include <linux/suspend.h>
-#include <linux/err.h>
-#include <linux/pm_clock.h>
-#include <linux/pm_domain.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/irq.h>
-#include <linux/interrupt.h>
-#include <linux/console.h>
-
#include <asm/io.h>
-#include "common.h"
#include "pm-rcar.h"
#include "r8a7779.h"
@@ -30,17 +18,6 @@
#define SYSCIER 0x0c
#define SYSCIMR 0x10
-struct r8a7779_pm_domain {
- struct generic_pm_domain genpd;
- struct rcar_sysc_ch ch;
-};
-
-static inline
-const struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
-{
- return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
-}
-
#if defined(CONFIG_PM) || defined(CONFIG_SMP)
static void __init r8a7779_sysc_init(void)
@@ -58,82 +35,6 @@ static inline void r8a7779_sysc_init(void) {}
#endif /* CONFIG_PM || CONFIG_SMP */
-#ifdef CONFIG_PM
-
-static int pd_power_down(struct generic_pm_domain *genpd)
-{
- return rcar_sysc_power_down(to_r8a7779_ch(genpd));
-}
-
-static int pd_power_up(struct generic_pm_domain *genpd)
-{
- return rcar_sysc_power_up(to_r8a7779_ch(genpd));
-}
-
-static bool pd_is_off(struct generic_pm_domain *genpd)
-{
- return rcar_sysc_power_is_off(to_r8a7779_ch(genpd));
-}
-
-static bool pd_active_wakeup(struct device *dev)
-{
- return true;
-}
-
-static void r8a7779_init_pm_domain(struct r8a7779_pm_domain *r8a7779_pd)
-{
- struct generic_pm_domain *genpd = &r8a7779_pd->genpd;
-
- pm_genpd_init(genpd, NULL, false);
- genpd->dev_ops.active_wakeup = pd_active_wakeup;
- genpd->power_off = pd_power_down;
- genpd->power_on = pd_power_up;
-
- if (pd_is_off(&r8a7779_pd->genpd))
- pd_power_up(&r8a7779_pd->genpd);
-}
-
-static struct r8a7779_pm_domain r8a7779_pm_domains[] = {
- {
- .genpd.name = "SH4A",
- .ch = {
- .chan_offs = 0x80, /* PWRSR1 .. PWRER1 */
- .isr_bit = 16, /* SH4A */
- },
- },
- {
- .genpd.name = "SGX",
- .ch = {
- .chan_offs = 0xc0, /* PWRSR2 .. PWRER2 */
- .isr_bit = 20, /* SGX */
- },
- },
- {
- .genpd.name = "VDP1",
- .ch = {
- .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
- .isr_bit = 21, /* VDP */
- },
- },
- {
- .genpd.name = "IMPX3",
- .ch = {
- .chan_offs = 0x140, /* PWRSR4 .. PWRER4 */
- .isr_bit = 24, /* IMP */
- },
- },
-};
-
-void __init r8a7779_init_pm_domains(void)
-{
- int j;
-
- for (j = 0; j < ARRAY_SIZE(r8a7779_pm_domains); j++)
- r8a7779_init_pm_domain(&r8a7779_pm_domains[j]);
-}
-
-#endif /* CONFIG_PM */
-
void __init r8a7779_pm_init(void)
{
static int once;
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 @@
extern void r8a7779_pm_init(void);
-#ifdef CONFIG_PM
-extern void __init r8a7779_init_pm_domains(void);
-#else
-static inline void r8a7779_init_pm_domains(void) {}
-#endif /* CONFIG_PM */
-
extern struct smp_operations r8a7779_smp_ops;
#endif /* __ASM_R8A7779_H__ */
--
2.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/6] ARM: shmobile: apmu: correct type of CPU id
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
` (2 preceding siblings ...)
2015-10-15 0:33 ` [PATCH 3/6] ARM: shmobile: r8a7779: Remove legacy PM Domain remainings Simon Horman
@ 2015-10-15 0:33 ` Simon Horman
2015-10-15 0:33 ` [PATCH 5/6] ARM: shmobile: dt: Rename incorrect interrupt related binding Simon Horman
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2015-10-15 0:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Andrzej Hajda <a.hajda@samsung.com>
CPU id can be negative, so it cannot be assigned to unsigned variable.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/platsmp-apmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index bcf4cc51b926..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)
static void apmu_parse_cfg(void (*fn)(struct resource *res, int cpu, int bit),
struct rcar_apmu_config *apmu_config, int num)
{
- u32 id;
+ int id;
int k;
int bit, index;
bool is_allowed;
--
2.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/6] ARM: shmobile: dt: Rename incorrect interrupt related binding
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
` (3 preceding siblings ...)
2015-10-15 0:33 ` [PATCH 4/6] ARM: shmobile: apmu: correct type of CPU id Simon Horman
@ 2015-10-15 0:33 ` Simon Horman
2015-10-15 8:06 ` Lee Jones
2015-10-15 0:33 ` [PATCH 6/6] ARM: shmobile: R-Mobile: add missing of_node_put Simon Horman
2015-10-22 16:48 ` [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Olof Johansson
6 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2015-10-15 0:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Lee Jones <lee.jones@linaro.org>
interrupts-names => interrupt-names
Other line changes are re-aligning.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
.../bindings/memory-controllers/renesas-memory-controllers.txt | 6 +++---
1 file changed, 3 insertions(+), 3 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:
Optional properties:
- interrupts: Must contain a list of interrupt specifiers for memory
controller interrupts, if available.
- - interrupts-names: Must contain a list of interrupt names corresponding to
- the interrupts in the interrupts property, if available.
- Valid interrupt names are:
+ - interrupt-names: Must contain a list of interrupt names corresponding to
+ the interrupts in the interrupts property, if available.
+ Valid interrupt names are:
- "sec" (secure interrupt)
- "temp" (normal (temperature) interrupt)
- power-domains: Must contain a reference to the PM domain that the memory
--
2.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/6] ARM: shmobile: dt: Rename incorrect interrupt related binding
2015-10-15 0:33 ` [PATCH 5/6] ARM: shmobile: dt: Rename incorrect interrupt related binding Simon Horman
@ 2015-10-15 8:06 ` Lee Jones
0 siblings, 0 replies; 9+ messages in thread
From: Lee Jones @ 2015-10-15 8:06 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 15 Oct 2015, Simon Horman wrote:
> From: Lee Jones <lee.jones@linaro.org>
>
> interrupts-names => interrupt-names
>
> Other line changes are re-aligning.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> .../bindings/memory-controllers/renesas-memory-controllers.txt | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks for resending this Simon.
> 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:
> Optional properties:
> - interrupts: Must contain a list of interrupt specifiers for memory
> controller interrupts, if available.
> - - interrupts-names: Must contain a list of interrupt names corresponding to
> - the interrupts in the interrupts property, if available.
> - Valid interrupt names are:
> + - interrupt-names: Must contain a list of interrupt names corresponding to
> + the interrupts in the interrupts property, if available.
> + Valid interrupt names are:
> - "sec" (secure interrupt)
> - "temp" (normal (temperature) interrupt)
> - power-domains: Must contain a reference to the PM domain that the memory
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/6] ARM: shmobile: R-Mobile: add missing of_node_put
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
` (4 preceding siblings ...)
2015-10-15 0:33 ` [PATCH 5/6] ARM: shmobile: dt: Rename incorrect interrupt related binding Simon Horman
@ 2015-10-15 0:33 ` Simon Horman
2015-10-22 16:48 ` [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Olof Johansson
6 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2015-10-15 0:33 UTC (permalink / raw)
To: linux-arm-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
for_each_child_of_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.
The semantic patch that fixes this problem is as follows
(http://coccinelle.lip6.fr):
// <smpl>
@@
expression root,e;
local idexpression child;
@@
for_each_child_of_node(root, child) {
... when != of_node_put(child)
when != e = child
(
return child;
|
+ of_node_put(child);
? return ...;
)
...
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/pm-rmobile.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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,
}
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
- if (!pd)
+ if (!pd) {
+ of_node_put(np);
return -ENOMEM;
+ }
pd->genpd.name = np->name;
pd->base = base;
--
2.1.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4
2015-10-15 0:33 [GIT PULL] Second Round of Renesas ARM Based SoC Cleanup for v4.4 Simon Horman
` (5 preceding siblings ...)
2015-10-15 0:33 ` [PATCH 6/6] ARM: shmobile: R-Mobile: add missing of_node_put Simon Horman
@ 2015-10-22 16:48 ` Olof Johansson
6 siblings, 0 replies; 9+ messages in thread
From: Olof Johansson @ 2015-10-22 16:48 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 15, 2015 at 09:33:02AM +0900, Simon Horman wrote:
> Hi Olof, Hi Kevin, Hi Arnd,
>
> Please consider these second round of Renesas ARM based SoC cleanup for v4.4.
>
> This pull request is based on the previous round of
> such requests, tagged as renesas-cleanup-for-v4.4,
> which you have already pulled.
>
>
> The following changes since commit 04418c23a9411b85b8789eab5f4397bcbd62b7b4:
>
> ARM: shmobile: Remove legacy clock support leftovers (2015-09-14 10:06:56 +0900)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup2-for-v4.4
>
> for you to fetch changes up to 1fd377b3fc1e071702e27b2f828e3abd8b31c74d:
>
> ARM: shmobile: R-Mobile: add missing of_node_put (2015-10-12 09:15:29 +0900)
Merged, thanks!
-Olof
^ permalink raw reply [flat|nested] 9+ messages in thread